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 0DCA0CE8E6B for ; Thu, 24 Oct 2024 11:52:36 +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=JSU8rst22Ejja66qArUJ03dt3xGCZq4+nqmDDlQvfb0=; b=ogyJBhUJ6wwaowP7688HDQXJtK 9PUBMuaqdZw0VIyadx3kACLnXvWKeWK//cJIOXv1QoF4XPPcoKoTX8aIHKJHG3VWDglkl2B7CIlRp zjPJqxjIVsevMm8rcl0zke2Kn10vLBQ3Ui2PFUe/J2ZuHAvmZzO+B1SPW5Aw4aOfZ1t4Dx56x62Xv VzYDvcNHbcc+9HhDWwjs7URn64Cr1uG2cglrnJJ0zOJWoodtYwFE/oJhXPALqrAUDiKh8tbp3tgHk mPeXKjmFL9b9L6Omd7j9Zj5KvglryH9b1L3iZxHP6xM/deHVDINjWvB5/aI8yAVEfp/PkFMbHOop2 OKNDG4rg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t3wO4-00000000G2a-2JM8; Thu, 24 Oct 2024 11:52:20 +0000 Received: from nyc.source.kernel.org ([2604:1380:45d1:ec00::3]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t3wIR-00000000FJc-1IH7 for linux-arm-kernel@lists.infradead.org; Thu, 24 Oct 2024 11:46:33 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id 3C01BA45364; Thu, 24 Oct 2024 11:46:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1C6F4C4CEC7; Thu, 24 Oct 2024 11:46:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1729770390; bh=rR8OViBzcMSTBynf6dkGB9uTCV4/IpUGVpmpDDEIQOU=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=UzBf+GM16VUYQ8JK3v6lMqMBikV1DCIS06piSdRWDctK/ICNtdlwmQ44EwdkkruyC flze11PEEo8MYr0KN+7VJ54GQ/R9VcrnvQGjL3Tu7Cm7lC8vijdY6n8EjKlSzuQbQd 4l3Ir3NtWj4j0wrsKNkd+qINle3AiddDAiV7SpBPf+nhCczAaswSk80WJFOpFp9TjJ q8M6N45fHp/7q6hc1GTIhnzPLLJ6DCKzkHlRmu+pj0mqXE9F7lt/xOTqayeAGRPzcY 9S4XR3TUSn3sLNlmUktVLG0yNfYwR5Hrp5nRN+HWE4ApI9fTxzyKV61F9/JAUx1fz5 FPDe6azWp9IZw== 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 1t3wIO-006Qps-77; Thu, 24 Oct 2024 12:46:28 +0100 Date: Thu, 24 Oct 2024 12:46:27 +0100 Message-ID: <86ttd13er0.wl-maz@kernel.org> From: Marc Zyngier To: Mostafa Saleh Cc: linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, corbet@lwn.net, Will Deacon Subject: Re: [PATCH] Documentation: Update the behaviour of "kvm-arm.mode" In-Reply-To: References: <20241023171244.4031151-1-smostafa@google.com> <86v7xh3km6.wl-maz@kernel.org> 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.4 (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: smostafa@google.com, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, corbet@lwn.net, will@kernel.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-20241024_044631_513260_85F34947 X-CRM114-Status: GOOD ( 36.12 ) 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 Thu, 24 Oct 2024 12:32:25 +0100, Mostafa Saleh wrote: > > Hi Marc, > > On Thu, Oct 24, 2024 at 10:39:45AM +0100, Marc Zyngier wrote: > > Hi Mostafa, > > > > On Wed, 23 Oct 2024 18:12:43 +0100, > > Mostafa Saleh wrote: > > > > > > Commit 5053c3f0519c ("KVM: arm64: Use hVHE in pKVM by default on CPUs with > > > VHE support") modified the behaviour of "kvm-arm.mode=protected" without > > > the updating the kernel parameters doc. > > > > > > Update it to match the current implementation. > > > > > > Cc: Will Deacon > > > Cc: Marc Zyngier > > > > > > Signed-off-by: Mostafa Saleh > > > --- > > > Documentation/admin-guide/kernel-parameters.txt | 6 +++++- > > > 1 file changed, 5 insertions(+), 1 deletion(-) > > > > > > diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt > > > index bb48ae24ae69..59a0dd7e2de6 100644 > > > --- a/Documentation/admin-guide/kernel-parameters.txt > > > +++ b/Documentation/admin-guide/kernel-parameters.txt > > > @@ -2723,8 +2723,12 @@ > > > nvhe: Standard nVHE-based mode, without support for > > > protected guests. > > > > > > - protected: nVHE-based mode with support for guests whose > > > + protected: hVHE-based mode with support for guests whose > > > state is kept private from the host. > > > + In case hVHE is not supported in hardware, it will > > > > nit: it is VHE that is supported or not, hVHE is only a SW concept. > > > > > + boot with protected nVHE. > > > + nVHE protected mode can still be forced on VHE systems > > > + using "kvm_arm.mode=protected arm64_sw.hvhe=0 id_aa64mmfr1.vh=0" > > > > This opens another question: none of the arm_sw.*, nor any of the > > id_aa64* parameters are described (basically, anything that's in > > arch/arm64/kernel/pi/id_override.c). What should we do about these? > > Yes, I mainly added this, to make it easier if someone wants to boot to > protected nVHE so they don't have to go through the code, but I can > remove it if it's confusing. No, I think it is good to capture that sort of information somewhere, specially given that it is non-trivial to convince the kernel to do what you want. But maybe at some point we should document the rest of the options, as they keep growing, and people are starting to rely on them for one thing or the other. Not now though. > > > > > > > > > > > > > nested: VHE-based mode with support for nested > > > virtualization. Requires at least ARMv8.3 > > > > Huh, another nit to fix. We only support nested with ARMv8.4 (with > > FEAT_NV2), as the ARMv8.3 version (the original FEAT_NV) is too ugly > > for words. > > > > Mind addressing this? > > Sure, I will update it in v2. Thank you! M. -- Without deviation from the norm, progress is not possible.