From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9539B1D041D; Thu, 24 Oct 2024 11:46:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729770390; cv=none; b=OIF9gpwF3EwWfDl3lyqfx1ajqFde9K4YbQom9KjjbaYV3UjSJpkm6KstrGBU9VxDfJqK867gNeDWlUPP4m0pQ7hCV9liTSN6cxjANcKmnTgyjlpy4HRYDqFeH0Fzz27iWVNo02fF1wVoiWQQMa8er7leXDVptDuP2k9a0ZBFO0U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729770390; c=relaxed/simple; bh=rR8OViBzcMSTBynf6dkGB9uTCV4/IpUGVpmpDDEIQOU=; h=Date:Message-ID:From:To:Cc:Subject:In-Reply-To:References: MIME-Version:Content-Type; b=HPYVuUge0vkpx5fbCozqq9JK6oXmcpJXCJ0R2vEmadOTHcpY1Wt1aKTXrxoXQ/CmDLWqsf1YZbxAPZIPHUv9GDJEpBv7ubPc2ksvsqyYybTtwOy88N5YsxL8LsbJ3GKJxd3PhX9W8QVVwAuwsUOKPgF+5rIhHyy9EcEFJcT/1q4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=UzBf+GM1; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="UzBf+GM1" 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) Precedence: bulk X-Mailing-List: linux-doc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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 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.