On Mon, Jul 7, 2025 at 4:25 PM Sean Christopherson <seanjc@xxxxxxxxxx> wrote: > > On Tue, Jul 01, 2025, Vishal Annapurve wrote: > > I would be curious to understand if we need zeroing on conversion for > > Confidential VMs. If not, then the simple rule of zeroing on > > allocation only will work for all usecases. > > Unless I'm misunderstanding what your asking, pKVM very specific does NOT want > zeroing on conversion, because one of its use cases is in-place conversion, e.g. > to fill a shared buffer and then convert it to private so that the buffer can be > processed in the TEE. Yeah, that makes sense. So "just zero on allocation" (and no more zeroing during conversion) policy will work for pKVM. > > 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.