[PATCH v2 01/20] KVM: arm64: Only allow ptrauth for a pVM on a system with full ptrauth
Fuad Tabba
fuad.tabba at linux.dev
Thu Dec 3 05:26:48 PST 2026
Hi Vincent,
On Thu, 03 Dec 2026 11:47:26 +0000, Vincent Donnefort
<vdonnefort at google.com> wrote:
[...]
> If we mandate both GENERIC and ADDRESS on the host, do we need to also update
> vm_has_ptrauth() to
>
> system_has_full_ptr_auth() && (kvm_vcpu_has_feature(kvm, KVM_ARM_VCPU_PTRAUTH_ADDRESS) ||
> kvm_vcpu_has_feature(kvm, KVM_ARM_VCPU_PTRAUTH_GENERIC)
I don't think we need to. EL2 masks a protected VM's vCPU features with
kvm_pkvm_vcpu_allowed_features(), so with this patch the VM only has
the ptrauth features on a system with full ptrauth.
> and pvmid_aa64isar1 to
>
> MAX_FEAT_FUNC(GPA, IMP, vm_has_ptrauth),
> MAX_FEAT_FUNC(GPI, IMP, vm_has_ptrauth),
That's already in mainline, as commit 50e9e6b6eb3d ("KVM: arm64: Hide
generic ptrauth from protected VMs without ptrauth").
Cheers,
/fuad
More information about the linux-arm-kernel
mailing list