v1 -> v2: In patch# 2, make_non_canonical() has been made 'inline' to fix a compilation error. Patch# 1 implements the following checks, from Intel SDM vol 3C, on vmentry of nested guests: - In the selector field for each of CS, SS, DS, ES, FS, GS and TR, the RPL (bits 1:0) and the TI flag (bit 2) must be 0. - The selector fields for CS and TR cannot be 0000H. - The selector field for SS cannot be 0000H if the "host address-space size" VM-exit control is 0. - On processors that support Intel 64 architecture, the base-address fields for FS, GS and TR must contain canonical addresses. Patch# 2 adds kvm-unit-tests for the above checks. [PATCH 1/2] KVM nVMX: Check Host Segment Registers and Descriptor Tables on [PATCH 2/2] kvm-unit-test nVMX: Test Host Segment Registers and Descriptor Tables on arch/x86/kvm/vmx/nested.c | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) Krish Sadhukhan (1): nVMX: Check Host Segment Registers and Descriptor Tables on vmentry of nested guests lib/x86/processor.h | 5 ++ x86/vmx_tests.c | 159 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 164 insertions(+) Krish Sadhukhan (1): nVMX: Test Host Segment Registers and Descriptor Tables on vmentry of nested guests