[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aXHWn411DKY3fYWo@yzhao56-desk.sh.intel.com>
Date: Thu, 22 Jan 2026 15:49:51 +0800
From: Yan Zhao <yan.y.zhao@...el.com>
To: "Huang, Kai" <kai.huang@...el.com>
CC: "seanjc@...gle.com" <seanjc@...gle.com>, "Du, Fan" <fan.du@...el.com>,
"kvm@...r.kernel.org" <kvm@...r.kernel.org>, "Li, Xiaoyao"
<xiaoyao.li@...el.com>, "Hansen, Dave" <dave.hansen@...el.com>,
"thomas.lendacky@....com" <thomas.lendacky@....com>, "tabba@...gle.com"
<tabba@...gle.com>, "vbabka@...e.cz" <vbabka@...e.cz>, "david@...nel.org"
<david@...nel.org>, "michael.roth@....com" <michael.roth@....com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"binbin.wu@...ux.intel.com" <binbin.wu@...ux.intel.com>,
"pbonzini@...hat.com" <pbonzini@...hat.com>, "Peng, Chao P"
<chao.p.peng@...el.com>, "ackerleytng@...gle.com" <ackerleytng@...gle.com>,
"kas@...nel.org" <kas@...nel.org>, "nik.borisov@...e.com"
<nik.borisov@...e.com>, "Weiny, Ira" <ira.weiny@...el.com>,
"francescolavra.fl@...il.com" <francescolavra.fl@...il.com>, "Yamahata,
Isaku" <isaku.yamahata@...el.com>, "sagis@...gle.com" <sagis@...gle.com>,
"Gao, Chao" <chao.gao@...el.com>, "Edgecombe, Rick P"
<rick.p.edgecombe@...el.com>, "Miao, Jun" <jun.miao@...el.com>, "Annapurve,
Vishal" <vannapurve@...gle.com>, "jgross@...e.com" <jgross@...e.com>,
"pgonda@...gle.com" <pgonda@...gle.com>, "x86@...nel.org" <x86@...nel.org>
Subject: Re: [PATCH v3 19/24] KVM: x86: Introduce per-VM external cache for
splitting
On Thu, Jan 22, 2026 at 03:30:16PM +0800, Huang, Kai wrote:
> > >
> > > > Then we can define a structure which contains DPAMT pages for a given 2M
> > > > range:
> > > >
> > > > struct tdx_dmapt_metadata {
> > > > struct page *page1;
> > > > struct page *page2;
> > > > };
> >
> > Note: we need 4 pages to split a 2MB range, 2 for the new S-EPT page, 2 for the
> > 2MB guest memory range.
>
> In this proposal the pair for S-EPT is already handled by tdx_alloc_page()
> (or tdx_alloc_control_page()):
>
> sp->external_spt = tdx_alloc_page();
Oh, ok.
So, in the fault path, sp->external_spt and sp->leaf_level_private are from
fault cache.
In the non-vCPU split path, sp->external_spt is from tdx_alloc_page(),
sp->leaf_level_private is from 2 get_zeroed_page() (or the count is from an
x86_kvm hook ?)
Powered by blists - more mailing lists