]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
KVM: arm64: vgic-v5: Move PPI caps into kvm_vgic_global_state
authorMarc Zyngier <maz@kernel.org>
Wed, 20 May 2026 09:19:33 +0000 (10:19 +0100)
committerMarc Zyngier <maz@kernel.org>
Fri, 22 May 2026 09:04:49 +0000 (10:04 +0100)
Constant vgic properties are usually kept in kvm_vgic_global_state,
but the vgic-v5 code does its own thing.

Move the ppi_caps data into the global structure, which has the
modest additional advantage of making it ro_after_init.

Link: https://lore.kernel.org/r/20260520091949.542365-3-maz@kernel.org
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/kvm/vgic/vgic-v5.c
include/kvm/arm_vgic.h

index c0d36658ffe7402be497e2d1dbe84828ad8034bf..7c146fccc968995b0b949711096d6cc01760da65 100644 (file)
@@ -10,7 +10,7 @@
 
 #include "vgic.h"
 
-static struct vgic_v5_ppi_caps ppi_caps;
+#define ppi_caps       kvm_vgic_global_state.vgic_v5_ppi_caps
 
 /*
  * Not all PPIs are guaranteed to be implemented for GICv5. Deterermine which
index 1388dc6028a9a61c327d093e217072540dfb0900..ea793479ab25450bd15cbabca9a043209f638572 100644 (file)
@@ -177,6 +177,11 @@ struct vgic_global {
        bool                    has_gcie_v3_compat;
 
        u32                     ich_vtr_el2;
+
+       /* GICv5 PPI capabilities */
+       struct {
+               DECLARE_BITMAP(impl_ppi_mask, VGIC_V5_NR_PRIVATE_IRQS);
+       } vgic_v5_ppi_caps;
 };
 
 extern struct vgic_global kvm_vgic_global_state;
@@ -492,11 +497,6 @@ struct vgic_v5_cpu_if {
        struct gicv5_vpe gicv5_vpe;
 };
 
-/* What PPI capabilities does a GICv5 host have */
-struct vgic_v5_ppi_caps {
-       DECLARE_BITMAP(impl_ppi_mask, VGIC_V5_NR_PRIVATE_IRQS);
-};
-
 struct vgic_cpu {
        /* CPU vif control registers for world switch */
        union {