From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.160.174 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1794835376; b=zDbxIiKkk0qMMiTsSZSWOpai4jNkOBCB5EJmsKvUKSTfy0igsQTp7VKtsoTEXSjlPrFh 29uQlN/nysFINmIglAS6LYSimoowF9Igzc77pLrNuCadMIcstdubXvT4NMQ5XE+ZI5bEN j4hXCQ/kcf97DvvmOj5wkXFABp8e+7hj3gYvo7G8cyi+RCM6hMh1FgOlI88EfY0+f396i nhbTAeU7C+fylm+IvC/4kGLBoNilJ3VzhvzLL0vatQRZkMA4HRGDTSqsj3Td0Z5TLuWQc tfIvWAbCaIC9sX9FK29yVtePxa6icy2xLWbitNrWjrPnQMJxrPFOsK+C1M7yLeF2rKA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794835376; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: Received:Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; bh=Ip0og70Tt8f+28eOZ5F6oTc6DjrtMrQ1wymW+Uokrdw=; b=m58pej5E74i866+NEet1sKNStdsancVcApuBOWNXOjvHuCJ38VQUqypqD4KJ3NfWzBge zk43A142LiUR/saJKnXwvEiRBkec0mwLc5DnWJDPywK70VGQum3QWle2XaDFqj4YzRr59 OohUTzXMoj3jlQWfVTY5si3GXzcfQoi07j1leOx1E8CGMCikoXHtOJj5qmqNol4j6COc1 kRVK8kKWYK4twYDJAL3zLBu73fQT9YdzCCGfHEIGL1Kyg4p2liuiTVmMgCWWuTifRW8xQ 3MojHMQVjR/XHAIfCyBGEhBnv4XNV5jAv3lDGHkcP1E0DUOQd7vVmcsukABwGbvOtEQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none header.from=ziepe.ca; spf=pass smtp.mailfrom=ziepe.ca; dkim=pass header.d=ziepe.ca header.i=@ziepe.ca header.a=rsa-sha256 header.s=google header.b="CubF/Gca"; arc=none smtp.remote-ip=209.85.160.174 Received: from mail-qt1-f174.google.com (mail-qt1-f174.google.com [209.85.160.174]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 97A73606A332 for ; Mon, 16 Nov 2026 13:22:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 97A73606A332 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ziepe.ca Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.a=rsa-sha256 header.s=google header.b=CubF/Gca Received: by mail-qt1-f174.google.com with SMTP id d75a77b69052e-55bd96affd2so33972501cf.1 for ; Mon, 16 Nov 2026 05:22:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; t=1794835375; x=1795440175; darn=lists.linux.dev; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=Ip0og70Tt8f+28eOZ5F6oTc6DjrtMrQ1wymW+Uokrdw=; b=CubF/GcaiGFCo3GZWG2pELmqF4rZ40ATX0kx85qe7Z8AAvQlvgHscvAGv6ruClcDvS oeFYKBO9uR/eExr/GZz6leE7D36V+SFmt3HFGpNGIrKY/YHYJVm1fi8VoWVYykbIJTMq zle9F8jweprPSbgzRjCw8luh0sWSgzLHNKO+QzIFtvkDzLPvzPQc7ZGWOZdG6mhpnMPP Gw0JpzaMQLs4DL9i12WoXZgMbeKDGd82gEw3YDpuezYDws1mr9HVhQGlrn1w3BPIyqsF J6EkL1pwH2dTo8otz19u6MQjuEPvZIC8iEiP6O5tvGkeLkFEYS9KJrn5M7yn5Fjdf+Sf veVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1794835375; x=1795440175; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=Ip0og70Tt8f+28eOZ5F6oTc6DjrtMrQ1wymW+Uokrdw=; b=0S4Tdv7xDjU+JseVsPaoTJp+R08THqIX7IhqESdozF8e58cgGkIvmtNqFmn9g5Pj+y Xq1sxto6CbOPXLuN/P+wSO4bw4+JlQlwuS51L28soP/56wKobr1qfN1ulyWbpX6FhBOi K199DaxTbmwALRDtoDNE29N2XtRUUShnEfdpsdzKNt1cdRC38lI78KxLHCNH1REUm8QW e/7DMtmJLsVISVDM8XS2XMFGA2NjpF/J2r3TCVbCdz+jGOM5Tq+tRjpBXyj0X07bI2Pu w+0NvnuYavuS0OovBc9YEM3aE2pjysC+lhuRaQe9aRNf5BoiwAMygmsRKI9eMLP44Xov jHEg== X-Forwarded-Encrypted: i=1; AL+hErE1Hr2/XocMGV30A+8+CYnFyxjqK5p6A69PEh8p0cuwk9S/p46nNQ3YNarro78W12KDhPhB6i/KJ4Pc@lists.linux.dev X-Gm-Message-State: APuU4Z+9wVz5MvtiSIlpME5ZhRbgjJ65UDQQjU2LuTXoBZ/q7EveexGX ZjUOSv66N4ZlsRa/0plXHs1r3T67l1a6/VeR/jff8uCDccRAWSOnLy9kv3LejnXLtfg= X-Gm-Gg: AYBFou1RShwfBcHbt6MIicZtLvmKvO5QI69X7psggyoN5RqP7l/agNw4g1R4y1dmG57 KAwKNyAM6Xi2cSfcBCLF/0lTCv6OOexB0qiPWxB0JHDXIY35SrJ7imKVmiCGdemSNLzSkJ4ZtgW wuDZlrSkoYCfcpwJ1/wjqwcz0/n+x0uQM7dyS1DZWLbkX9A94MOqZgoN2ylWXSqukCMfef6GS9X UtCmiPo8fbJ5vubgLuG2rHDgiKJcj0J3CszjHzsrPjjYYoyZx7ururm+IlQliJ3274oNSVZcJCS yDyLJk+6mgBczlYoN8ACrSjmVLGdL7qdZhZJiRMKiK9JySAW1ErS1xDwZeIw9tRjHQEYeUO1tCC BeWGq/nrZfwcX8Af5vqgiwWNXO8cDKanQ4DnPmDH6V8MvOOdLbiefVqQMeVRCvkEn5aew5uQpzX m8myEUq6hfzJ6hTwfZpQtj3DLt+Mjf4iHrFiCXZVGS+iDLAjGqFuVkSdQURHeiaZAAf2P2SiCB+ pEcWV7jbt+cNNz8+fifhfiASd1umJRfUOSRgMJqC1iVcwzX7gQ/AJTJzBBvqu9sL8BDc2lcyqRA PHBM7Q== X-Received: by 2002:a05:622a:e190:20b0:55b:9d8d:f29e with SMTP id d75a77b69052e-55b9d8df528mr93734571cf.9.1794835373441; Mon, 16 Nov 2026 05:22:53 -0800 (PST) Received: from ziepe.ca ([142.166.156.71]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-55ad0f07afesm80824241cf.16.2026.11.16.05.22.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Nov 2026 05:22:52 -0800 (PST) Received: from jgg by wakko with local (Exim 4.97) (envelope-from ) id 1xSwfb-00000009Kvw-33KL; Mon, 16 Nov 2026 09:22:51 -0400 Date: Mon, 16 Nov 2026 09:22:51 -0400 From: Jason Gunthorpe To: Suzuki K Poulose Cc: "Aneesh Kumar K.V (Arm)" , linux-coco@lists.linux.dev, Andrew Morton , Baoquan He , Mike Rapoport , Pasha Tatashin , Pratyush Yadav , Catalin Marinas , Christian =?utf-8?B?S8O2bmln?= , Joerg Roedel , Marc Zyngier , Marek Szyprowski , Robin Murphy , Steven Price , Sumit Semwal , Thomas Gleixner , Will Deacon , Russell King , Benjamin Gaignard , Brian Starkey , John Stultz , Mark Rutland , Radu Rendec , "T.J. Mercier" , Madhavan Srinivasan , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Ritesh Harjani , Shrikanth Hegde , Alexander Gordeev , Gerald Schaefer , Heiko Carstens , Vasily Gorbik , Christian Borntraeger , Sven Schnelle , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H . Peter Anvin" , Kiryl Shutsemau , Rick Edgecombe , "K . Y . Srinivasan" , Haiyang Zhang , Wei Liu , Dexuan Cui , Long Li , Paolo Bonzini , Vitaly Kuznetsov , Andy Lutomirski , Peter Zijlstra , dri-devel@lists.freedesktop.org, iommu@lists.linux.dev, linaro-mm-sig@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org, linux-mm@kvack.org, kvmarm@lists.linux.dev, patches@lists.linux.dev, Alexey Kardashevskiy , Michael Roth , pankaj.gupta@amd.com Subject: Re: [PATCH v10 00/13] coco: guest: Add a shared-granule allocator for host-shared memory Message-ID: <20261116132251.GJ2532299@ziepe.ca> References: <20261116091137.94252-1-aneesh.kumar@kernel.org> <0524abf4-2306-4046-aade-c23aa7d1e0e6@arm.com> X-Mailing-List: linux-coco@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0524abf4-2306-4046-aade-c23aa7d1e0e6@arm.com> On Mon, Nov 16, 2026 at 10:09:35AM +0000, Suzuki K Poulose wrote: > Cc Michael Roth, Alexey, Pankaj Gupta > > On 16/11/2026 09:11, Aneesh Kumar K.V (Arm) wrote: > > > > This series tightens the alignment requirements for buffers that are shared > > between confidential-computing guests and the host, and adds a common > > allocator for host-shared memory. > > > > When a guest runs with private memory, buffers shared with the hypervisor > > are not only accessed by the guest. They are also accessed by the host > > kernel, and the host may manage the corresponding shared/private state at a > > granularity larger than the guest page size. > > > > Architectures such as Arm can detect incorrect accesses to Realm physical > > address space PFNs through GPC faults. However, relying on that as the only > > line of defence is fragile and can still lead to kernel crashes. The risk > > is especially visible for shared buffers that are later mmapped into > > userspace, such as guest_memfd or dma-buf backed allocations. Once > > userspace can access the mapping, the kernel cannot guarantee that > > applications will only touch the intended 4K region rather than the whole > > host page mapped into their address space. Those userspace addresses may > > also be passed back into the kernel and accessed through the linear map, > > resulting in a GPC fault. > > IIUC, AMD SEV-SNP also has a similar requirement for other reasons, to > align the "shared" allocations within a guest (2MB ?, as mentioned by > David Kaplan at the LPC). > > Michael, Alexey, > > Please could you share your thoughts on this series ? Yes, I think we concluded at LPC that AMD should use this series with a 2MB setting rather than try to do their HW assisted smash/unsmash Jason