Re: [kvm-unit-tests PATCH v7 2/2] x86: nvmx: test max atomic switch MSRs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> On Sep 26, 2019, at 7:32 AM, Sean Christopherson <sean.j.christopherson@xxxxxxxxx> wrote:
> 
> On Thu, Sep 26, 2019 at 11:24:57AM +0200, Paolo Bonzini wrote:
>> On 25/09/19 03:18, Marc Orr wrote:
>>> diff --git a/x86/unittests.cfg b/x86/unittests.cfg
>>> index 694ee3d42f3a..05122cf91ea1 100644
>>> --- a/x86/unittests.cfg
>>> +++ b/x86/unittests.cfg
>>> @@ -227,7 +227,7 @@ extra_params = -cpu qemu64,+umip
>>> 
>>> [vmx]
>>> file = vmx.flat
>>> -extra_params = -cpu host,+vmx -append "-exit_monitor_from_l2_test -ept_access* -vmx_smp* -vmx_vmcs_shadow_test"
>>> +extra_params = -cpu host,+vmx -append "-exit_monitor_from_l2_test -ept_access* -vmx_smp* -vmx_vmcs_shadow_test -atomic_switch_overflow_msrs_test"
>>> arch = x86_64
>>> groups = vmx
>> 
>> I just noticed this, why is the test disabled by default?
> 
> The negative test triggers undefined behavior, e.g. on bare metal the
> test would fail because VM-Enter would succeed due to lack of an explicit
> check on the MSR count.
> 
> Since the test relies on somehwat arbitrary KVM behavior, we made it opt-in.

Thanks for caring, but it would be better to explicitly skip the test if it
is not running on bare-metal. For instance, I missed this thread and needed
to check why the test fails on bare-metal...

Besides, it seems that v6 was used and not v7, so the error messages are
strange:

 Test suite: atomic_switch_overflow_msrs_test
 FAIL: exit_reason, 18, is 2147483682.
 FAIL: exit_qual, 0, is 513.
 SUMMARY: 11 tests, 2 unexpected failures

I also think that printing the exit-reason in hex format would be more
readable.





[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux