[PATCH v17 06/20] KVM: arm64: CCA: Add a new mode for supporting Realm guests
Kohei Enju
enju.kohei at fujitsu.com
Tue Sep 8 20:26:41 PDT 2026
Hi Suzuki,
On 09/08 17:22, Suzuki K Poulose wrote:
> Add an explicit mode to support Arm CCA guests.
>
> Signed-off-by: Suzuki K Poulose <suzuki.poulose at arm.com>
> ---
> Documentation/admin-guide/kernel-parameters.txt | 3 +++
> arch/arm64/include/asm/kvm_host.h | 1 +
> arch/arm64/kvm/arm.c | 5 +++++
> 3 files changed, 9 insertions(+)
>
> diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
> index 68647ff4bdd24..1afe3df3b923e 100644
> --- a/Documentation/admin-guide/kernel-parameters.txt
> +++ b/Documentation/admin-guide/kernel-parameters.txt
> @@ -3256,6 +3256,9 @@ Kernel parameters
> nested: VHE-based mode with support for nested
> virtualization. Requires at least ARMv8.4
> hardware (with FEAT_NV2).
> + rmm: Support for running confidential guests in Realm
> + world using RMM, as defined by Arm Confidential
> + Compute Architecture (CCA)
>
> Defaults to VHE/nVHE based on hardware support. Setting
> mode to "protected" will disable kexec and hibernation
> diff --git a/arch/arm64/include/asm/kvm_host.h b/arch/arm64/include/asm/kvm_host.h
> index b2e99c5cb1cd3..31ae9d8d8e92f 100644
> --- a/arch/arm64/include/asm/kvm_host.h
> +++ b/arch/arm64/include/asm/kvm_host.h
> @@ -69,6 +69,7 @@ enum kvm_mode {
> KVM_MODE_DEFAULT,
> KVM_MODE_PROTECTED,
> KVM_MODE_NV,
> + KVM_MODE_RMM,
> KVM_MODE_NONE,
> };
> #ifdef CONFIG_KVM
> diff --git a/arch/arm64/kvm/arm.c b/arch/arm64/kvm/arm.c
> index 9af3bbb2f8c24..50f0adfadab38 100644
> --- a/arch/arm64/kvm/arm.c
> +++ b/arch/arm64/kvm/arm.c
> @@ -3264,6 +3264,11 @@ static int __init early_kvm_mode_cfg(char *arg)
> return 0;
> }
>
> + if (strcmp(arg, "rmm") == 0 && !WARN_ON(!is_kernel_in_hyp_mode())) {
> + kvm_mode = KVM_MODE_RMM;
> + return 0;
> + }
Does this make NV support and CCA Realm VM support mutually exclusive?
Until the v16 series, we could run Realm VMs with:
'kvm-arm.mode=nested'
As far as the AArch64 architecture is concerned, there does not seem to
be a reason to make them mutually exclusive. I am therefore wondering
whether this restriction is intentional.
Thanks,
Kohei
> +
> return -EINVAL;
> }
> early_param("kvm-arm.mode", early_kvm_mode_cfg);
> --
> 2.43.0
>
More information about the linux-arm-kernel
mailing list