[PATCH v3 0/3] KVM: selftests: Fix nx_huge_pages_test when TDP is disabled

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

 



Fix nx_huge_pages_test when run on TDP-disabled hosts by mapping the
test region with huge pages in the VM so that KVM can shadow it with
huge pages.

Patches 1 and 2 are precursor patches to add the necessary
infrastructure to check if TDP is enabled or not.

v3:
 - Skip the selftest if a module param file cannot be opened [Sean]
 - Add wrappers for reading kvm_intel and kvm_amd params [Sean]
 - Small renames and error reporting cleanups [Sean]
 - Decrease sysfs path array from 1024 to 128 bytes [me]

v2: https://lore.kernel.org/kvm/20220928184853.1681781-1-dmatlack@xxxxxxxxxx/
 - Still use 4K mappins on TDP-enabled hosts [Sean]
 - Generalize virt_map_2m() to virt_map_level() [me]
 - Pass nr_bytes instead of nr_pages to virt_map_level() [Sean]

v1: https://lore.kernel.org/kvm/20220926175219.605113-1-dmatlack@xxxxxxxxxx/

David Matlack (3):
  KVM: selftests: Tell the compiler that code after TEST_FAIL() is
    unreachable
  KVM: selftests: Add helpers to read kvm_{intel,amd} boolean module
    parameters
  KVM: selftests: Fix nx_huge_pages_test on TDP-disabled hosts

 .../selftests/kvm/include/kvm_util_base.h     |  4 ++
 .../testing/selftests/kvm/include/test_util.h |  6 ++-
 .../selftests/kvm/include/x86_64/processor.h  |  4 ++
 tools/testing/selftests/kvm/lib/kvm_util.c    | 39 ++++++++++++++++++
 .../selftests/kvm/lib/x86_64/processor.c      | 40 +++++++++++++------
 .../selftests/kvm/x86_64/nx_huge_pages_test.c | 19 ++++++++-
 6 files changed, 96 insertions(+), 16 deletions(-)


base-commit: 372d07084593dc7a399bf9bee815711b1fb1bcf2
prerequisite-patch-id: 2e3661ba8856c29b769499bac525b6943d9284b8
-- 
2.38.0.rc1.362.ged0d419d3c-goog




[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