kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [kvm-unit-tests PATCH] x86/vmx: Deprecate VMX_VMCS_ENUM.MAX_INDEX check in vmread/vmwrite test
@ 2021-11-19  7:15 Robert Hoo
  2021-12-06  9:48 ` Robert Hoo
  0 siblings, 1 reply; 2+ messages in thread
From: Robert Hoo @ 2021-11-19  7:15 UTC (permalink / raw)
  To: seanjc, pbonzini, jmattson; +Cc: kvm, yu.c.zhang, robert.hu, Robert Hoo

From: Yu Zhang <yu.c.zhang@linux.intel.com>

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/YZWqJwUrF2Id9hM2@google.com/

Signed-off-by: Yu Zhang <yu.c.zhang@linux.intel.com>
Signed-off-by: Robert Hoo <robert.hu@linux.intel.com>
---
 x86/vmx.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/x86/vmx.c b/x86/vmx.c
index 7a2f7a3..7e191dd 100644
--- a/x86/vmx.c
+++ b/x86/vmx.c
@@ -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));
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [kvm-unit-tests PATCH] x86/vmx: Deprecate VMX_VMCS_ENUM.MAX_INDEX check in vmread/vmwrite test
  2021-11-19  7:15 [kvm-unit-tests PATCH] x86/vmx: Deprecate VMX_VMCS_ENUM.MAX_INDEX check in vmread/vmwrite test Robert Hoo
@ 2021-12-06  9:48 ` Robert Hoo
  0 siblings, 0 replies; 2+ messages in thread
From: Robert Hoo @ 2021-12-06  9:48 UTC (permalink / raw)
  To: seanjc, pbonzini, jmattson; +Cc: kvm, yu.c.zhang, robert.hu

Ping...
Thanks.
On Fri, 2021-11-19 at 15:15 +0800, Robert Hoo wrote:
> From: Yu Zhang <yu.c.zhang@linux.intel.com>
> 
> 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/YZWqJwUrF2Id9hM2@google.com/
> 
> Signed-off-by: Yu Zhang <yu.c.zhang@linux.intel.com>
> Signed-off-by: Robert Hoo <robert.hu@linux.intel.com>
> ---
>  x86/vmx.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/x86/vmx.c b/x86/vmx.c
> index 7a2f7a3..7e191dd 100644
> --- a/x86/vmx.c
> +++ b/x86/vmx.c
> @@ -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));


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-12-06  9:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-19  7:15 [kvm-unit-tests PATCH] x86/vmx: Deprecate VMX_VMCS_ENUM.MAX_INDEX check in vmread/vmwrite test Robert Hoo
2021-12-06  9:48 ` Robert Hoo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).