[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aNssIWsngqxQCd9i@yzhao56-desk.sh.intel.com>
Date: Tue, 30 Sep 2025 09:02:25 +0800
From: Yan Zhao <yan.y.zhao@...el.com>
To: Rick Edgecombe <rick.p.edgecombe@...el.com>
CC: <kas@...nel.org>, <bp@...en8.de>, <chao.gao@...el.com>,
<dave.hansen@...ux.intel.com>, <isaku.yamahata@...el.com>,
<kai.huang@...el.com>, <kvm@...r.kernel.org>, <linux-coco@...ts.linux.dev>,
<linux-kernel@...r.kernel.org>, <mingo@...hat.com>, <pbonzini@...hat.com>,
<seanjc@...gle.com>, <tglx@...utronix.de>, <x86@...nel.org>,
<vannapurve@...gle.com>
Subject: Re: [PATCH v3 11/16] KVM: TDX: Add x86 ops for external spt cache
On Thu, Sep 18, 2025 at 04:22:19PM -0700, Rick Edgecombe wrote:
> if (kvm_has_mirrored_tdp(vcpu->kvm)) {
> - r = kvm_mmu_topup_memory_cache(&vcpu->arch.mmu_external_spt_cache,
> - PT64_ROOT_MAX_LEVEL);
> + r = kvm_x86_call(topup_external_fault_cache)(vcpu);
Another concern about the topup op is that it entirely hides the page count from
KVM mmu core and assumes the page table level KVM requests is always
PT64_ROOT_MAX_LEVEL.
This assumption will not hold true for split cache for huge pages, where only
a single level is needed and memory for sp, sp->spt, and sp->external_spt does
not need to be allocated from the split cache. [1].
[1] https://lore.kernel.org/all/20250807094604.4762-1-yan.y.zhao@intel.com/
Powered by blists - more mailing lists