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 F346EC5478C for ; Fri, 23 Feb 2024 17:07:49 +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:MIME-Version:References:In-Reply-To: Subject:Cc:To:From:Message-ID:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=3QS54mzI94VmhfdtMm8hf9Njj+S9ovOU/uSHJZmDOT0=; b=MQu9U2PHhvexWD 54fPWKMAjYFirdeU4ZDfpUti7HuKIlsf//qm/eMflz7LAj8fipGCwQiWbBePr2uoZikkjrKYKAghp v9LGBwrB0Hif3jbbqZyPrVcG4wmlpzAT2XAeoC3vZuoWVp9rHF0i4kBnLoeUJXmXRXdPtQoT+4464 PJSWXc/Mk9zhXFT/jUb0wXg/Nih5mMnODj+Cl2haBYF786Ri0+ekxBOd1Oex8+t8dox8s0RtVM5xy 2BY7SKdqlCcXuqxVqqdWQc5kbf9mI5fjQUsamwaMHOCbuQEW0i/L1l/lI6NdGsztC03/YoY5jmK1r 3/LFIV7F7sILSGVMf3Gw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rdZ1L-0000000ANeN-1oPy; Fri, 23 Feb 2024 17:07:35 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rdZ1I-0000000ANd4-1yaa for linux-arm-kernel@lists.infradead.org; Fri, 23 Feb 2024 17:07:33 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id C172E6357E; Fri, 23 Feb 2024 17:07:31 +0000 (UTC) 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) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240223_090732_634381_AA2231E8 X-CRM114-Status: GOOD ( 16.08 ) 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 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. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel