Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp1038099rdg; Fri, 13 Oct 2023 08:28:33 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFSff7R9+2ptwFjamBpuZu9ByieNvCJmlvtGDMnxeeEBP+kgNPKAkGKNayhMGPPDVXKXc8v X-Received: by 2002:a05:6870:2381:b0:1bb:99fe:6ad1 with SMTP id e1-20020a056870238100b001bb99fe6ad1mr32736391oap.6.1697210912958; Fri, 13 Oct 2023 08:28:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697210912; cv=none; d=google.com; s=arc-20160816; b=ZEhmYDGbX8lqoKeTSV9qHqwiOzebqBEh6DEzqKv/n4YVbdieJ3LbzXsln+6bXgeSQP twYAE79YYo5LkZeCtaFdhovfQqoZG4drFz29Jw6JnDiitOj0rMzQTBNuM4CcFpOItqJv xNbScOEJMRr+iTB4eMlI0S5wsg97VoWLRoYQZu5aNr3D/FaHy+tcjmYMvEH/V0nrVtL/ 4GtVkOnnnRQoqyYs1xLKUxxWnFoNS4jH5ja6ZI/P2wK4vFBslII7o8MQBonI+OBUixeh YBr1bjaKt5BFTALKYi4Xl4mxSa4WqqrV294tFfUFTbUHa+ifp0aorrTQBjuWRsmkNtHr L+Bg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=D9c3AnJVptY954onTfel7WAhyqTNr5VZc4kOUA+6m4c=; fh=n8Auaa+oePvufRBouQOSjaAPpHgLXvEyhUulb7jr4N8=; b=y+/HVQ0ZdL31t+hDROu8IAG/MagGPRO2Zb9Qdu8mmCdsewaxYIuV1+UzAePq00Ut3A NOIz3gl2GruRnjCtd+jtEyeJ1p3TCtJtDq7D2lnBzVnRoPXC7I4tKIWlQMkkUeReOMvA MLOFj4aoxYjK2rTXlme3aTcgEygKtOamt+t6rD8pqQclpJH7aM5O0OZb/Nig23yMJlCA HaRH0H8X0ASfe84d7ThFhZTx4F73PUeepncmnhStAXQE2S7lQT6RRvC7/09QvDPTwXxd 4z/+meXwJ06NwQxhEtIyggXcvJVHHaYx56Pq3BMTauZ08O9sHRx5x+qsw2MN4GsEHuKm Kj0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=B6aOhjI4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id b28-20020aa7951c000000b0069100706960si390006pfp.116.2023.10.13.08.28.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Oct 2023 08:28:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=B6aOhjI4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 243108339664; Fri, 13 Oct 2023 08:28:30 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232421AbjJMP2U (ORCPT + 99 others); Fri, 13 Oct 2023 11:28:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57240 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232383AbjJMP2T (ORCPT ); Fri, 13 Oct 2023 11:28:19 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CE82FDE for ; Fri, 13 Oct 2023 08:28:17 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5E84CC433C8; Fri, 13 Oct 2023 15:28:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1697210897; bh=iiew/laD+Q3haHwMxgaUmOJOpF//XuI1aJ4hOlOKh6s=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=B6aOhjI4W3T3qqRBW/NsttzXu5HUYLUV0lP13HpcxULbCsY8haM+fvx/hkj6ifjtz 5uZCpSp2yYae/IoUGpnXO1b3PAiCRuxJ2QNmSgt762IP05AQmV1jLJKNvfC3fo3Nff Z1eyDfRCPYIEucr4zoADjXI4vRzVrqegikLNsl094KykJc8hZMs9isjWNn37ugG4mL b7BS7rV1TDFjqx3xH9xB/2V45Bkqj8K5qirF/WyXBzb1dv9lhsMC7rfYLnjJAqVQfh xNspCeaor9aeIXP83je9bdwKF47wno/dy555mpvKuCdCi1hRXBYmhqlW+lJOw1Ar8m CQCLt2ppkzeJA== Date: Fri, 13 Oct 2023 17:28:10 +0200 From: Lorenzo Pieralisi To: Catalin Marinas Cc: Will Deacon , Jason Gunthorpe , 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: <20231012123541.GB11824@willie-the-truck> <20231012144807.GA12374@willie-the-truck> <20231013092934.GA13524@willie-the-truck> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Fri, 13 Oct 2023 08:28:30 -0700 (PDT) On Fri, Oct 13, 2023 at 02:08:10PM +0100, Catalin Marinas wrote: [...] > Yes, we end up with mismatched aliases but they only matter if the VMM > also accesses the I/O range via its own mapping. So far I haven't seen > case that suggests this. > > > > Things can go wrong but that's not because Device does anything better. > > > Given the RAS implementation, external aborts caused on Device memory > > > (e.g. wrong size access) is uncontainable. For Normal NC it can be > > > contained (I can dig out the reasoning behind this if you want, IIUC > > > something to do with not being able to cancel an already issued Device > > > access since such accesses don't allow speculation due to side-effects; > > > for Normal NC, it's just about the software not getting the data). > > > > I really think these details belong in the commit message. > > I guess another task for Lorenzo ;). I will do, I start wondering though whether this documentation belongs in this commit log only or at Documentation/arch/arm64 level (or both), I am pretty sure this thread can turn out quite useful as a reference (it is for me) if we manage to summarize it that would benefit everyone. Lorenzo