This patchset is v3 of a previous version [1]. v2 -> v3: - Coalesced all checks in one function (Marc's feedback) - Allow sgi_ops on cpuif mismatch (to keep v4.1 doorbell mechanism that works fine even if GIC CPUIF < v4.1) v1 -> v2: - Fixed vGIC behaviour according to v1 [1] review - Removed capability detection - rely on sanitised reg read - Added vsgi specific flag (for gic and kvm) [1] https://lore.kernel.org/linux-arm-kernel/20210302102744.12692-1-lorenzo.pieralisi@xxxxxxx -- Original cover letter -- GIC v4.1 introduced changes to the GIC CPU interface; systems that integrate CPUs that do not support GIC v4.1 features (as reported in the ID_AA64PFR0_EL1.GIC bitfield) and a GIC v4.1 controller must disable in software virtual SGIs support since the CPUIF and GIC controller version mismatch results in CONSTRAINED UNPREDICTABLE behaviour at architectural level. For systems with CPUs reporting ID_AA64PFR0_EL1.GIC == b0001 integrated in a system with a GIC v4.1 it _should_ still be safe to enable vLPIs (other than vSGI) since the protocol between the GIC redistributor and the GIC CPUIF was not changed from GIC v4.0 to GIC v4.1. Cc: Marc Zyngier <maz@xxxxxxxxxx> Lorenzo Pieralisi (1): irqchip/gic-v4.1: Disable vSGI upon (GIC CPUIF < v4.1) detection arch/arm64/kvm/vgic/vgic-mmio-v3.c | 4 ++-- drivers/irqchip/irq-gic-v4.c | 27 +++++++++++++++++++++++++-- include/linux/irqchip/arm-gic-v4.h | 2 ++ 3 files changed, 29 insertions(+), 4 deletions(-) -- 2.29.1