Commit b695c96f authored by Zhou Wang's avatar Zhou Wang
Browse files

irqchip/gic-v3-its: Fix VSYNC referencing an unmapped VPE on GIC v4.0

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: default avatarZhou Wang <wangzhou1@hisilicon.com>
parent bbf257da
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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;