Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp269188rdb; Thu, 19 Oct 2023 04:12:15 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEEuh7OvfoE9Gcxv+GtxwGi2VRLpmhaMKzBNX3ihx84GlwJdlkUirw/mglqrAVOlx+DmpN3 X-Received: by 2002:a17:90a:1fc8:b0:27d:2dde:5979 with SMTP id z8-20020a17090a1fc800b0027d2dde5979mr1767948pjz.5.1697713934973; Thu, 19 Oct 2023 04:12:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697713934; cv=none; d=google.com; s=arc-20160816; b=FEPQWdT6wuh6ef6w0+fS1+daVbWbHgIJCFRCnC95rFv3ODM/rIvUOuzt3YDQ4PiIXm bh4DQRAil2riNUIiSW6sSPvjF5hjThaYTEGblFTs3h6OPRv2TD2MSnuIcr21+LOT0YWm gv3siLg9ljqxmb1gS+D5H6XJastO2JttWBdbRk751VRjA83Ns/V1EqgBki4MZcvpTKoO Qv/5uzglVyCF3sS/RVvAjGFP3GwquEL8Ektv8hbIaRibvZnUynSuSTZjt2zF1mItYS4A dNVKpyi6y/VmcIF8HgQc8nMCtY9QbVAGzAWTxttWV+OyrVy0QnOfwBFDyjLLT5uTTSSI hjiw== 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; bh=UcCmma9qK5nqr9QVcyZDt5qBxxHAfWfYWS1bAMwwC2Y=; fh=R010febBopgBz5a62I3DOI8QY7KISRxHa9xTg/1ZzIo=; b=FeD/RrD45KEzr5GMTmvVK4ugYMWzfhUSCSTihXLU/gLBjQtmIgr5Ybmfn936qBXqty J5phDM501tbQYUzmSzMVGBLdMdVjmPssgwWzMTPdjsZqpNfiJFxhCXib5m1Shvwcj8UH TbYsoSpRMOObS/ykoi8yXVqnVplM4ZIzEfco6FkWtGjhsrHVEYdwCRixtVFFBXCW5wX1 O44xvcFpYPnx3lrE40lTwWozoDquENQFK6na7Dxy++m0HScg/40+OwJNm+Tjl2/oe8+q qGdmTdPlzcmqygWqD5PtBwEhC7xPDdDULj6iXmNhExvi5mu2kHVqpbb89hw1tWwrxbXY M2Ig== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id mp21-20020a17090b191500b00274df6d4c38si1772587pjb.89.2023.10.19.04.12.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 04:12:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 20ADC80DEA46; Thu, 19 Oct 2023 04:12:14 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345309AbjJSLMM (ORCPT + 99 others); Thu, 19 Oct 2023 07:12:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59990 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345037AbjJSLMK (ORCPT ); Thu, 19 Oct 2023 07:12:10 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 14924FA for ; Thu, 19 Oct 2023 04:12:09 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A6322C433C8; Thu, 19 Oct 2023 11:12:05 +0000 (UTC) Date: Thu, 19 Oct 2023 12:12:03 +0100 From: Catalin Marinas To: Lorenzo Pieralisi 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=-4.0 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Thu, 19 Oct 2023 04:12:14 -0700 (PDT) On Fri, Oct 13, 2023 at 05:28:10PM +0200, Lorenzo Pieralisi wrote: > 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. I think it makes sense to add something in the Documentation for easier future reference. We can also keep adding to it as we learn more. The commit log can be shorter in this case. -- Catalin