From patchwork Wed May 1 16:33:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Will Deacon X-Patchwork-Id: 13651021 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 1E4FAC25B5C for ; Wed, 1 May 2024 16:34:27 +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: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=p9etgeG3m8zXtptrPeeAAM1Ld1FJb5znJUHEPJVL/Ts=; b=2pV3xt3UueJ8I9 vJArehkrNS/xUxdkR0WJXjrIxhcVQIAzBeu+Y8QQZeOWUS8QiiDiHI2hlcFCaSYJiCGMi3qen/n6Z cdft8YYNPnXKqGN/dbFAEsLlKvn1m6WMy4sNKcojEGHkmWa+2RnIEGB2N5kkI2he6kx6P7KF2klQC JdU8g0pStt53WW9dcE2eVVuuVZZutVCbH8CHR1gStbFhafkn2Q0B/rNDOKd5PZ+/YoQeFPmnZzB1q GiLqdrm0/sLCdtED4QRQSpMB4e1ppMZI/CoKBxj3ND6XUEvnoreAyBxHZKfunYG/EZKp557zR9zQs XqCsym25NpvibU/sZ6xg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s2CuO-0000000AATp-2zfy; Wed, 01 May 2024 16:34:16 +0000 Received: from sin.source.kernel.org ([145.40.73.55]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s2CuJ-0000000AAQR-380w for linux-arm-kernel@lists.infradead.org; Wed, 01 May 2024 16:34:13 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 926DACE135C; Wed, 1 May 2024 16:34:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C878DC4AF18; Wed, 1 May 2024 16:34:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714581246; bh=vVE6A0ZX8YYYvJ8iJgqupBt3NBrgyKJG4Euv+HlzFdI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dPamrdjc4JnRM0Xnpg/pSVtB7wEg8QkIhceDo+9yUpHUiQtnOyQt+UVSPz4dIC5d4 tDfqFRd4I5XQ3DWG5fR8gJ5luw+8spchrTC38ukvo1ef3RyOuDoijrkap80he9Hw1Q /seWuctoQVjymbldTrY3hZwxtSfIP6Ze/4ciaQRePBEUMsDYrHmyudjvnsbUMg6HUI 3x/dgc9ZHbpMSV/ToEnCa0KOLISxHpJlMOLxe5tQsVSIjlW7qfqcLUEssHcpUoJi0g NsX8+BZZuVLf/qhJdtjNsssXCBeJVMOdPUKvJxZ9Yr+eZbYpzJ/ee00jik+RMLrhmA 6iMa6Kl3r1aWw== From: Will Deacon To: kvmarm@lists.linux.dev Cc: linux-arm-kernel@lists.infradead.org, Will Deacon , Marc Zyngier , Oliver Upton Subject: [PATCH 1/2] KVM: arm64: Fix hvhe/nvhe early alias parsing Date: Wed, 1 May 2024 17:33:59 +0100 Message-Id: <20240501163400.15838-2-will@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20240501163400.15838-1-will@kernel.org> References: <20240501163400.15838-1-will@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240501_093412_019340_A2E3B98E X-CRM114-Status: GOOD ( 12.00 ) 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 Booting a kernel with "arm64_sw.hvhe=1 kvm-arm.mode=nvhe" on the command-line results in KVM initialising using hVHE, whereas one might expect the latter option to override the former. Fix this by adding "arm64_sw.hvhe=0" to the alias expansion for "kvm-arm.mode=nvhe". Signed-off-by: Will Deacon Acked-by: Oliver Upton --- arch/arm64/kernel/pi/idreg-override.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/kernel/pi/idreg-override.c b/arch/arm64/kernel/pi/idreg-override.c index aad399796e81..39c9253fcf23 100644 --- a/arch/arm64/kernel/pi/idreg-override.c +++ b/arch/arm64/kernel/pi/idreg-override.c @@ -209,7 +209,7 @@ static const struct { char alias[FTR_ALIAS_NAME_LEN]; char feature[FTR_ALIAS_OPTION_LEN]; } aliases[] __initconst = { - { "kvm_arm.mode=nvhe", "id_aa64mmfr1.vh=0" }, + { "kvm_arm.mode=nvhe", "arm64_sw.hvhe=0 id_aa64mmfr1.vh=0" }, { "kvm_arm.mode=protected", "id_aa64mmfr1.vh=0" }, { "arm64.nosve", "id_aa64pfr0.sve=0" }, { "arm64.nosme", "id_aa64pfr1.sme=0" },