summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSascha Bischoff <Sascha.Bischoff@arm.com>2026-01-28 18:07:33 +0000
committerMarc Zyngier <maz@kernel.org>2026-01-30 11:14:25 +0000
commit3227c3a89d65fe7482312b7b27038d9ebd86f210 (patch)
tree3190eb04160bac73ddbbc3c1ef6d1f5fbc7dba57 /include
parent9435c1e1431003e23aa34ef8e46c30d09c3dbcb5 (diff)
irqchip/gic-v5: Check if impl is virt capable
Now that there is support for creating a GICv5-based guest with KVM, check that the hardware itself supports virtualisation, skipping the setting of struct gic_kvm_info if not. Note: If native GICv5 virt is not supported, then nor is FEAT_GCIE_LEGACY, so we are able to skip altogether. Signed-off-by: Sascha Bischoff <sascha.bischoff@arm.com> Reviewed-by: Lorenzo Pieralisi <lpieralisi@kernel.org> Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com> Link: https://patch.msgid.link/20260128175919.3828384-33-sascha.bischoff@arm.com [maz: cosmetic changes] Signed-off-by: Marc Zyngier <maz@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/irqchip/arm-gic-v5.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/irqchip/arm-gic-v5.h b/include/linux/irqchip/arm-gic-v5.h
index 68ddcdb1cec5..4cb71ce6e8ad 100644
--- a/include/linux/irqchip/arm-gic-v5.h
+++ b/include/linux/irqchip/arm-gic-v5.h
@@ -43,6 +43,7 @@
/*
* IRS registers and tables structures
*/
+#define GICV5_IRS_IDR0 0x0000
#define GICV5_IRS_IDR1 0x0004
#define GICV5_IRS_IDR2 0x0008
#define GICV5_IRS_IDR5 0x0014
@@ -63,6 +64,8 @@
#define GICV5_IRS_IST_STATUSR 0x0194
#define GICV5_IRS_MAP_L2_ISTR 0x01c0
+#define GICV5_IRS_IDR0_VIRT BIT(6)
+
#define GICV5_IRS_IDR1_PRIORITY_BITS GENMASK(22, 20)
#define GICV5_IRS_IDR1_IAFFID_BITS GENMASK(19, 16)
@@ -278,6 +281,7 @@ struct gicv5_chip_data {
u8 cpuif_pri_bits;
u8 cpuif_id_bits;
u8 irs_pri_bits;
+ bool virt_capable;
struct {
__le64 *l1ist_addr;
u32 l2_size;