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 8C583C83F03 for ; Mon, 7 Jul 2025 00:54:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=X3irXDp6N1mLMLI+A2HiDkSvIQrKjc11+W2KC82uC3s=; b=L8liUXs/+a6n6Vq2Ms1mnJgGsP sXViP86m7rVEaSMPI6B82ozm3t2I+ft1pXUsry4O8pT2So8nOmfBM24QzZmSZM5FqGshUjB1fbYAX WpQ8S3zCt2SDL5FSEDZkdfK7j0A2CHji/Q6Vj3yitmA8QB8tsNYgyPS5iYL/o8NiPFZ6wXViuaByu VoEzw/v/ECx2OjTWXzSLN7htIkbD/DbjB3/7yL+6+XFlGeH2xHpihNjiPSa1+jOvQsX5Yv4XeXYn8 CE6NWwcPR2Tq5qgtRwqD5ixvVbsuez+XKUT3xBgQqg5BD1ox0d61X20AiuvknI8n45rI11Z49Kf// LRnCVkpQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1uYa7d-000000013PP-1Kq9; Mon, 07 Jul 2025 00:54:17 +0000 Received: from nyc.source.kernel.org ([147.75.193.91]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1uYa5H-000000013Aw-1Q3b for linux-arm-kernel@lists.infradead.org; Mon, 07 Jul 2025 00:51:52 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id 42210A4D58F; Mon, 7 Jul 2025 00:51:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EA322C4CEED; Mon, 7 Jul 2025 00:51:14 +0000 (UTC) Date: Sun, 6 Jul 2025 19:51:13 -0500 From: Catalin Marinas To: ankita@nvidia.com Cc: jgg@nvidia.com, maz@kernel.org, oliver.upton@linux.dev, joey.gouly@arm.com, suzuki.poulose@arm.com, yuzenghui@huawei.com, will@kernel.org, ryan.roberts@arm.com, shahuang@redhat.com, lpieralisi@kernel.org, david@redhat.com, ddutile@redhat.com, seanjc@google.com, aniketa@nvidia.com, cjia@nvidia.com, kwankhede@nvidia.com, kjaju@nvidia.com, targupta@nvidia.com, vsethi@nvidia.com, acurrid@nvidia.com, apopple@nvidia.com, jhubbard@nvidia.com, danw@nvidia.com, zhiw@nvidia.com, mochs@nvidia.com, udhoke@nvidia.com, dnigam@nvidia.com, alex.williamson@redhat.com, sebastianene@google.com, coltonlewis@google.com, kevin.tian@intel.com, yi.l.liu@intel.com, ardb@kernel.org, akpm@linux-foundation.org, gshan@redhat.com, linux-mm@kvack.org, tabba@google.com, qperret@google.com, kvmarm@lists.linux.dev, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, maobibo@loongson.cn Subject: Re: [PATCH v10 1/6] KVM: arm64: Rename the device variable to s2_force_noncacheable Message-ID: References: <20250705071717.5062-1-ankita@nvidia.com> <20250705071717.5062-2-ankita@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250705071717.5062-2-ankita@nvidia.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250706_175151_455875_7AE335C8 X-CRM114-Status: GOOD ( 14.29 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Sat, Jul 05, 2025 at 07:17:12AM +0000, ankita@nvidia.com wrote: > From: Ankit Agrawal > > For cache maintenance on a region, ARM KVM relies on that > region to be mapped to the Kernal virtual address as CMOs > operate on VA. > > Currently the device variable is effectively trying to setup > the S2 mapping as non cacheable for memory regions that are > not mapped in the Kernel VA. This could be either device or > Normal_NC depending on the VM_ALLOW_ANY_UNCACHED flag in the > VMA. > > Thus "device" could be better renamed to s2_force_noncacheable > which implies that it is ensuring that region be mapped as > non-cacheable. > > CC: Catalin Marinas > Suggested-by: Jason Gunthorpe > Reviewed-by: Jason Gunthorpe > Reviewed-by: David Hildenbrand > Tested-by: Donald Dutile > Signed-off-by: Ankit Agrawal Reviewed-by: Catalin Marinas