Skip to content

KVM: selftests: Add X86_PROPERTY_* magic

Sean Christopherson kvm lkml 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest12 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/12KVM: selftests: Add X86_FEATURE_PAE and use it calc "fallback" MAXPHYADDRtools/testing/selftests/kvm/include/x86_64/processor.h tools/testing/selftests/kvm/lib/x86_64/processor.c+2 -30 replies
2/12KVM: selftests: Refactor X86_FEATURE_* framework to prep for X86_PROPERTY_*tools/testing/selftests/kvm/include/x86_64/processor.h+25 -130 replies
3/12KVM: selftests: Add X86_PROPERTY_* framework to retrieve CPUID valuestools/testing/selftests/kvm/include/x86_64/processor.h tools/testing/selftests/kvm/lib/x86_64/processor.c+76 -100 replies
4/12KVM: selftests: Use X86_PROPERTY_MAX_KVM_LEAF in CPUID testtools/testing/selftests/kvm/x86_64/cpuid_test.c+1 -100 replies
5/12KVM: selftests: Refactor kvm_cpuid_has() to prep for X86_PROPERTY_* supporttools/testing/selftests/kvm/lib/x86_64/processor.c+13 -60 replies
6/12KVM: selftests: Add kvm_cpu_*() support for X86_PROPERTY_*tools/testing/selftests/kvm/include/x86_64/processor.h tools/testing/selftests/kvm/lib/x86_64/processor.c+39 -120 replies
7/12KVM: selftests: Convert AMX test to use X86_PROPRETY_XXXtools/testing/selftests/kvm/include/x86_64/processor.h tools/testing/selftests/kvm/x86_64/amx_test.c+33 -810 replies
8/12KVM: selftests: Convert vmx_pmu_caps_test to use X86_PROPERTY_*tools/testing/selftests/kvm/include/x86_64/processor.h tools/testing/selftests/kvm/x86_64/vmx_pmu_caps_test.c+4 -210 replies
9/12KVM: selftest: Add PMU feature framework, use in PMU event filter testtools/testing/selftests/kvm/include/x86_64/processor.h tools/testing/selftests/kvm/x86_64/pmu_event_filter_test.c+48 -440 replies
10/12KVM: selftests: Add dedicated helpers for getting x86 Family and Modeltools/testing/selftests/kvm/include/x86_64/processor.h tools/testing/selftests/kvm/lib/x86_64/processor.c+36 -200 replies
11/12KVM: selftests: Add and use KVM helpers for x86 Family and Modeltools/testing/selftests/kvm/include/x86_64/processor.h tools/testing/selftests/kvm/x86_64/pmu_event_filter_test.c+28 -140 replies
12/12KVM: selftest: Drop helpers for getting specific KVM supported CPUID entrytools/testing/selftests/kvm/include/x86_64/processor.h+0 -110 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 00/12] KVM: selftests: Add X86_PROPERTY_* magic

Extend the X86_FEATURE_* magic to multi-bit values, which I'm calling "properties" (feel free to suggest a better name). The basic concept, and even the core code, is the same, the difference is really just one bit versus many bits.

The main goal is to move away from open coding CPUID checks, which almost always end up needing a comment to explain what all the magic numbers mean.

Sean Christopherson (12):
KVM: selftests: Add X86_FEATURE_PAE and use it calc "fallback"
MAXPHYADDR
KVM: selftests: Refactor X86_FEATURE_* framework to prep for

    X86_PROPERTY_*

KVM: selftests: Add X86_PROPERTY_* framework to retrieve CPUID values
KVM: selftests: Use X86_PROPERTY_MAX_KVM_LEAF in CPUID test
KVM: selftests: Refactor kvm_cpuid_has() to prep for X86_PROPERTY_*
support
KVM: selftests: Add kvm_cpu_*() support for X86_PROPERTY_*
KVM: selftests: Convert AMX test to use X86_PROPRETY_XXX
KVM: selftests: Convert vmx_pmu_caps_test to use X86_PROPERTY_*
KVM: selftest: Add PMU feature framework, use in PMU event filter test
KVM: selftests: Add dedicated helpers for getting x86 Family and Model
KVM: selftests: Add and use KVM helpers for x86 Family and Model
KVM: selftest: Drop helpers for getting specific KVM supported CPUID
entry

 .../selftests/kvm/include/x86_64/processor.h  | 279 ++++++++++++++----
 .../selftests/kvm/lib/x86_64/processor.c      |  60 ++--
 tools/testing/selftests/kvm/x86_64/amx_test.c | 105 ++-----
 .../testing/selftests/kvm/x86_64/cpuid_test.c |  11 +-
 .../kvm/x86_64/pmu_event_filter_test.c        |  74 ++---
 .../selftests/kvm/x86_64/vmx_pmu_caps_test.c  |  19 +-
 6 files changed, 304 insertions(+), 244 deletions(-)

base-commit: e18d6152ff0f41b7f01f9817372022df04e0d354

Signature · 1 line
2.38.0.rc1.362.ged0d419d3c-goog