[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aWpn8pZrPVyTcnYv@google.com>
Date: Fri, 16 Jan 2026 08:31:46 -0800
From: Sean Christopherson <seanjc@...gle.com>
To: Rick P Edgecombe <rick.p.edgecombe@...el.com>
Cc: Dave Hansen <dave.hansen@...el.com>, "kvm@...r.kernel.org" <kvm@...r.kernel.org>,
Fan Du <fan.du@...el.com>, Xiaoyao Li <xiaoyao.li@...el.com>, Kai Huang <kai.huang@...el.com>,
Yan Y Zhao <yan.y.zhao@...el.com>, "thomas.lendacky@....com" <thomas.lendacky@....com>,
"vbabka@...e.cz" <vbabka@...e.cz>, "tabba@...gle.com" <tabba@...gle.com>, "david@...nel.org" <david@...nel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, "kas@...nel.org" <kas@...nel.org>,
Ira Weiny <ira.weiny@...el.com>, "pbonzini@...hat.com" <pbonzini@...hat.com>,
"francescolavra.fl@...il.com" <francescolavra.fl@...il.com>,
"ackerleytng@...gle.com" <ackerleytng@...gle.com>, "nik.borisov@...e.com" <nik.borisov@...e.com>,
"binbin.wu@...ux.intel.com" <binbin.wu@...ux.intel.com>, Isaku Yamahata <isaku.yamahata@...el.com>,
Chao P Peng <chao.p.peng@...el.com>, "michael.roth@....com" <michael.roth@....com>,
Vishal Annapurve <vannapurve@...gle.com>, "sagis@...gle.com" <sagis@...gle.com>, Chao Gao <chao.gao@...el.com>,
Jun Miao <jun.miao@...el.com>, "jgross@...e.com" <jgross@...e.com>,
"pgonda@...gle.com" <pgonda@...gle.com>, "x86@...nel.org" <x86@...nel.org>
Subject: Re: [PATCH v3 00/24] KVM: TDX huge page support for private memory
On Fri, Jan 16, 2026, Rick P Edgecombe wrote:
> On Wed, 2026-01-14 at 16:19 -0800, Sean Christopherson wrote:
> > I've no objection if e.g. tdh_mem_page_aug() wants to sanity check
> > that a PFN is backed by a struct page with a valid refcount, it's
> > code like that above that I don't want.
>
> Dave wants safety for the TDX pages getting handed to the module.
Define "safety". As I stressed earlier, blinding retrieving a "struct page" and
dereferencing that pointer is the exact opposite of safe.
> 2. Invent a new tdx_page_t type.
Still doesn't provide meaningful safety. Regardless of what type gets passed
into the low level tdh_*() helpers, it's going to require KVM to effectively cast
a bare pfn, because I am completely against passing anything other than a SPTE
to tdx_sept_set_private_spte().
> 1. Page is TDX capable memory
That's fine by me, but that's _very_ different than what was proposed here.
Powered by blists - more mailing lists