Re: [PATCH v16 24/45] KVM: arm64: Expose support for private memory
Suzuki K Poulose <[email protected]> Fri, 7 Aug 2026 11:12:36 +0100
| Newsgroups | dev.linux.lists.kvmarm,dev.linux.lists.linux-coco,org.infradead.lists.linux-arm-kernel,org.kernel.vger.kvm,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
On 05/08/2026 17:02, Ackerley Tng wrote: > Steven Price <[email protected]> writes: > >> Select KVM_GENERIC_MEMORY_ATTRIBUTES and provide the necessary support >> functions. >> >> Reviewed-by: Suzuki K Poulose <[email protected]> >> Signed-off-by: Steven Price <[email protected]> >> --- >> 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? Not really. The comment is about unifiying the conditions which both pKVM and Realm selects. Right now, only CCA uses guest_memfd. When pkvm comes along to use guest_memfd, this could be something like: kvm->arch.needs_private_mem (set by both pKVM and Realm) ? Cheers Suzuki > >> int kvm_arm_vcpu_finalize(struct kvm_vcpu *vcpu, int feature); >> bool kvm_arm_vcpu_is_finalized(struct kvm_vcpu *vcpu); >> >> -- >> 2.43.0