Received: by 2002:a05:7208:3188:b0:7e:5202:c8b4 with SMTP id r8csp974674rbd; Fri, 23 Feb 2024 09:07:40 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWiuajV7mpK/zn1Kr8RS4KlpV3HagvMOt8RpPOoY4y4xoSBIO+tfrfrLxaZQlg5TtiNxxN/kKgIqmKF/RkkLEVEqkfiVLSb9jPWUl8/7A== X-Google-Smtp-Source: AGHT+IF0i5m38HDju3qy6XcKXOgwjIIpMqOWi1YPjTLY2ro1F0Jagm97Jp2CmgP6N0YPnGkVtjRo X-Received: by 2002:a17:90a:744a:b0:299:35a1:f716 with SMTP id o10-20020a17090a744a00b0029935a1f716mr393118pjk.12.1708708060337; Fri, 23 Feb 2024 09:07:40 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708708060; cv=pass; d=google.com; s=arc-20160816; b=xWnuubh5ATNNeBzI7tyaiG4PdRCmsju6+TzZoG1thTw0Nyh4BDvdrVz2rL1aYjFC56 iqjytKqYWtDyJ58GLgbTNB8Jde63kq3QmX6HSmIcbDDFoW0O9EHidzGpjjMEhMeEu8Bh BVnpCUzdb8zF9dp2/g9tbno6+AipLIQFbSTrMEbFhKrwfkDs3MagC6q7kBgpLqgQlL8q fYBMNhNebLazRK5pv7xLPU8hsveG5oS0Y5noS+UzQwkLSegHAarYwhfqD5hs2IFHs5Qm TkwS9tpCfI11+mlUrvm/fYUNTtrWowjF+LGwnh6VC6tw+Et9kCQoqkvJJj8Wi/WRdF+I 7+kA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:references:in-reply-to:subject:cc:to:from:message-id :date:dkim-signature; bh=XRNut/ns3V8/ejHGq+ODviyh5ePds81sL1d+kXWABSA=; fh=tstAJjFdlmLE7Ey/Et5GeOJTtabMgcgUyd2WNdOqQx4=; b=rjUxJt3mgnfIARd1IqprAe4RueDr2pKS8SxtBlk5ezUvriocvXAeCUh1fLDrxyqnOk b4Jp0oSEyrlpQWl5OpFmXJJOlBoFjg9Hv9UVhc16YbOpSVu9dodE1uN7cKDg0ckg9nUP gB43k+P2BRTtp5chFfaxAF34ioTHRTXrv8HfKjwpbGOpiRwAxxWGqcenLWKLDqr4dkHN yQezorI8hkGtC4OS0yp83rQljPsp0Z2NYh7c2SzUufgyPQOGcUbg8vwIsyP0y/4VcAr7 Frj0szz9SP5HFQZtMYm1kSjC33vxt30z+RGjdnaYnz2Z/txEONaQ94NaubTEkgGxNZDR 9hUg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=r2j2ss7E; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-78789-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78789-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id sv14-20020a17090b538e00b00297160ba34csi1481797pjb.104.2024.02.23.09.07.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 09:07:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-78789-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=r2j2ss7E; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-78789-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78789-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 0F03028753B for ; Fri, 23 Feb 2024 17:07:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7923512BE83; Fri, 23 Feb 2024 17:07:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="r2j2ss7E" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 914972E3EB; Fri, 23 Feb 2024 17:07:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708708051; cv=none; b=lt05ypba2S6MV7mARYEDE3qHrCa03j23Z6ejakNdV0kVw+K8/keot2G/59p1iG2/GoWBhNQnpXqCraAzsjRYYMBUg5hQRERf4uRpZhx7M010mQ5oambGXJW/6vb+9D+pZOmTFNcsqG0De/LClnQHDLNuWk+IeI1kHU1tS7dQzp4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708708051; c=relaxed/simple; bh=6O1eMZbVgw3dOMVLlXiV+gwVN4SvOehqC98EVTWNLHE=; h=Date:Message-ID:From:To:Cc:Subject:In-Reply-To:References: MIME-Version:Content-Type; b=oRV3hKVC3kZFVOE1+AF1UHhEt0gYADn5CU2PXQGMTr4YAd6eP8QkS0qtjqfSElP30ohvyH28hx3k0ybDn+Dw8Y90/aSBdglcYaBHxcXDFQHEK29XCSoAExqzYPAAdE82ThjTexL2X7xpD/2M4L/WBC3P011RzFhJtPTkVLKNggU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=r2j2ss7E; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6048DC433F1; Fri, 23 Feb 2024 17:07:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708708051; bh=6O1eMZbVgw3dOMVLlXiV+gwVN4SvOehqC98EVTWNLHE=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=r2j2ss7EHgRl7YB5/iFJFuOP9o7G4SSMGFqDDXddcYEjtHlmJISDa2qC0/nQxdDg1 JvV02hbCtKtCAeqULd+0UEucfVmCQl1Q+sbk45UPFigsa627OrroqaIzeBJTKs946W /WTNF+NAOIaVuj4kVBvPlE9OFFndl4dG7gX9nTlC1Y5Cf2/+sVsJYE0t1/s74O0rnl E3UhoGhdeGBMumK1ihaQokJqj60KNqPbHiBIulXaKoqV+XB3fYLQhRhe2L9SxSQSuC Ngrmb5jP1co6zWwFwRagrp6MBPj+8QOXw1gge80BGbX/5Jm+4bQ5590FCKw4KM9JU+ fng3SLZ+mLnYA== 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 1rdZ1E-006AIj-Tv; Fri, 23 Feb 2024 17:07:29 +0000 Date: Fri, 23 Feb 2024 17:07:28 +0000 Message-ID: <86il2f2jov.wl-maz@kernel.org> From: Marc Zyngier To: Cc: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: Re: [PATCH v8 3/4] kvm: arm64: set io memory s2 pte as normalnc for vfio pci device In-Reply-To: <20240220072926.6466-4-ankita@nvidia.com> References: <20240220072926.6466-1-ankita@nvidia.com> <20240220072926.6466-4-ankita@nvidia.com> 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) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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: ankita@nvidia.com, jgg@nvidia.com, oliver.upton@linux.dev, james.morse@arm.com, suzuki.poulose@arm.com, yuzenghui@huawei.com, reinette.chatre@intel.com, surenb@google.com, stefanha@redhat.com, brauner@kernel.org, catalin.marinas@arm.com, will@kernel.org, mark.rutland@arm.com, alex.williamson@redhat.com, kevin.tian@intel.com, yi.l.liu@intel.com, ardb@kernel.org, akpm@linux-foundation.org, andreyknvl@gmail.com, wangjinchao@xfusion.com, gshan@redhat.com, shahuang@redhat.com, ricarkol@google.com, linux-mm@kvack.org, lpieralisi@kernel.org, rananta@google.com, ryan.roberts@arm.com, david@redhat.com, linus.walleij@linaro.org, bhe@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, kvmarm@lists.linux.dev, mochs@nvidia.com, zhiw@nvidia.com, kvm@vger.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 On Tue, 20 Feb 2024 07:29:25 +0000, wrote: > > From: Ankit Agrawal > > To provide VM with the ability to get device IO memory with NormalNC > property, map device MMIO in KVM for ARM64 at stage2 as NormalNC. > Having NormalNC S2 default puts guests in control (based on [1], > "Combining stage 1 and stage 2 memory type attributes") of device > MMIO regions memory mappings. The rules are summarized below: > ([(S1) - stage1], [(S2) - stage 2]) > > S1 | S2 | Result > NORMAL-WB | NORMAL-NC | NORMAL-NC > NORMAL-WT | NORMAL-NC | NORMAL-NC > NORMAL-NC | NORMAL-NC | NORMAL-NC > DEVICE | NORMAL-NC | DEVICE > > Still this cannot be generalized to non PCI devices such as GICv2. > There is insufficient information and uncertainity in the behavior > of non PCI driver. A driver must indicate support using the > new flag VM_ALLOW_ANY_UNCACHED. > > Adapt KVM to make use of the flag VM_ALLOW_ANY_UNCACHED as indicator to > activate the S2 setting to NormalNc. > > [1] section D8.5.5 of DDI0487J_a_a-profile_architecture_reference_manual.pdf > > Suggested-by: Catalin Marinas > Acked-by: Jason Gunthorpe > Reviewed-by: Catalin Marinas > Signed-off-by: Ankit Agrawal Since people have asked for various commit message updates, I'll add my own: for the KVM/arm64 tree, the convention for the subject line is "KVM: arm64: Something starting with a capital". Thanks, M. -- Without deviation from the norm, progress is not possible.