From: David Matlack <dmatlack@google.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Sean Christopherson <seanjc@google.com>,
David Matlack <dmatlack@google.com>,
Ben Gardon <bgardon@google.com>,
Jim Mattson <jmattson@google.com>, Peter Xu <peterx@redhat.com>,
Yang Zhong <yang.zhong@intel.com>,
Wei Wang <wei.w.wang@intel.com>,
kvm@vger.kernel.org
Subject: [PATCH v2 0/3] KVM: selftests: Fix nx_huge_pages_test when TDP is disabled
Date: Wed, 28 Sep 2022 11:48:50 -0700 [thread overview]
Message-ID: <20220928184853.1681781-1-dmatlack@google.com> (raw)
This builds on the v1 fix for nx_huge_pages_test for TDP-disabled hosts.
Originally this was just 1 patch but now it is 3 to add the necessary
infrastructure to check if TDP is enabled or not so that we can
conditionally use 4KiB or 2MiB mappings in the test.
Sean, I opted not to refactor virt_map() to take nr_bytes since that
will take a bit more work than I have cycles for at the moment and I
want to get this fix in. That being said, I coded up the new
virt_map_level() using nr_bytes so that there will be less to clean up
in the future.
v2:
- 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@google.com/
David Matlack (3):
KVM: selftests: Tell the compiler that code after TEST_FAIL() is
unreachable
KVM: selftests: Add helper to read boolean module parameters
KVM: selftests: Fix nx_huge_pages_test on TDP-disabled hosts
.../testing/selftests/kvm/include/test_util.h | 7 +++-
.../selftests/kvm/include/x86_64/processor.h | 4 ++
tools/testing/selftests/kvm/lib/test_util.c | 31 ++++++++++++++
.../selftests/kvm/lib/x86_64/processor.c | 40 +++++++++++++------
.../selftests/kvm/x86_64/nx_huge_pages_test.c | 19 ++++++++-
5 files changed, 85 insertions(+), 16 deletions(-)
base-commit: 372d07084593dc7a399bf9bee815711b1fb1bcf2
prerequisite-patch-id: 2e3661ba8856c29b769499bac525b6943d9284b8
--
2.37.3.998.g577e59143f-goog
next reply other threads:[~2022-09-28 18:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-28 18:48 David Matlack [this message]
2022-09-28 18:48 ` [PATCH v2 1/3] KVM: selftests: Tell the compiler that code after TEST_FAIL() is unreachable David Matlack
2022-09-28 18:48 ` [PATCH v2 2/3] KVM: selftests: Add helper to read boolean module parameters David Matlack
2022-09-28 22:51 ` Sean Christopherson
2022-09-29 16:18 ` David Matlack
2022-09-28 18:48 ` [PATCH v2 3/3] KVM: selftests: Fix nx_huge_pages_test on TDP-disabled hosts David Matlack
2022-09-28 22:55 ` Sean Christopherson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220928184853.1681781-1-dmatlack@google.com \
--to=dmatlack@google.com \
--cc=bgardon@google.com \
--cc=jmattson@google.com \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=peterx@redhat.com \
--cc=seanjc@google.com \
--cc=wei.w.wang@intel.com \
--cc=yang.zhong@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox