In this version, patch# 1 has been reduced in size (based on Jim's suggestion) by introducing an outer and an inner loop. The outer loop tests "use TPR shadow" while the inner loop tests the other three controls - "virtualize x2APIC mode", "APIC-register virtualization" and "virtual-interrupt delivery". Patch# 2 remains the same as before. [kvm-unit-test 1/2] nVMX x86: APIC virtual controls must be unset if [kvm-unit-test 2/2] nVMX x86: "virtualize APIC accesses" must be x86/vmx_tests.c | 128 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 126 insertions(+), 2 deletions(-) Krish Sadhukhan (2): nVMX x86: APIC virtual controls must be unset if "Use TPR shadow" is unset nVMX x86: "virtualize APIC accesses" must be unset if "virtualize x2APIC" is set