Skip to content

KVM: selftests: Fix nx_huge_pages_test when TDP is disabled

David Matlack kvm 3 versions – Applied

Status from this message: Queued, thanks. For now I placed them in kvm/master, but I think they will not be in 6.0.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest3 patches 1 replyApplied
  2. v23 patches 3 repliesSuperseded
  3. v11 patch 2 repliesSuperseded

Changes in v3 from the cover letter

- 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]

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/3KVM: selftests: Tell the compiler that code after TEST_FAIL() is unreachabletools/testing/selftests/kvm/include/test_util.h+4 -20 replies
2/3KVM: selftests: Add helpers to read kvm_{intel,amd} boolean module parameterstools/testing/selftests/kvm/include/kvm_util_base.h tools/testing/selftests/kvm/lib/kvm_util.c tools/testing/selftests/kvm/lib/x86_64/processor.c+44 -120 replies
3/3KVM: selftests: Fix nx_huge_pages_test on TDP-disabled hoststools/testing/selftests/kvm/include/x86_64/processor.h tools/testing/selftests/kvm/lib/x86_64/processor.c tools/testing/selftests/kvm/x86_64/nx_huge_pages_test.c+48 -20 replies

Reviews trailers per patch

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

Read the v3 thread

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

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/[email protected]/
- 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/[email protected]/

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

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