[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <006899ccedf93f45082390460620753090c01914.camel@intel.com>
Date: Tue, 8 Jul 2025 01:08:01 +0000
From: "Edgecombe, Rick P" <rick.p.edgecombe@...el.com>
To: "Annapurve, Vishal" <vannapurve@...gle.com>, "seanjc@...gle.com"
<seanjc@...gle.com>
CC: "palmer@...belt.com" <palmer@...belt.com>, "kvm@...r.kernel.org"
<kvm@...r.kernel.org>, "catalin.marinas@....com" <catalin.marinas@....com>,
"Miao, Jun" <jun.miao@...el.com>, "nsaenz@...zon.es" <nsaenz@...zon.es>,
"Shutemov, Kirill" <kirill.shutemov@...el.com>, "pdurrant@...zon.co.uk"
<pdurrant@...zon.co.uk>, "peterx@...hat.com" <peterx@...hat.com>,
"x86@...nel.org" <x86@...nel.org>, "amoorthy@...gle.com"
<amoorthy@...gle.com>, "jack@...e.cz" <jack@...e.cz>, "maz@...nel.org"
<maz@...nel.org>, "keirf@...gle.com" <keirf@...gle.com>, "pvorel@...e.cz"
<pvorel@...e.cz>, "anthony.yznaga@...cle.com" <anthony.yznaga@...cle.com>,
"mail@...iej.szmigiero.name" <mail@...iej.szmigiero.name>, "hughd@...gle.com"
<hughd@...gle.com>, "quic_eberman@...cinc.com" <quic_eberman@...cinc.com>,
"Wang, Wei W" <wei.w.wang@...el.com>, "Du, Fan" <fan.du@...el.com>,
"Wieczor-Retman, Maciej" <maciej.wieczor-retman@...el.com>, "Zhao, Yan Y"
<yan.y.zhao@...el.com>, "ajones@...tanamicro.com" <ajones@...tanamicro.com>,
"Hansen, Dave" <dave.hansen@...el.com>, "paul.walmsley@...ive.com"
<paul.walmsley@...ive.com>, "quic_mnalajal@...cinc.com"
<quic_mnalajal@...cinc.com>, "aik@....com" <aik@....com>,
"steven.price@....com" <steven.price@....com>, "vkuznets@...hat.com"
<vkuznets@...hat.com>, "fvdl@...gle.com" <fvdl@...gle.com>, "rppt@...nel.org"
<rppt@...nel.org>, "bfoster@...hat.com" <bfoster@...hat.com>,
"quic_cvanscha@...cinc.com" <quic_cvanscha@...cinc.com>, "vbabka@...e.cz"
<vbabka@...e.cz>, "anup@...infault.org" <anup@...infault.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"tabba@...gle.com" <tabba@...gle.com>, "mic@...ikod.net" <mic@...ikod.net>,
"oliver.upton@...ux.dev" <oliver.upton@...ux.dev>,
"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
"usama.arif@...edance.com" <usama.arif@...edance.com>,
"thomas.lendacky@....com" <thomas.lendacky@....com>, "muchun.song@...ux.dev"
<muchun.song@...ux.dev>, "binbin.wu@...ux.intel.com"
<binbin.wu@...ux.intel.com>, "Li, Zhiquan1" <zhiquan1.li@...el.com>,
"rientjes@...gle.com" <rientjes@...gle.com>, "Aktas, Erdem"
<erdemaktas@...gle.com>, "mpe@...erman.id.au" <mpe@...erman.id.au>,
"david@...hat.com" <david@...hat.com>, "jgg@...pe.ca" <jgg@...pe.ca>,
"willy@...radead.org" <willy@...radead.org>, "Xu, Haibo1"
<haibo1.xu@...el.com>, "jhubbard@...dia.com" <jhubbard@...dia.com>,
"quic_svaddagi@...cinc.com" <quic_svaddagi@...cinc.com>, "Yamahata, Isaku"
<isaku.yamahata@...el.com>, "jthoughton@...gle.com" <jthoughton@...gle.com>,
"steven.sistare@...cle.com" <steven.sistare@...cle.com>, "jarkko@...nel.org"
<jarkko@...nel.org>, "quic_pheragu@...cinc.com" <quic_pheragu@...cinc.com>,
"chenhuacai@...nel.org" <chenhuacai@...nel.org>, "Huang, Kai"
<kai.huang@...el.com>, "shuah@...nel.org" <shuah@...nel.org>,
"dwmw@...zon.co.uk" <dwmw@...zon.co.uk>, "Peng, Chao P"
<chao.p.peng@...el.com>, "pankaj.gupta@....com" <pankaj.gupta@....com>,
"Graf, Alexander" <graf@...zon.com>, "nikunj@....com" <nikunj@....com>,
"viro@...iv.linux.org.uk" <viro@...iv.linux.org.uk>, "pbonzini@...hat.com"
<pbonzini@...hat.com>, "yuzenghui@...wei.com" <yuzenghui@...wei.com>,
"jroedel@...e.de" <jroedel@...e.de>, "suzuki.poulose@....com"
<suzuki.poulose@....com>, "jgowans@...zon.com" <jgowans@...zon.com>, "Xu,
Yilun" <yilun.xu@...el.com>, "liam.merwick@...cle.com"
<liam.merwick@...cle.com>, "michael.roth@....com" <michael.roth@....com>,
"quic_tsoni@...cinc.com" <quic_tsoni@...cinc.com>, "Li, Xiaoyao"
<xiaoyao.li@...el.com>, "aou@...s.berkeley.edu" <aou@...s.berkeley.edu>,
"Weiny, Ira" <ira.weiny@...el.com>, "richard.weiyang@...il.com"
<richard.weiyang@...il.com>, "kent.overstreet@...ux.dev"
<kent.overstreet@...ux.dev>, "qperret@...gle.com" <qperret@...gle.com>,
"dmatlack@...gle.com" <dmatlack@...gle.com>, "james.morse@....com"
<james.morse@....com>, "brauner@...nel.org" <brauner@...nel.org>,
"linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>,
"ackerleytng@...gle.com" <ackerleytng@...gle.com>, "pgonda@...gle.com"
<pgonda@...gle.com>, "quic_pderrin@...cinc.com" <quic_pderrin@...cinc.com>,
"hch@...radead.org" <hch@...radead.org>, "linux-mm@...ck.org"
<linux-mm@...ck.org>, "will@...nel.org" <will@...nel.org>,
"roypat@...zon.co.uk" <roypat@...zon.co.uk>
Subject: Re: [RFC PATCH v2 00/51] 1G page support for guest_memfd
On Mon, 2025-07-07 at 17:14 -0700, Vishal Annapurve wrote:
> >
> > Some architectures, e.g. SNP and TDX, may effectively require zeroing on
> > conversion,
> > but that's essentially a property of the architecture, i.e. an arch/vendor
> > specific
> > detail.
>
> Conversion operation is a unique capability supported by guest_memfd
> files so my intention of bringing up zeroing was to better understand
> the need and clarify the role of guest_memfd in handling zeroing
> during conversion.
>
> Not sure if I am misinterpreting you, but treating "zeroing during
> conversion" as the responsibility of arch/vendor specific
> implementation outside of guest_memfd sounds good to me.
For TDX if we don't zero on conversion from private->shared we will be dependent
on behavior of the CPU when reading memory with keyid 0, which was previously
encrypted and has some protection bits set. I don't *think* the behavior is
architectural. So it might be prudent to either make it so, or zero it in the
kernel in order to not make non-architectual behavior into userspace ABI.
Up the thread Vishal says we need to support operations that use in-place
conversion (overloaded term now I think, btw). Why exactly is pKVM using
private/shared conversion for this private data provisioning? Instead of a
special provisioning operation like the others? (Xiaoyao's suggestion)
Powered by blists - more mailing lists