From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C87B5C46CA1 for ; Thu, 12 Oct 2023 14:30:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Ib15p18fXR9a3EL08AOb8pL9aw4mZ4zkPfBnXJbLGZk=; b=EfLZ4S7rEiEeJ4 uyvj+TfZ4alqzdLRlXbMI9ZdaIrLBxsUx6LdWK4jIyHIk4b/HlWZX78uXKfvkATrIyAehUvUNk15N O11BWChdZByPgp2XJsksYw9lFgAWUUo5uNrYcLqNC6OdRyMwmSjBnlN7FumlaX/9KWJUFpz4xqueT l2yxBTBqwCZQqs2g/GNDv3t9TVv2/UA2WcwFOCdSyBXCxBVRHMtgTZiFUlMcxuuogofMkP3VN9nA4 noxmUQtCFhuVNeL0CAKpRju0CPk27oJ3/iRVmPlJLA+Sk3wAOSYP6sny3KDEQ83ZCsifConTjUHpx VavN1aAAx1N3tGWyNtgg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qqwh1-001BXJ-0v; Thu, 12 Oct 2023 14:29:39 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qqwgy-001BWR-1y for linux-arm-kernel@lists.infradead.org; Thu, 12 Oct 2023 14:29:38 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 1406A61E32; Thu, 12 Oct 2023 14:29:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BD3C9C433C8; Thu, 12 Oct 2023 14:29:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1697120974; bh=g4zyIMr785IdKOmshRe8BPkyHz7FSyWBu6onVRShE/I=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=l7brKmqwuiCDHBI3q/3t8RCzt3QRcl9RdNkDp1eCzK+g5zfMjntqQzq5q6iKL26+m UMQ5piRnIaYeirKMnmJMQO1FPrmbkMRGkhVsNphxgtcOkKV55xQhZ5PuIhYcinwLf0 EhTGo+DNP4miSscxWPYC4UdGj9TSHe8DQ0V1rwwwk9/L+WBSJTa6rqolOpgQubPzVE sfZwfnll7r8W8rSamseuS7WZwN+jeAWq7v02owwtSVh1zXnbp+7I7ZFdPvuZbF4rw3 xpaDaaehGO7SPsbmVsUtAlJg+EpBj1QOXiRxnKuQThwvq5FVa2UUXlnsPfnz4kTp5g Tkqmzy5gtvj3Q== Date: Thu, 12 Oct 2023 16:29:26 +0200 From: Lorenzo Pieralisi To: Jason Gunthorpe Cc: Will Deacon , Catalin Marinas , ankita@nvidia.com, maz@kernel.org, oliver.upton@linux.dev, aniketa@nvidia.com, cjia@nvidia.com, kwankhede@nvidia.com, targupta@nvidia.com, vsethi@nvidia.com, acurrid@nvidia.com, apopple@nvidia.com, jhubbard@nvidia.com, danw@nvidia.com, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1 2/2] KVM: arm64: allow the VM to select DEVICE_* and NORMAL_NC for IO memory Message-ID: References: <20230907181459.18145-3-ankita@nvidia.com> <20231012123541.GB11824@willie-the-truck> <20231012132045.GI3952@nvidia.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20231012132045.GI3952@nvidia.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231012_072936_743295_24F56BD0 X-CRM114-Status: GOOD ( 24.65 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Oct 12, 2023 at 10:20:45AM -0300, Jason Gunthorpe wrote: > On Thu, Oct 12, 2023 at 01:35:41PM +0100, Will Deacon wrote: > > > > Failures containability is a property of the platform > > > and is independent from the memory type used for MMIO > > > device memory mappings (ie DEVICE_nGnRE memory type is > > > even more problematic than NormalNC in terms of containability > > > since eg aborts triggered on loads cannot be made synchronous, > > > which make them harder to contain); this means that, > > > regardless of the combined stage1+stage2 mappings a > > > platform is safe if and only if device transactions cannot trigger > > > uncontained failures; reworded, the default KVM device > > > stage 2 memory attributes play no role in making device > > > assignment safer for a given platform and therefore can > > > be relaxed. > > > > > > For all these reasons, relax the KVM stage 2 device > > > memory attributes from DEVICE_nGnRE to NormalNC. > > > > The reasoning above suggests to me that this should probably just be > > Normal cacheable, as that is what actually allows the guest to control > > the attributes. So what is the rationale behind stopping at Normal-NC? > > I agree it would be very nice if the all the memory in the guest could > just be cachable and the guest could select everything. > > However, I think Lorenzo over stated the argument. > > The off-list discussion was focused on NormalNC for MMIO only. Nobody > raised the idea that cachable was safe from uncontained errors for > MMIO. True, it should be made clearer ie "independent from the non-cacheable/uncacheable memory type...", please update the log accordingly, forgive me the confusion I raised. Lorenzo > I'm looking through the conversations and I wouldn't jump to > concluding that "cachable MMIO" is safe from uncontained failures. > > Catalin has already raised a number of conerns in the other patch > about making actual "designed to be cachable memory" into KVM > cachable. > > Regards, > Jason _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel