[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <489d219318944a7fd0bb7ebe6a58835943a9d684.camel@intel.com>
Date: Wed, 14 May 2025 22:13:54 +0000
From: "Huang, Kai" <kai.huang@...el.com>
To: "tglx@...utronix.de" <tglx@...utronix.de>, "peterz@...radead.org"
<peterz@...radead.org>, "mingo@...hat.com" <mingo@...hat.com>, "Hansen, Dave"
<dave.hansen@...el.com>, "bp@...en8.de" <bp@...en8.de>
CC: "Edgecombe, Rick P" <rick.p.edgecombe@...el.com>, "seanjc@...gle.com"
<seanjc@...gle.com>, "x86@...nel.org" <x86@...nel.org>, "sagis@...gle.com"
<sagis@...gle.com>, "hpa@...or.com" <hpa@...or.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"kirill.shutemov@...ux.intel.com" <kirill.shutemov@...ux.intel.com>, "Chatre,
Reinette" <reinette.chatre@...el.com>, "pbonzini@...hat.com"
<pbonzini@...hat.com>, "Williams, Dan J" <dan.j.williams@...el.com>,
"Yamahata, Isaku" <isaku.yamahata@...el.com>, "ashish.kalra@....com"
<ashish.kalra@....com>, "thomas.lendacky@....com" <thomas.lendacky@....com>,
"nik.borisov@...e.com" <nik.borisov@...e.com>
Subject: Re: [PATCH v2.1 2/5] x86/virt/tdx: Mark memory cache state incoherent
when making SEAMCALL
On Wed, 2025-05-14 at 08:52 -0700, Hansen, Dave wrote:
> On 5/14/25 03:10, Kai Huang wrote:
> > Turn on that boolean when the kernel does SEAMCALL so that kexec can
> > correctly flush cache. Note not all SEAMCALL leaf functions generate
> > dirty cachelines of TDX private memory, but for simplicity, just treat
> > all of them do.
>
> It's not just for simplicity.
>
> There's no contract in place for when the TDX module will dirty memory
> or not. A call that is "clean" today might dirty memory tomorrow.
>
> The _only_ thing we know is that SEAMCALLs can dirty cachelines. We
> don't know when or how they do it. This blurb makes it sound like it's
> possible to optimize this. It's not.
I thought it should not be possible to generate dirty cachelines with TDX
private KeyIDs before the very first TDX KeyID (which is global KeyID) is
configured, but right I guess we'd better not assume that.
I'll remote the "Note ..." part. Thanks!
Powered by blists - more mailing lists