Re: [PATCH v2 01/19] KVM: arm64: Hide generic ptrauth from protected VMs without ptrauth
From: Marc Zyngier
Date: Tue Nov 17 2026 - 14:42:04 EST
On Mon, 09 Nov 2026 08:48:36 +0000,
Fuad Tabba <fuad.tabba@xxxxxxxxx> wrote:
>
> A protected VM without the ptrauth vCPU features shouldn't have pointer
> authentication in its ID registers. Commit 3d7ff00700d1 ("KVM: arm64:
> Rework specifying restricted features for protected VMs") gated APA,
> API, APA3 and GPA3 on vm_has_ptrauth(), but left GPA and GPI capped
> at IMP. So generic authentication is advertised to a protected guest
> without ptrauth, and PACGA UNDEFs.
>
> Gate GPA and GPI on vm_has_ptrauth() too.
>
> Fixes: 3d7ff00700d1 ("KVM: arm64: Rework specifying restricted features for protected VMs")
> Signed-off-by: Fuad Tabba <fuad.tabba@xxxxxxxxx>
> ---
> arch/arm64/kvm/hyp/nvhe/sys_regs.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm64/kvm/hyp/nvhe/sys_regs.c b/arch/arm64/kvm/hyp/nvhe/sys_regs.c
> index 32e82653ebf7e..e5502d5651b05 100644
> --- a/arch/arm64/kvm/hyp/nvhe/sys_regs.c
> +++ b/arch/arm64/kvm/hyp/nvhe/sys_regs.c
> @@ -157,8 +157,8 @@ static const struct pvm_ftr_bits pvmid_aa64isar1[] = {
> MAX_FEAT(ID_AA64ISAR1_EL1, JSCVT, IMP),
> MAX_FEAT(ID_AA64ISAR1_EL1, FCMA, IMP),
> MAX_FEAT(ID_AA64ISAR1_EL1, LRCPC, LRCPC3),
> - MAX_FEAT(ID_AA64ISAR1_EL1, GPA, IMP),
> - MAX_FEAT(ID_AA64ISAR1_EL1, GPI, IMP),
> + MAX_FEAT_FUNC(ID_AA64ISAR1_EL1, GPA, IMP, vm_has_ptrauth),
> + MAX_FEAT_FUNC(ID_AA64ISAR1_EL1, GPI, IMP, vm_has_ptrauth),
> MAX_FEAT(ID_AA64ISAR1_EL1, FRINTTS, IMP),
> MAX_FEAT(ID_AA64ISAR1_EL1, SB, IMP),
> MAX_FEAT(ID_AA64ISAR1_EL1, SPECRES, COSP_RCTX),
Burying a fix in a selftest series is a recipe to make sure it is
ignored for a full cycle... Why isn't that with the "massive feature
set" series?
M.
--
Without deviation from the norm, progress is not possible.