mbox series

[v2,00/10] KVM: selftests: Add nested support to dirty_log_perf_test

Message ID 20220517190524.2202762-1-dmatlack@google.com (mailing list archive)
Headers show
Series KVM: selftests: Add nested support to dirty_log_perf_test | expand

Message

David Matlack May 17, 2022, 7:05 p.m. UTC
This series adds support for taking any perf_test_util-based test and
configuring it to run vCPUs in L2 instead of L1, and adds an option to
dirty_log_perf_test to enable it.

This series was used to collect the performance data for eager page
spliting for nested MMUs [1].

[1] https://lore.kernel.org/kvm/20220422210546.458943-1-dmatlack@google.com/

v2:
 - Collect R-b tags from Peter.
 - Use level macros instead of raw numbers [Peter]
 - Remove "upper" from function name [Peter]
 - Bring back setting the A/D bits on EPT PTEs [Peter]
 - Drop "all" rule from Makefile [Peter]
 - Reserve memory for EPT pages [Peter]
 - Fix off-by-one error in nested_map_all_1g() [me]

v1: https://lore.kernel.org/kvm/20220429183935.1094599-1-dmatlack@google.com/

David Matlack (10):
  KVM: selftests: Replace x86_page_size with PG_LEVEL_XX
  KVM: selftests: Add option to create 2M and 1G EPT mappings
  KVM: selftests: Drop stale function parameter comment for nested_map()
  KVM: selftests: Refactor nested_map() to specify target level
  KVM: selftests: Move VMX_EPT_VPID_CAP_AD_BITS to vmx.h
  KVM: selftests: Add a helper to check EPT/VPID capabilities
  KVM: selftests: Link selftests directly with lib object files
  KVM: selftests: Drop unnecessary rule for $(LIBKVM_OBJS)
  KVM: selftests: Clean up LIBKVM files in Makefile
  KVM: selftests: Add option to run dirty_log_perf_test vCPUs in L2

 tools/testing/selftests/kvm/Makefile          |  49 ++++--
 .../selftests/kvm/dirty_log_perf_test.c       |  10 +-
 .../selftests/kvm/include/perf_test_util.h    |   7 +
 .../selftests/kvm/include/x86_64/processor.h  |  21 +--
 .../selftests/kvm/include/x86_64/vmx.h        |   5 +
 .../selftests/kvm/lib/perf_test_util.c        |  29 +++-
 .../selftests/kvm/lib/x86_64/perf_test_util.c |  98 ++++++++++++
 .../selftests/kvm/lib/x86_64/processor.c      |  33 ++--
 tools/testing/selftests/kvm/lib/x86_64/vmx.c  | 147 +++++++++++-------
 .../selftests/kvm/max_guest_memory_test.c     |   2 +-
 .../selftests/kvm/x86_64/mmu_role_test.c      |   2 +-
 11 files changed, 300 insertions(+), 103 deletions(-)
 create mode 100644 tools/testing/selftests/kvm/lib/x86_64/perf_test_util.c


base-commit: a3808d88461270c71d3fece5e51cc486ecdac7d0