[PATCH v17 06/20] KVM: arm64: CCA: Add a new mode for supporting Realm guests

Marc Zyngier maz at kernel.org
Wed Sep 9 03:48:58 PDT 2026


On Wed, 09 Sep 2026 04:26:41 +0100,
Kohei Enju <enju.kohei at fujitsu.com> wrote:
> 
> 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.

I have a hack somewhere that will allow this, but this requires to
change the above to be a capability mask rather than a simple
enumeration. I'll see if I can spin that as a separate series.

	M.

-- 
Without deviation from the norm, progress is not possible.



More information about the linux-arm-kernel mailing list