[PATCH v5 09/11] KVM: arm64: CCA: Advertise private memory support for Realms
Suzuki K Poulose
suzuki.poulose at arm.com
Tue Dec 1 15:23:27 PST 2026
On 30/11/2026 14:25, Steven Price wrote:
> Define kvm_arch_has_private_mem() so generic KVM recognizes Realm VMs as
> supporting private memory. This also enables gmem_in_place_conversion
> for arm64. Guest_memfd slots are therefore marked gmem-only even for
> non-Realm VMs, but non-Realm private-memory requests fail the VM check.
>
> Signed-off-by: Steven Price <steven.price at arm.com>
Reviewed-by: Suzuki K Poulose <suzuki.poulose at arm.com>
>
> ---
> Changes since v4:
> - Split private-memory capability advertisement from Realm memslot checks.
> ---
> arch/arm64/include/asm/kvm_host.h | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/arch/arm64/include/asm/kvm_host.h b/arch/arm64/include/asm/kvm_host.h
> index 3ddeddfacd06..55673d08e3eb 100644
> --- a/arch/arm64/include/asm/kvm_host.h
> +++ b/arch/arm64/include/asm/kvm_host.h
> @@ -1607,6 +1607,8 @@ struct kvm *kvm_arch_alloc_vm(void);
>
> #define kvm_vm_is_realm(kvm) ((kvm)->arch.vm_flavor == VM_REALM)
>
> +#define kvm_arch_has_private_mem(kvm) kvm_vm_is_realm(kvm)
> +
> #define kvm_has_mte(kvm) \
> (system_supports_mte() && \
> test_bit(KVM_ARCH_FLAG_MTE_ENABLED, &(kvm)->arch.flags))
More information about the linux-arm-kernel
mailing list