Skip to contentSkip to conversation

arm64: gic: increase the number of IRQ descriptors

PATCH Superseded Shanker Donthineni 1 participant 2 messages Jan 4, 2023 arm64

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm64: gic: increase the number of IRQ descriptors

The default value of NR_IRQS is not sufficient to support GICv4.1 features and ~64K LPIs. This parameter would be too small for certain server platforms where it has many IO devices and is capable of direct injection of vSGI and vLPI features.

Currently, maximum of 64 + 8192 (IRQ_BITMAP_BITS) IRQ descriptors are allowed. The vCPU creation fails after reaching count ~400 with kvm-arm.vgic_v4_enable=1.

This patch increases NR_IRQS to 1^19 to cover 64K LPIs and 262144 vSGIs (16K vPEs x 16).

---
 arch/arm64/include/asm/irq.h | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm64/include/asm/irq.h +4 -0
index 168d710a7b70..741e0e9148ed 100644
@@ -4,6 +4,10 @@
 
 #ifndef __ASSEMBLER__
 
+#if defined(CONFIG_ARM_GIC_V3_ITS)
+#define  NR_IRQS  (1 << 19)
+#endif
+
 #include <asm-generic/irq.h>
 #include <linux/irqchip/arm-gic-common.h>
 
Signature · 1 line
2.25.1
#1 lore raw

Hi,

Quoted 11 lines · Shanker Donthineni

The default value of NR_IRQS is not sufficient to support GICv4.1 features and ~64K LPIs. This parameter would be too small for certain server platforms where it has many IO devices and is capable of direct injection of vSGI and vLPI features.

Currently, maximum of 64 + 8192 (IRQ_BITMAP_BITS) IRQ descriptors are allowed. The vCPU creation fails after reaching count ~400 with kvm-arm.vgic_v4_enable=1.

This patch increases NR_IRQS to 1^19 to cover 64K LPIs and 262144 vSGIs (16K vPEs x 16).

Sorry, created a patch from the wrong kernel branch. Please review v2 patch.