[PATCH v16 24/45] KVM: arm64: Expose support for private memory

Ackerley Tng ackerleytng at google.com
Wed Aug 5 09:02:37 PDT 2026


Steven Price <steven.price at arm.com> writes:

> Select KVM_GENERIC_MEMORY_ATTRIBUTES and provide the necessary support
> functions.
>
> Reviewed-by: Suzuki K Poulose <suzuki.poulose at arm.com>
> Signed-off-by: Steven Price <steven.price at arm.com>
> ---
> Changes since v14:
>  * Switch to guest_memfd in-place memory conversion and drop support
>    for KVM_VM_MEMORY_ATTRIBUTES.
>
> [...snip...]
>
> diff --git a/arch/arm64/include/asm/kvm_host.h b/arch/arm64/include/asm/kvm_host.h
> index 15d42d1993bb..146c52f867c0 100644
> --- a/arch/arm64/include/asm/kvm_host.h
> +++ b/arch/arm64/include/asm/kvm_host.h
> @@ -1510,6 +1510,8 @@ struct kvm *kvm_arch_alloc_vm(void);
>
>  #define vcpu_is_protected(vcpu)		kvm_vm_is_protected((vcpu)->kvm)
>
> +#define kvm_arch_has_private_mem(kvm) ((kvm)->arch.is_realm)
> +

Perhaps related to Fuad's question about pKVM and CCA state: would
conditioning this on is_realm mess up pKVM?

>  int kvm_arm_vcpu_finalize(struct kvm_vcpu *vcpu, int feature);
>  bool kvm_arm_vcpu_is_finalized(struct kvm_vcpu *vcpu);
>
> --
> 2.43.0



More information about the linux-arm-kernel mailing list