From: Peng Fan <[email protected]> With Linux Kernel 5.15 commit 6abbd6988971a ("irqchip/gic, gic-v3: Make SGIs use handle_percpu_devid_irq()"), the on_each_cpu IPI_CALL_FUNC interrupt active flag will not be cleared until interrupt handler finish.
Without Jailhouse hypervisor enabled, everything is ok, but when enabling jailhouse, HCR_EL2.[FMO | IMO] is set, that means NS-EL1 is actually accessing GICV_DIR when eoi_irq after enter_hypervisor return. It not able to deactive the interrupt that is actually a phyiscal irq which in active state. Signed-off-by: Peng Fan <[email protected]> --- Note: Not tested on Hardware. hypervisor/arch/arm-common/gic-v2.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hypervisor/arch/arm-common/gic-v2.c b/hypervisor/arch/arm-common/gic-v2.c index 31371de9..8a9f6201 100644 --- a/hypervisor/arch/arm-common/gic-v2.c +++ b/hypervisor/arch/arm-common/gic-v2.c @@ -101,6 +101,7 @@ static int gicv2_cpu_init(struct per_cpu *cpu_data) unsigned int mnt_irq = system_config->platform_info.arm.maintenance_irq; u32 vtr, vmcr; u32 cell_gicc_ctlr, cell_gicc_pmr; + u32 gicd_isacter; unsigned int n; /* @@ -168,6 +169,10 @@ static int gicv2_cpu_init(struct per_cpu *cpu_data) cpu_data->public.gicc_initialized = true; + /* Deactivate all active SGIs */ + gicd_isacter = mmio_read32(gicd_base + GICD_ISACTIVER); + mmio_write32(gicd_base + GICD_ICACTIVER, gicd_isacter & 0xffff); + /* * Forward any pending physical SGIs to the virtual queue. * We will convert them into self-inject SGIs, ignoring the original -- 2.25.1 -- You received this message because you are subscribed to the Google Groups "Jailhouse" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jailhouse-dev/20210930070704.2315052-2-peng.fan%40oss.nxp.com.
