From: isaku.yamahata@intel.com
To: kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: isaku.yamahata@intel.com, isaku.yamahata@gmail.com,
Paolo Bonzini <pbonzini@redhat.com>,
Sean Christopherson <seanjc@google.com>,
David Matlack <dmatlack@google.com>
Subject: [RFC PATCH v2 01/15] KVM: TDP_MMU: Go to next level if smaller private mapping exists
Date: Thu, 8 Dec 2022 15:35:36 -0800 [thread overview]
Message-ID: <e3677733e596a869a72d284401bc87d950cb1fbd.1670541736.git.isaku.yamahata@intel.com> (raw)
In-Reply-To: <cover.1670541736.git.isaku.yamahata@intel.com>
From: Xiaoyao Li <xiaoyao.li@intel.com>
Cannot map a private page as large page if any smaller mapping exists.
It has to wait for all the not-mapped smaller page to be mapped and
promote it to larger mapping.
Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com>
---
arch/x86/kvm/mmu/tdp_mmu.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/x86/kvm/mmu/tdp_mmu.c b/arch/x86/kvm/mmu/tdp_mmu.c
index 65b9af33a0eb..cb36089a40da 100644
--- a/arch/x86/kvm/mmu/tdp_mmu.c
+++ b/arch/x86/kvm/mmu/tdp_mmu.c
@@ -1373,7 +1373,8 @@ int kvm_tdp_mmu_map(struct kvm_vcpu *vcpu, struct kvm_page_fault *fault)
tdp_mmu_for_each_pte(iter, mmu, is_private, raw_gfn, raw_gfn + 1) {
int r;
- if (fault->nx_huge_page_workaround_enabled)
+ if (fault->nx_huge_page_workaround_enabled ||
+ kvm_gfn_shared_mask(vcpu->kvm))
disallowed_hugepage_adjust(fault, iter.old_spte, iter.level);
if (iter.level == fault->goal_level)
--
2.25.1
next prev parent reply other threads:[~2022-12-08 23:36 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-08 23:35 [RFC PATCH v2 00/15] KVM TDX: TDP MMU: large page support isaku.yamahata
2022-12-08 23:35 ` isaku.yamahata [this message]
2022-12-08 23:35 ` [RFC PATCH v2 02/15] KVM: TDX: Pass page level to cache flush before TDX SEAMCALL isaku.yamahata
2022-12-08 23:35 ` [RFC PATCH v2 03/15] KVM: TDX: Pass KVM page level to tdh_mem_page_add() and tdh_mem_page_aug() isaku.yamahata
2022-12-08 23:35 ` [RFC PATCH v2 04/15] KVM: TDX: Pass size to tdx_measure_page() isaku.yamahata
2022-12-08 23:35 ` [RFC PATCH v2 05/15] KVM: TDX: Pass size to reclaim_page() isaku.yamahata
2022-12-08 23:35 ` [RFC PATCH v2 06/15] KVM: TDX: Update tdx_sept_{set,drop}_private_spte() to support large page isaku.yamahata
2022-12-08 23:35 ` [RFC PATCH v2 07/15] KVM: MMU: Introduce level info in PFERR code isaku.yamahata
2022-12-08 23:35 ` [RFC PATCH v2 08/15] KVM: TDX: Pin pages via get_page() right before ADD/AUG'ed to TDs isaku.yamahata
2022-12-08 23:35 ` [RFC PATCH v2 09/15] KVM: TDX: Pass desired page level in err code for page fault handler isaku.yamahata
2022-12-08 23:35 ` [RFC PATCH v2 10/15] KVM: x86/tdp_mmu: Split the large page when zap leaf isaku.yamahata
2022-12-08 23:35 ` [RFC PATCH v2 11/15] KVM: x86/tdp_mmu, TDX: Split a large page when 4KB page within it converted to shared isaku.yamahata
2022-12-08 23:35 ` [RFC PATCH v2 12/15] KVM: x86/tdp_mmu: Try to merge pages into a large page isaku.yamahata
2022-12-08 23:35 ` [RFC PATCH v2 13/15] KVM: x86/tdp_mmu: TDX: Implement " isaku.yamahata
2022-12-08 23:35 ` [RFC PATCH v2 14/15] KVM: x86/mmu: Make kvm fault handelr aware of large page of private memslot isaku.yamahata
2022-12-08 23:35 ` [RFC PATCH v2 15/15] KVM: TDX: Allow 2MB large page for TD GUEST isaku.yamahata
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=e3677733e596a869a72d284401bc87d950cb1fbd.1670541736.git.isaku.yamahata@intel.com \
--to=isaku.yamahata@intel.com \
--cc=dmatlack@google.com \
--cc=isaku.yamahata@gmail.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--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®