virt inclusion category: other bugzilla: https://gitee.com/openeuler/kernel/issues/IARQ2V
-------------------------------------------------------------------------
A VMAPP followed by a VSYNC is a bug, as the later references a VPE that has been unmapped by the former.
Fix it by eliding the VSYNC in this scenario.
NOTE:
Mainline already has related patch[1], but missing code to handle GICv4.0 case. Mainline is waiting GIC spec to be modified, then add a patch like this one.
[1] https://lore.kernel.org/r/20240406022737.3898763-1-tangnianyao@huawei.com
Signed-off-by: Zhou Wang wangzhou1@hisilicon.com --- drivers/irqchip/irq-gic-v3-its.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c index 30b1dca42659..7d656615b271 100644 --- a/drivers/irqchip/irq-gic-v3-its.c +++ b/drivers/irqchip/irq-gic-v3-its.c @@ -1114,6 +1114,8 @@ static struct its_vpe *its_build_vmapp_cmd(struct its_node *its, * no need to issue a VSYNC. */ vpe = NULL; + } else if (is_v4(its)) { + vpe = NULL; }
goto out;