Excise the completely bogus testcase in test_host_addr_size() which purports to verify that setting vmcs.HOST_RIP[63:32] to non-zero values is allowed for 64-bit hosts. The testcase is mindbogglingly broken: setting arbitrary, single bits above bit 46 creates a noncanonical address, and setting arbitrary bits below bit 47 would send the test into the weeds as a "successful" VMLAUNCH generates a VM-Exit, i.e. would load the garbage RIP and immediately encounter a #PF. The only reason the passes is because it does absolutely nothing useful: vmlaunch() unconditionally writes HOST_RIP before VMLAUNCH, because not jumping to a random RIP on a VM-Exit is mildly important. Outright drop the testcase, trying to salvage anything from it would be a waste of time as simply running any 64-bit guest will generate a huge variety of RIPs with non-zero values in bits 63:32. Signed-off-by: Sean Christopherson <seanjc@xxxxxxxxxx> --- x86/vmx_tests.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/x86/vmx_tests.c b/x86/vmx_tests.c index 1a340242..9d0f2050 100644 --- a/x86/vmx_tests.c +++ b/x86/vmx_tests.c @@ -7616,8 +7616,6 @@ static void test_host_addr_size(void) u64 cr4_saved = vmcs_read(HOST_CR4); u64 rip_saved = vmcs_read(HOST_RIP); u64 entry_ctrl_saved = vmcs_read(ENT_CONTROLS); - int i; - u64 tmp; assert(vmcs_read(EXI_CONTROLS) & EXI_HOST_64); assert(cr4_saved & X86_CR4_PAE); @@ -7640,14 +7638,6 @@ static void test_host_addr_size(void) vmcs_write(HOST_CR4, cr4_saved); report_prefix_pop(); - for (i = 32; i <= 63; i = i + 4) { - tmp = rip_saved | 1ull << i; - vmcs_write(HOST_RIP, tmp); - report_prefix_pushf("HOST_RIP %lx", tmp); - test_vmx_vmlaunch(0); - report_prefix_pop(); - } - vmcs_write(HOST_RIP, NONCANONICAL); report_prefix_pushf("HOST_RIP %llx", NONCANONICAL); test_vmx_vmlaunch(VMXERR_ENTRY_INVALID_HOST_STATE_FIELD); -- 2.42.0.283.g2d96d420d3-goog