[PATCH v6 01/11] KVM: arm64: CCA: Introduce Realms

Steven Price steven.price at arm.com
Fri Dec 4 09:05:31 PST 2026


On 04/12/2026 16:07, Kohei Enju wrote:
> On 12/04 11:57, Steven Price wrote:
>> From: Suzuki K Poulose <suzuki.poulose at arm.com>
>>
>> Introduce the Realm VM flavor and per-VM state tracking. Realm and
>> protected pKVM states are mutually exclusive, so share their storage
>> in kvm_arch. Update pKVM callers of the protected VM helpers to
>> check the VM flavor.
>>
>> Realm VMs cannot be created yet; RMI initialization and the creation
>> UABI follow in later patches.
>>
>> Signed-off-by: Suzuki K Poulose <suzuki.poulose at arm.com>
>> Signed-off-by: Steven Price <steven.price at arm.com>
>> Reviewed-by: Fuad Tabba <fuad.tabba at linux.dev>
> 
> Reviewed-by: Kohei Enju <enju.kohei at fujitsu.com>
> 
> Minor nit below.
> 
> [...]
>> +/**
>> + * enum realm_state - State of a Realm
>> + *
>> + * Mirrors the RMM's Realm lifecycle states where they are meaningful to KVM,
>> + * with REALM_STATE_DYING being a KVM-internal state used to prevent further
> 
> Strictly speaking, REALM_STATE_NONE and REALM_STATE_DEAD are also
> KVM-internal states, so I think the comment should reflect this if you
> resend the series.

Good point - it's a little confusing not mentioning those two other states.

Thanks,
Steve

> Thanks,
> Kohei
> 
>> + * requests while teardown is in progress. KVM does not track REALM_SYSTEM_OFF
>> + * or REALM_ZOMBIE separately as they naturally lead to teardown.
>> + */
>> +enum realm_state {
>> +	/**
>> +	 * @REALM_STATE_NONE:
>> +	 *      Realm has not yet been created. rmi_realm_create() has not
>> +	 *      yet been called.
>> +	 */
>> +	REALM_STATE_NONE,
>> +	/**
>> +	 * @REALM_STATE_NEW:
>> +	 *      Realm is under construction, Realm Descriptor has been created,
>> +	 *      but it is not yet activated. Memory may be populated.
>> +	 */
>> +	REALM_STATE_NEW,
>> +	/**
>> +	 * @REALM_STATE_ACTIVE:
>> +	 *      Realm has been created and is eligible for execution with
>> +	 *      rmi_rec_enter(). Memory may no longer be populated with known
>> +	 *	contents.
>> +	 */
>> +	REALM_STATE_ACTIVE,
>> +	/**
>> +	 * @REALM_STATE_DYING:
>> +	 *      Realm is in the process of being destroyed or has already been
>> +	 *      destroyed.
>> +	 */
>> +	REALM_STATE_DYING,
>> +	/**
>> +	 * @REALM_STATE_DEAD:
>> +	 *      Realm has been destroyed.
>> +	 */
>> +	REALM_STATE_DEAD
>> +};




More information about the linux-arm-kernel mailing list