From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f73.google.com (mail-pj1-f73.google.com [209.85.216.73]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5E2BA21D3CA for ; Mon, 7 Jul 2025 23:25:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.73 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751930717; cv=none; b=CzOw1ACb77f0wQR7g3bEGmxxxAccyS4i2PScX8ZZreNzZv/glJ96jnPMTP6b+KwGjt1q/prB2Boh9XqDViZLLpeW5rRpHK/zFGejvm+to7ZrTk+GZ23cYJm9kkXFPjz2lRgKD5IFafpJ/nH4yH7ManaztjMhTokh4pAboLE7WUY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751930717; c=relaxed/simple; bh=JHbksS7Ik6LaoWpSJU26eNZHwnoWAXLMnPu9PY2UpqE=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=LsZpTcWod3HTxJOy6yg06qOgxaLq8BGRt7sZYe6u5tHgAnbRRSc3C16T6I9OvFl7PM0xoxvj5NY2MoO3YZrBQrAFn1sX2ge6l1X0Vjdf5b7he7kpar463dF3BKHFSM3uSPtCHbp1AyCyIb3zc4cDBvcFegaKNbMW/uHbIEhRVbE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=hBKybkcB; arc=none smtp.client-ip=209.85.216.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="hBKybkcB" Received: by mail-pj1-f73.google.com with SMTP id 98e67ed59e1d1-31215090074so5978466a91.0 for ; Mon, 07 Jul 2025 16:25:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1751930716; x=1752535516; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=JHbksS7Ik6LaoWpSJU26eNZHwnoWAXLMnPu9PY2UpqE=; b=hBKybkcB3e5Dt9TDYEYCScfGA6befovCy1IXOtsYuFtk4kqSyhdThoQM1eaDZs6Npc hzFkjzoXBSZ+hv6Vly9GVeAiMpdSt7qnxiiapTBqD5GOE6hraA5+JfqndWL9P1eOO05a ZAGbBlERJDeYA09NI/Mee514Pufi8wJ/LOUwc49eCD2QIbirV8sLbvsj3b0i/kwh+Vna KqTGp6ItLIyR51mEpsZjrpxiUTCMHZfklFd3LZHy6AfM7u1ZYF2a70Lw5TfyH7S9FHAY q0tEix/1rSp5ZDBJBa8NYhThcKdYkj/sIw++MF/MaZIPkWoCLSeSZP3V91nwMfYi/iYx nxcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1751930716; x=1752535516; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=JHbksS7Ik6LaoWpSJU26eNZHwnoWAXLMnPu9PY2UpqE=; b=ePzrzLuSUyWmJfxpMC8+G5vwMJcoTO9WJdvaL2k4B58hrgxIjcNYJozeNyYRiYSCVS 32oM9id4D58eR15Svv8Z3WzbiZBu7lY1yriJ7JPAcHGdTa3EVigXWexIlV8icLpZc3sN dgu3vR0sedQzYJau1bMjh60nCfPcyuLGBMMKgp0hJw51vA1mYDuVA4fMxfAXnTyyWNo7 BuCtF07JNihGwXd+g5rgHo6rSGG0fa5yI4JFNzPx8PrhyaCPAANk+9pTsztGIc/zqDG7 tOtKUiwUr9SBaA9QmIYjg6Dq3o68/K5Y2Z87/bZIrVjPH/dH9AUNh0lEmoTk8bYyIsjJ I0gQ== X-Forwarded-Encrypted: i=1; AJvYcCWTe9y5/e+t849TEVYlaTXUEkjUncTv8xyseOS+EtBxcXCy4gB1lVbzkunwE7d9Vwsaa6XQInnFxrMuaHM=@vger.kernel.org X-Gm-Message-State: AOJu0YynRhUqSVOTzKGA9bXdAIjlpY7oiRKmsrgrcljsPxe55zNwPhO0 1Wx9hgQRoDsuN68z3A7oLNbCfYFYYSPJeK2D/UrKMKXQVPDpDX3M3UOpEAXdBlTD95MO5y9Kf+I YBa8nBw== X-Google-Smtp-Source: AGHT+IHec07vkrbcNzUBZe/F6EmhpBPtyl7Ef0BOzGMA51wQ8QB8Pn/cPlRz3g6O/7DZmfJqJVUpfLdRuGc= X-Received: from pjbqx14.prod.google.com ([2002:a17:90b:3e4e:b0:312:e914:4548]) (user=seanjc job=prod-delivery.src-stubby-dispatcher) by 2002:a17:90b:37c8:b0:311:ab20:159d with SMTP id 98e67ed59e1d1-31aadd9ce5bmr19229725a91.19.1751930715704; Mon, 07 Jul 2025 16:25:15 -0700 (PDT) Date: Mon, 7 Jul 2025 16:25:14 -0700 In-Reply-To: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: Message-ID: Subject: Re: [RFC PATCH v2 00/51] 1G page support for guest_memfd From: Sean Christopherson To: Vishal Annapurve Cc: Yan Zhao , Xiaoyao Li , Ackerley Tng , kvm@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, x86@kernel.org, linux-fsdevel@vger.kernel.org, aik@amd.com, ajones@ventanamicro.com, akpm@linux-foundation.org, amoorthy@google.com, anthony.yznaga@oracle.com, anup@brainfault.org, aou@eecs.berkeley.edu, bfoster@redhat.com, binbin.wu@linux.intel.com, brauner@kernel.org, catalin.marinas@arm.com, chao.p.peng@intel.com, chenhuacai@kernel.org, dave.hansen@intel.com, david@redhat.com, dmatlack@google.com, dwmw@amazon.co.uk, erdemaktas@google.com, fan.du@intel.com, fvdl@google.com, graf@amazon.com, haibo1.xu@intel.com, hch@infradead.org, hughd@google.com, ira.weiny@intel.com, isaku.yamahata@intel.com, jack@suse.cz, james.morse@arm.com, jarkko@kernel.org, jgg@ziepe.ca, jgowans@amazon.com, jhubbard@nvidia.com, jroedel@suse.de, jthoughton@google.com, jun.miao@intel.com, kai.huang@intel.com, keirf@google.com, kent.overstreet@linux.dev, kirill.shutemov@intel.com, liam.merwick@oracle.com, maciej.wieczor-retman@intel.com, mail@maciej.szmigiero.name, maz@kernel.org, mic@digikod.net, michael.roth@amd.com, mpe@ellerman.id.au, muchun.song@linux.dev, nikunj@amd.com, nsaenz@amazon.es, oliver.upton@linux.dev, palmer@dabbelt.com, pankaj.gupta@amd.com, paul.walmsley@sifive.com, pbonzini@redhat.com, pdurrant@amazon.co.uk, peterx@redhat.com, pgonda@google.com, pvorel@suse.cz, qperret@google.com, quic_cvanscha@quicinc.com, quic_eberman@quicinc.com, quic_mnalajal@quicinc.com, quic_pderrin@quicinc.com, quic_pheragu@quicinc.com, quic_svaddagi@quicinc.com, quic_tsoni@quicinc.com, richard.weiyang@gmail.com, rick.p.edgecombe@intel.com, rientjes@google.com, roypat@amazon.co.uk, rppt@kernel.org, shuah@kernel.org, steven.price@arm.com, steven.sistare@oracle.com, suzuki.poulose@arm.com, tabba@google.com, thomas.lendacky@amd.com, usama.arif@bytedance.com, vbabka@suse.cz, viro@zeniv.linux.org.uk, vkuznets@redhat.com, wei.w.wang@intel.com, will@kernel.org, willy@infradead.org, yilun.xu@intel.com, yuzenghui@huawei.com, zhiquan1.li@intel.com Content-Type: text/plain; charset="us-ascii" 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. 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.