hw/intc/loongarch_pch: fix edge triggered irq handling
commit2948c1fb6b8d806d92394ec358e6ed727e946df9
authorBibo Mao <maobibo@loongson.cn>
Fri, 7 Jul 2023 09:15:57 +0000 (7 17:15 +0800)
committerSong Gao <gaosong@loongson.cn>
Thu, 24 Aug 2023 03:17:59 +0000 (24 11:17 +0800)
treed8797b8cfa3c65663bc57f255c7298fb3df8895b
parent14f21f673a01cf3efa22a70256947fb9b6bbfdfa
hw/intc/loongarch_pch: fix edge triggered irq handling

For edge triggered irq, qemu_irq_pulse is used to inject irq. It will
set irq with high level and low level soon to simluate pulse irq.

For edge triggered irq, irq is injected and set as pending at rising
level, do not clear irq at lowering level. LoongArch pch interrupt will
clear irq for lowering level irq, there will be problem. ACPI ged deivce
is edge-triggered irq, it is used for cpu/memory hotplug.

This patch fixes memory hotplug issue on LoongArch virt machine.

Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Reviewed-by: Song Gao <gaosong@loongson.cn>
Message-Id: <20230707091557.1474790-1-maobibo@loongson.cn>
Signed-off-by: Song Gao <gaosong@loongson.cn>
hw/intc/loongarch_pch_pic.c