Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp455511rdb; Tue, 5 Dec 2023 09:50:43 -0800 (PST) X-Google-Smtp-Source: AGHT+IEzYVvBO/RsJiEO1WJOtCa2mXr7raTNFDRyzOEF2klB7ZqlUEDyR9G3MarOHn3zS4c0zQHa X-Received: by 2002:a05:6a20:8408:b0:18f:97c:823b with SMTP id c8-20020a056a20840800b0018f097c823bmr3742323pzd.69.1701798643309; Tue, 05 Dec 2023 09:50:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701798643; cv=none; d=google.com; s=arc-20160816; b=GUo2qEtZGB6J+fok9sYu8qLGh7+8DpaJan/v+ly0N/yLW0xwmFT3RN2rd7RdD13vpF PMFDSAl7apu/YnOVIFEBI26ZheW35CGhwNkamofSWhSEq6yUmrED7GJwM1uxnth+epcr mVXhNjtH71NPdnaw0YfhcCbupxJ5WM1QCc8kZbyETnLeoUojK813neDfPPJ1nt+2AOvN NxAEu0x2GXEKnUHdcbvCPLB5c4ycfn/XhNpXMX8TiiGLJAJjpxXGPfCAv+um87ZL2BiO nzOLoBhCpethzAfysdEF21zlyvyoBv1+2+1gpROzwH3Gi1NFd4ZDmAY4VcCNbfihAUNL 5JLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :subject:cc:to:from:message-id:date:dkim-signature; bh=UMQtHU0ix9pdmRo2XMWCkARkfeRawEpEP2lAb/Oa3VI=; fh=/cBajnHSfe3tMChJUZtGEKoCbgnAeghXkorSjVGp2Ww=; b=whMxcLW/lItN42k7b4HMhV239Va/QbOOjG0DvyhdeG4TMgczECsClfzR3oCOPb1gX1 40WhgF+Rjz2WGRIYzmLl6oTFlg8gX3uNgFfRfTUURNyp8hjY4jXkOGb4dMI/RKWI0Ogk C27PbmHu3BYgoWB9CaKCI1gpIEpQ5jpq+xNCVXUuy9Lt0357GbWaFx18YQlZLu1w3IXW fxTt4tPMR7y887MiUfhVzzulrMS9+ykcSEbdREzOwv2eA7dBKROER5kXXa5E2Rk/CBqF RKfHhFv9gKMAMzZzvOHnnm6tMRV6Xel4A6C/9FtC1oAXgikPNk8Ay/shrNL5RGBgB1CK +cjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=L0Zo0NUd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 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 pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id ka23-20020a056a00939700b006ce7e15ce8esi272774pfb.239.2023.12.05.09.50.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 09:50:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=L0Zo0NUd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 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 pete.vger.email (Postfix) with ESMTP id D9DB88182EDA; Tue, 5 Dec 2023 09:50:40 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231933AbjLERuY (ORCPT + 99 others); Tue, 5 Dec 2023 12:50:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52906 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229569AbjLERuY (ORCPT ); Tue, 5 Dec 2023 12:50:24 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 993C3122 for ; Tue, 5 Dec 2023 09:50:30 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2D990C433C8; Tue, 5 Dec 2023 17:50:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701798630; bh=iHtPLJCrT8jVDogR2HcFk+3QsBCzCFBD9pyDf3NU5HU=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=L0Zo0NUdsLKrYjTFRQ9QrCxszAMoQJQDwms7JS45EmNYS7SHFzRBvx17GquG1jp0Y CCndcwJFKrllSuEQPnzWxXjId704Gpi06HxtNVbXgdflqVvmynR9TxL56hOU/C+xTi E8qgUoPyvqQ55VomJwuxLnfCPnlCvSe+NFuzFzOU0/gByQuFrYVhYRaoHB5Drl+77w W0ABflwvllJtG76pscG/iSK1/F0R0Aum35XxBz4VO5yrfbA6e1DS4rJJ+8PmpGJbV6 w5QzBlI85shvIidEpnqzjEeOlyp7Dho5gdQlgMMo9TcSQv+7UM0VrHHEblVm1YEEUi ULAyqmJ+YmLLA== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1rAZYx-001eEi-Mp; Tue, 05 Dec 2023 17:50:27 +0000 Date: Tue, 05 Dec 2023 17:50:27 +0000 Message-ID: <86a5qobkt8.wl-maz@kernel.org> From: Marc Zyngier To: Catalin Marinas Cc: Jason Gunthorpe , ankita@nvidia.com, Shameerali Kolothum Thodi , oliver.upton@linux.dev, suzuki.poulose@arm.com, yuzenghui@huawei.com, will@kernel.org, ardb@kernel.org, akpm@linux-foundation.org, gshan@redhat.com, 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, mochs@nvidia.com, kvmarm@lists.linux.dev, kvm@vger.kernel.org, lpieralisi@kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v2 1/1] KVM: arm64: allow the VM to select DEVICE_* and NORMAL_NC for IO memory In-Reply-To: References: <20231205033015.10044-1-ankita@nvidia.com> <86fs0hatt3.wl-maz@kernel.org> <20231205130517.GD2692119@nvidia.com> <20231205164318.GG2692119@nvidia.com> <86bkb4bn2v.wl-maz@kernel.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/29.1 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: catalin.marinas@arm.com, jgg@nvidia.com, ankita@nvidia.com, shameerali.kolothum.thodi@huawei.com, oliver.upton@linux.dev, suzuki.poulose@arm.com, yuzenghui@huawei.com, will@kernel.org, ardb@kernel.org, akpm@linux-foundation.org, gshan@redhat.com, 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, mochs@nvidia.com, kvmarm@lists.linux.dev, kvm@vger.kernel.org, lpieralisi@kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false 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,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.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 (pete.vger.email [0.0.0.0]); Tue, 05 Dec 2023 09:50:41 -0800 (PST) On Tue, 05 Dec 2023 17:33:01 +0000, Catalin Marinas wrote: > > On Tue, Dec 05, 2023 at 05:01:28PM +0000, Marc Zyngier wrote: > > On Tue, 05 Dec 2023 16:43:18 +0000, > > Jason Gunthorpe wrote: > > > On Tue, Dec 05, 2023 at 04:22:33PM +0000, Catalin Marinas wrote: > > > > That's an argument to restrict this feature to PCIe. It's really about > > > > fewer arguments on the behaviour of other devices. Marc did raise > > > > another issue with the GIC VCPU interface (does this even have a vma in > > > > the host VMM?). That's a class of devices where the mapping is > > > > context-switched, so the TLBI+DSB rules don't help. > > > > There is no vma. The CPU interface is entirely under control of KVM. > > Userspace only provides the IPA for the mapping. > > That's good to know. We can solve the GIC issue by limiting the > relaxation to those mappings that have a user vma. Yes, this should definitely be part of the decision. > Ideally we should do this for vfio only but we don't have an easy > way to convey this to KVM. But if we want to limit this to PCIe, we'll have to find out. The initial proposal (a long while ago) had a flag conveying some information, and I'd definitely feel more confident having something like that. M. -- Without deviation from the norm, progress is not possible.