[PATCH v2 15/36] KVM: arm64: gic-v5: Implement GICv5 load/put and save/restore
Jonathan Cameron
jonathan.cameron at huawei.com
Thu Jan 8 08:52:42 PST 2026
On Thu, 8 Jan 2026 13:40:48 +0000
Sascha Bischoff <Sascha.Bischoff at arm.com> wrote:
> On Wed, 2026-01-07 at 12:28 +0000, Jonathan Cameron wrote:
> > On Fri, 19 Dec 2025 15:52:41 +0000
> > Sascha Bischoff <Sascha.Bischoff at arm.com> wrote:
> >
> > > This change introduces GICv5 load/put. Additionally, it plumbs in
> > > save/restore for:
> > >
> > > * PPIs (ICH_PPI_x_EL2 regs)
> > > * ICH_VMCR_EL2
> > > * ICH_APR_EL2
> > > * ICC_ICSR_EL1
> > >
> > > A GICv5-specific enable bit is added to struct vgic_vmcr as this
> > > differs from previous GICs. On GICv5-native systems, the VMCR only
> > > contains the enable bit (driven by the guest via ICC_CR0_EL1.EN)
> > > and
> > > the priority mask (PCR).
> > >
> > > A struct gicv5_vpe is also introduced. This currently only contains
> > > a
> > > single field - bool resident - which is used to track if a VPE is
> > > currently running or not, and is used to avoid a case of double
> > > load
> > > or double put on the WFI path for a vCPU. This struct will be
> > > extended
> > > as additional GICv5 support is merged, specifically for VPE
> > > doorbells.
> > >
> > > Co-authored-by: Timothy Hayes <timothy.hayes at arm.com>
> > > Signed-off-by: Timothy Hayes <timothy.hayes at arm.com>
> > > Signed-off-by: Sascha Bischoff <sascha.bischoff at arm.com>
> >
> >
> > > diff --git a/arch/arm64/kvm/vgic/vgic-v5.c
> > > b/arch/arm64/kvm/vgic/vgic-v5.c
> > > index 1fe1790f1f874..168447ee3fbed 100644
> > > --- a/arch/arm64/kvm/vgic/vgic-v5.c
> > > +++ b/arch/arm64/kvm/vgic/vgic-v5.c
> > > @@ -1,4 +1,7 @@
> > > // SPDX-License-Identifier: GPL-2.0-only
> > > +/*
> > > + * Copyright (C) 2025 Arm Ltd.
> > > + */
> >
> > Why in this patch? It's trivial enough that maybe it doesn't need to
> > be
> > on it's own, but the first patch touching this file seems like a more
> > logical place to find it.
>
> I wholeheartedly agree, but it was unintentionally omitted when the
> GICv5 compat mode changes were introduced. It was originally in the
> first commit in this series to touch the file, but then things got re-
> worked so it became the second. I'll make sure that it lives in the
> first commit of this series to touch the file.
I'd just throw in a trivial commit that only does this.
Then any reorders that occur before this merges don't move it.
J
>
> Sascha
>
More information about the linux-arm-kernel
mailing list