From patchwork Wed May 1 16:33:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Will Deacon X-Patchwork-Id: 13651020 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 17B14C4345F for ; Wed, 1 May 2024 16:34:26 +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: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:In-Reply-To:References: List-Owner; bh=65r0quHgIR1Fn73+m3G3zqR4sZ1fljpu38NXgbiyJx0=; b=bcWRew2zoQak1t RoiFPn/s6GZEYyUU51Er4R+TQ37dXr4fdEMKJ+4fRj8PvMhz+07tTbYAh5TL3ONExSEIrv2PIRuMP 2xXMFW5MgvPCt42rD8WTSk20lYm03SU0BxQuR08CV/Ga6YUfLHDW3SfZvfhPbdgk2QeQg4vmsnntI kb1wnWVQnOvgAspa2v78fm1F7INWuwwphYkpvlpe6uihFdJFqK/Ww3+hncwtmE29d8mdDFUSmwyTR 1VDbVumjZHUDQtREJ69ZmZVW8UGgaeNEt5XRtMILrJP6e8+itL/TxUTe8hcWtLzVDBI2bEcn9rOLu fQ6XDEkvzHDn6WmUx1Fw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s2CuN-0000000AATC-28eb; Wed, 01 May 2024 16:34:15 +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 1s2CuH-0000000AAQ4-3Kbm for linux-arm-kernel@lists.infradead.org; Wed, 01 May 2024 16:34:12 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 10EFCCE12A8; Wed, 1 May 2024 16:34:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3061AC072AA; Wed, 1 May 2024 16:34:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714581245; bh=rBOua23Gp9m9rCOAr2SWCDFzzgvaI9thtyfTsKfuoo8=; h=From:To:Cc:Subject:Date:From; b=laVwj+hOljwDfvwsgLGeCrnOi0viDp1RAsG5rcFOr43fjlm0N4r2HgQh4boGCQ6GV BBy7mzsIvqZ5J1xM2h4BnoVjAuj7gelpfg2QOZ9+0W1eS0mI/IBclIZcz1s5LUrS9B wf6ppvPAst6rDy66YehFjOdgHfkL+ICaP/0WMlEh6kjR01k2r6X9i3b6s18GxOp6Xk td94LpUTsRK6UAFnXDk/k9Jpm+i/iOXKGRIgTMEhfMwzrexR0tiraG7BzSoWa1DZ27 med0BUKxSG/cDFHNgK5Qvc8Rf0mwzSGG/oruIhA1Zz62X3j+asLlzJELrDjNndtPip k2mRrmxKzH9+w== From: Will Deacon To: kvmarm@lists.linux.dev Cc: linux-arm-kernel@lists.infradead.org, Will Deacon , Marc Zyngier , Oliver Upton Subject: [PATCH 0/2] Tweaks to the kvm-arm.mode= early cmdline parsing Date: Wed, 1 May 2024 17:33:58 +0100 Message-Id: <20240501163400.15838-1-will@kernel.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240501_093410_722557_9A1447C9 X-CRM114-Status: GOOD ( 12.68 ) 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 Hi folks, Here are a couple of tweaks to the early parsing of the 'kvm-arm.mode=' cmdline option so that: 1. kvm-arm.mode=nvhe overrides an earlier arm64_sw.hvhe=1 option 2. Protected KVM initialises in hVHE if VH is available in the CPU This is useful for Android, where we'd like the default cmdline to work on all CPUs (i.e. with and without VH) but using hVHE by default where available and finally allowing nVHE to be forced by the bootloader appending additional arguments. The patches could probably be squashed, but I kept them separate because they're doing different things and this code is quite fiddly when you start reasoning about the possible interactions between all of the options. Cheers, Will Cc: Marc Zyngier Cc: Oliver Upton --->8 Will Deacon (2): KVM: arm64: Fix hvhe/nvhe early alias parsing KVM: arm64: Use hVHE in pKVM by default on CPUs with VHE support arch/arm64/kernel/pi/idreg-override.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)