From: Fred Griffoul <griffoul@gmail.com>
To: Sean Christopherson <seanjc@google.com>,
Paolo Bonzini <pbonzini@redhat.com>
Cc: Mushahid Hussain <hmushi@amazon.co.uk>,
James Houghton <jthoughton@google.com>,
nh-open-source@amazon.com, kvm@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [RFC PATCH 4/5] KVM: selftests: Declare __tdp_map() in the x86 processor header
Date: Wed, 4 Nov 2026 00:53:30 +0000 [thread overview]
Message-ID: <20261104005331.50600-5-griffoul@gmail.com> (raw)
In-Reply-To: <20261104005331.50600-1-griffoul@gmail.com>
From: Fred Griffoul <fgriffo@amazon.co.uk>
Tests can only map L2 memory with 4 KiB or 1 GiB pages in the TDP page
tables L1 uses for L2, because only tdp_map() and tdp_identity_map_1g()
are declared. Declare __tdp_map(), which takes the page size, so that
tests can also use 2 MiB pages.
Signed-off-by: Fred Griffoul <fgriffo@amazon.co.uk>
---
tools/testing/selftests/kvm/include/x86/processor.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/testing/selftests/kvm/include/x86/processor.h b/tools/testing/selftests/kvm/include/x86/processor.h
index 5898a277a2e0..66293e448ab2 100644
--- a/tools/testing/selftests/kvm/include/x86/processor.h
+++ b/tools/testing/selftests/kvm/include/x86/processor.h
@@ -1613,6 +1613,7 @@ void virt_map_level(struct kvm_vm *vm, gva_t gva, gpa_t gpa,
void vm_enable_tdp(struct kvm_vm *vm);
bool kvm_cpu_has_tdp(void);
+void __tdp_map(struct kvm_vm *vm, gpa_t l2_gpa, gpa_t gpa, u64 size, int level);
void tdp_map(struct kvm_vm *vm, gpa_t l2_gpa, gpa_t gpa, u64 size);
void tdp_identity_map_default_memslots(struct kvm_vm *vm);
void tdp_identity_map_1g(struct kvm_vm *vm, u64 addr, u64 size);
--
2.47.3
next prev parent reply other threads:[~2026-11-04 0:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-04 0:53 [RFC PATCH 0/5] KVM: x86/mmu: Allocate memslot rmaps on demand Fred Griffoul
2026-11-04 0:53 ` [RFC PATCH 1/5] KVM: x86/mmu: Walk memslot rmaps by index Fred Griffoul
2026-11-04 0:53 ` [RFC PATCH 2/5] KVM: x86: Count rmaps per level in a debugfs helper Fred Griffoul
2026-11-04 0:53 ` [RFC PATCH 3/5] KVM: x86/mmu: Allocate memslot rmaps in on-demand chunks Fred Griffoul
2026-11-04 0:53 ` Fred Griffoul [this message]
2026-11-04 0:53 ` [RFC PATCH 5/5] KVM: selftests: Test dirty logging of sparse nested mappings Fred Griffoul
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=20261104005331.50600-5-griffoul@gmail.com \
--to=griffoul@gmail.com \
--cc=hmushi@amazon.co.uk \
--cc=jthoughton@google.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nh-open-source@amazon.com \
--cc=pbonzini@redhat.com \
--cc=seanjc@google.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
all inboxes | Powered by JetHome®