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 95388CAC5BB for ; Wed, 1 Oct 2025 13:35:58 +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:Content-Type:MIME-Version: References:In-Reply-To:Subject:Cc:To:From:Message-ID: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=PDK92u5B/FcAD+ZYNjGuxAVWXpwNJFHRPopndyasWE0=; b=Ny1phi/VXSztI8vaw//PT9nmyX eNid1oRBqQMa1oU6Et+77eAMLnsryO3Ikjv9z8ZB/8BsX4h/9yF7MTR++DMkuMtngjIucmwSqchFj bfOOkXHzqRin6qX6fiWab9UwXhaJ1a/GYjJ+MY6YDymUlnvgT5ter7D/jnSX9c3b/UykTN/nD+QtU kxEISxTis1MAHy9Z+2SnZU67aOr/sRMNkJjstGJGzmKtManELHjQmpRtYBLV8/di3Mm5cHxKBI9nd WDqLMf0hSUYT3DFC3Yik8xlpvz8/IppINXfMt1nXfyW2fNOqdZHJ7zrbnFZ9DH1VzYJI0KBf4ck+a oUEHdkvA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1v3wzj-0000000837y-14bq; Wed, 01 Oct 2025 13:35:47 +0000 Received: from sea.source.kernel.org ([2600:3c0a:e001:78e:0:1991:8:25]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1v3wzg-0000000837Z-1vYa for linux-arm-kernel@lists.infradead.org; Wed, 01 Oct 2025 13:35:45 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id BEA5743AF5; Wed, 1 Oct 2025 13:35:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 90054C116C6; Wed, 1 Oct 2025 13:35:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1759325743; bh=ugtWNem9sZvjDOpwvATrh1Z6YMwTTTLfOSaGjIGvpxs=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=D3As7FdG5Gpq5dtc9npozl8E6d97ZMYzco37uZEjzNGntqU6zgnw+2CZ3IKVZTk13 B2I5ZbkCeots+VvFa0csToU7XjkzziyjqE+4C5FhVzteSyRnVmbkiSf2zpRanjlZUM G1LtUZo8U420nbEnwhSc6aDdGBqlVosJ4rK56NfiIPcr4fZaKqm/0btNJoLqy/5OAX AsBgX1/MgarQ7PEShhqseDdBJSKiqfamh69WvaVnF0JKh+haqWMadjjQka5AQFunDS kRQ3+/OAQyNbU3Lo29sxIYbcTkkUwnapcEufEQ4a9ya3gv62VHJe/xkYwSOCZ4kAKt 0wbf2boQ1rLZg== 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.98.2) (envelope-from ) id 1v3wzd-0000000Aod6-0paf; Wed, 01 Oct 2025 13:35:41 +0000 Date: Wed, 01 Oct 2025 14:35:40 +0100 Message-ID: <86h5wizqvn.wl-maz@kernel.org> From: Marc Zyngier To: Steven Price Cc: kvm@vger.kernel.org, kvmarm@lists.linux.dev, Catalin Marinas , Will Deacon , James Morse , Oliver Upton , Suzuki K Poulose , Zenghui Yu , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Joey Gouly , Alexandru Elisei , Christoffer Dall , Fuad Tabba , linux-coco@lists.linux.dev, Ganapatrao Kulkarni , Gavin Shan , Shanker Donthineni , Alper Gun , "Aneesh Kumar K . V" , Emi Kisanuki , Vishal Annapurve Subject: Re: [PATCH v10 05/43] arm64: RME: Check for RME support at KVM init In-Reply-To: <2226e62f-76ca-4467-a8ae-460fd463df0a@arm.com> References: <20250820145606.180644-1-steven.price@arm.com> <20250820145606.180644-6-steven.price@arm.com> <86ms6azxt5.wl-maz@kernel.org> <2226e62f-76ca-4467-a8ae-460fd463df0a@arm.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/30.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: steven.price@arm.com, kvm@vger.kernel.org, kvmarm@lists.linux.dev, catalin.marinas@arm.com, will@kernel.org, james.morse@arm.com, oliver.upton@linux.dev, suzuki.poulose@arm.com, yuzenghui@huawei.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, joey.gouly@arm.com, alexandru.elisei@arm.com, christoffer.dall@arm.com, tabba@google.com, linux-coco@lists.linux.dev, gankulkarni@os.amperecomputing.com, gshan@redhat.com, sdonthineni@nvidia.com, alpergun@google.com, aneesh.kumar@kernel.org, fj0570is@fujitsu.com, vannapurve@google.com 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-20251001_063544_540937_E3D05343 X-CRM114-Status: GOOD ( 20.74 ) 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 Wed, 01 Oct 2025 14:20:13 +0100, Steven Price wrote: > > >> +static int rmi_check_version(void) > >> +{ > >> + struct arm_smccc_res res; > >> + unsigned short version_major, version_minor; > >> + unsigned long host_version = RMI_ABI_VERSION(RMI_ABI_MAJOR_VERSION, > >> + RMI_ABI_MINOR_VERSION); > >> + > >> + arm_smccc_1_1_invoke(SMC_RMI_VERSION, host_version, &res); > > > > Shouldn't you first check that RME is actually available, by looking > > at ID_AA64PFR0_EL1.RME? > > Well, you made a good point above that this isn't RME, it's CCA. And I > guess there's a possible world where the CCA interface could be > supported with something other than FEAT_RME (FEAT_RME2 maybe?) so I'm > not sure it necessarily a good idea to pin this on a CPU feature > bit. But you cannot have CCA without RME. You cannot have CCA with GICv3. And my point was more that RME could be used by something other than CCA - I certainly don't anticipate someone else adopting the CCA interface for anything... > Ultimately what we want to know is whether the firmware thinks it can > supply us with the CCA interface and we don't really care how it > achieves it. I disagree. You rely on specific feature sets to be available (hell, everything is baked around GICv3... GICv5 anyone?). For this sort of stuff, you absolutely need to know what you are running on, not what some broken firmware tries to pretend it is. M. -- Without deviation from the norm, progress is not possible.