Skip to content

Commit b6ca556

Browse files
author
Marc Zyngier
committed
irqchip/apple-aic: Advertise some level of vGICv3 compatibility
The CPUs in the Apple M1 SoC partially implement a virtual GICv3 CPU interface, although one that is incapable of HW deactivation of interrupts, nor masking the maintenance interrupt. Advertise the support to KVM. Signed-off-by: Marc Zyngier <maz@kernel.org>
1 parent 5f59229 commit b6ca556

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

drivers/irqchip/irq-apple-aic.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
#include <linux/cpuhotplug.h>
5151
#include <linux/io.h>
5252
#include <linux/irqchip.h>
53+
#include <linux/irqchip/arm-vgic-info.h>
5354
#include <linux/irqdomain.h>
5455
#include <linux/limits.h>
5556
#include <linux/of_address.h>
@@ -787,6 +788,12 @@ static int aic_init_cpu(unsigned int cpu)
787788
return 0;
788789
}
789790

791+
static struct gic_kvm_info vgic_info __initdata = {
792+
.type = GIC_V3,
793+
.no_maint_irq_mask = true,
794+
.no_hw_deactivation = true,
795+
};
796+
790797
static int __init aic_of_ic_init(struct device_node *node, struct device_node *parent)
791798
{
792799
int i;
@@ -843,6 +850,8 @@ static int __init aic_of_ic_init(struct device_node *node, struct device_node *p
843850
"irqchip/apple-aic/ipi:starting",
844851
aic_init_cpu, NULL);
845852

853+
vgic_set_kvm_info(&vgic_info);
854+
846855
pr_info("Initialized with %d IRQs, %d FIQs, %d vIPIs\n",
847856
irqc->nr_hw, AIC_NR_FIQ, AIC_NR_SWIPI);
848857

0 commit comments

Comments
 (0)