mbox series

[v2,0/4] KVM: selftests: AMX test fix and cleanups

Message ID 20221128225735.3291648-1-seanjc@google.com (mailing list archive)
Headers show
Series KVM: selftests: AMX test fix and cleanups | expand

Message

Sean Christopherson Nov. 28, 2022, 10:57 p.m. UTC
Fix a bug in the AMX test introduced by moving to kvm_cpu_has() for
X86_FEATURE_XFD, and clean up the related code.  The fix and cleanups
all revolve around ARCH_REQ_XCOMP_GUEST_PERM impacting the output of
KVM_GET_SUPPORTED_CPUID, and thus causing problems for selftest's
caching of KVM's supported CPUID.

Lei Wang, I adjusted your Author and SOB tags to drop the comma, which I
think? violates that "use your real name" rule, and use formatting from
patches you've sent in the past[*].  Let me know if that's ok (or not).

[*] https://lore.kernel.org/all/20220424101557.134102-9-lei4.wang@intel.com

Lei Wang (1):
  KVM: selftests: Move XFD CPUID checking out of
    __vm_xsave_require_permission()

Sean Christopherson (3):
  KVM: selftests: Move __vm_xsave_require_permission() below CPUID
    helpers
  KVM: selftests: Disallow "get supported CPUID" before
    REQ_XCOMP_GUEST_PERM
  KVM: selftests: Do kvm_cpu_has() checks before creating VM+vCPU

 .../selftests/kvm/lib/x86_64/processor.c      | 84 ++++++++++---------
 tools/testing/selftests/kvm/x86_64/amx_test.c | 11 ++-
 2 files changed, 52 insertions(+), 43 deletions(-)


base-commit: 519c2002cd92bdc37c8412ca22cb9c7e7bc48c48

Comments

Lei Wang Nov. 29, 2022, 1:58 a.m. UTC | #1
On 11/29/2022 6:57 AM, Sean Christopherson wrote:
> Fix a bug in the AMX test introduced by moving to kvm_cpu_has() for
> X86_FEATURE_XFD, and clean up the related code.  The fix and cleanups
> all revolve around ARCH_REQ_XCOMP_GUEST_PERM impacting the output of
> KVM_GET_SUPPORTED_CPUID, and thus causing problems for selftest's
> caching of KVM's supported CPUID.
> 
> Lei Wang, I adjusted your Author and SOB tags to drop the comma, which I
> think? violates that "use your real name" rule, and use formatting from
> patches you've sent in the past[*].  Let me know if that's ok (or not).

That's OK, thanks!

> [*] https://lore.kernel.org/all/20220424101557.134102-9-lei4.wang@intel.com
> 
> Lei Wang (1):
>   KVM: selftests: Move XFD CPUID checking out of
>     __vm_xsave_require_permission()
> 
> Sean Christopherson (3):
>   KVM: selftests: Move __vm_xsave_require_permission() below CPUID
>     helpers
>   KVM: selftests: Disallow "get supported CPUID" before
>     REQ_XCOMP_GUEST_PERM
>   KVM: selftests: Do kvm_cpu_has() checks before creating VM+vCPU
> 
>  .../selftests/kvm/lib/x86_64/processor.c      | 84 ++++++++++---------
>  tools/testing/selftests/kvm/x86_64/amx_test.c | 11 ++-
>  2 files changed, 52 insertions(+), 43 deletions(-)
> 
> 
> base-commit: 519c2002cd92bdc37c8412ca22cb9c7e7bc48c48