Skip to contentSkip to conversation

x86/vmx: Deprecate VMX_VMCS_ENUM.MAX_INDEX check in vmread/vmwrite test

PATCH In review Robert Hoo 1 participant 2 messages Nov 19, 2021 – Dec 6, 2021 KVM

lore
Share & tools
lore

Robert Hoo

author
#0 lore raw

PATCH 1/1 x86/vmx: Deprecate VMX_VMCS_ENUM.MAX_INDEX check in vmread/vmwrite test

From: Yu Zhang <[email protected]>

The actual value of vmcs12.vmcs_enum is set by QEMU, with hard code, while the expected value in this test is got from literally traversing vmcs12 fields. They probably mismatch, depends on KVM version and QEMU version used. It doesn't mean QEMU or KVM is buggy.

We deprecate this failure report, as we "don't see any point in fighting too hard with QEMU."[1]
We keep its log here as hint.

[1] https://lore.kernel.org/kvm/[email protected]/

---
 x86/vmx.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
x86/vmx.c +1 -2
index 7a2f7a3..7e191dd 100644
@@ -379,8 +379,7 @@ static void test_vmwrite_vmread(void)
 	vmcs_enum_max = (rdmsr(MSR_IA32_VMX_VMCS_ENUM) & VMCS_FIELD_INDEX_MASK)
 			>> VMCS_FIELD_INDEX_SHIFT;
 	max_index = find_vmcs_max_index();
-	report(vmcs_enum_max == max_index,
-	       "VMX_VMCS_ENUM.MAX_INDEX expected: %x, actual: %x",
+	printf("VMX_VMCS_ENUM.MAX_INDEX expected: %x, actual: %x\n",
 	       max_index, vmcs_enum_max);
 
 	assert(!vmcs_clear(vmcs));
Signature · 1 line
1.8.3.1
author
#1 lore raw

Ping...
Thanks.

Quoted 37 lines · Robert Hoo

From: Yu Zhang <[email protected]>

The actual value of vmcs12.vmcs_enum is set by QEMU, with hard code, while the expected value in this test is got from literally traversing
vmcs12 fields. They probably mismatch, depends on KVM version and QEMU
version used. It doesn't mean QEMU or KVM is buggy.

We deprecate this failure report, as we "don't see any point in fighting
too hard with QEMU."[1]
We keep its log here as hint.

[1] https://lore.kernel.org/kvm/[email protected]/

---
 x86/vmx.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
x86/vmx.c +1 -2
index 7a2f7a3..7e191dd 100644
@@ -379,8 +379,7 @@ static void test_vmwrite_vmread(void)
 	vmcs_enum_max = (rdmsr(MSR_IA32_VMX_VMCS_ENUM) &
 VMCS_FIELD_INDEX_MASK)
 			>> VMCS_FIELD_INDEX_SHIFT;
 	max_index = find_vmcs_max_index();
-	report(vmcs_enum_max == max_index,
-	       "VMX_VMCS_ENUM.MAX_INDEX expected: %x, actual: %x",
+	printf("VMX_VMCS_ENUM.MAX_INDEX expected: %x, actual: %x\n",
 	       max_index, vmcs_enum_max);
 

assert(!vmcs_clear(vmcs));