Re: [PATCH 1/7] KVM: arm64: Reject the GICv5 CPU interface hypercalls under pKVM

From: Fuad Tabba

Date: Tue Sep 15 2026 - 10:43:33 EST


On Tue, 15 Sept 2026 at 15:02, Marc Zyngier <maz@xxxxxxxxxx> wrote:
>
> On Tue, 15 Sep 2026 13:38:40 +0100,
> Fuad Tabba <fuad.tabba@xxxxxxxxx> wrote:
> >
>
> [...]
>
> > diff --git a/arch/arm64/kvm/hyp/nvhe/hyp-main.c b/arch/arm64/kvm/hyp/nvhe/hyp-main.c
> > index 9a3b92e626adb..7c939baf9c1ba 100644
> > --- a/arch/arm64/kvm/hyp/nvhe/hyp-main.c
> > +++ b/arch/arm64/kvm/hyp/nvhe/hyp-main.c
> > @@ -911,6 +911,8 @@ static const hcall_t host_hcall[] = {
> > HANDLE_FUNC(__kvm_enable_ssbs),
> > HANDLE_FUNC(__vgic_v3_init_lrs),
> > HANDLE_FUNC(__vgic_v3_get_gic_config),
> > + HANDLE_FUNC(__vgic_v5_save_apr),
> > + HANDLE_FUNC(__vgic_v5_restore_vmcr_apr),
> > HANDLE_FUNC(__pkvm_prot_finalize),
> >
> > HANDLE_FUNC(__kvm_adjust_pc),
> > @@ -932,8 +934,6 @@ static const hcall_t host_hcall[] = {
> > HANDLE_FUNC(__tracing_write_event),
> > HANDLE_FUNC(__vgic_v3_save_aprs),
> > HANDLE_FUNC(__vgic_v3_restore_vmcr_aprs),
> > - HANDLE_FUNC(__vgic_v5_save_apr),
> > - HANDLE_FUNC(__vgic_v5_restore_vmcr_apr),
> >
> > HANDLE_FUNC(__pkvm_host_share_hyp),
> > HANDLE_FUNC(__pkvm_host_unshare_hyp),
>
> Why moving things in the array? The whole point of HANDLE_FUNC() is to
> abstract the position.

It's only cosmetic. The array is in the same order as the enum today,
entry for entry.

Cheers,
/fuad

>
> M.
>
> --
> Without deviation from the norm, progress is not possible.