[PATCH 2/3] hw/mips/loongson3_virt: Fix condition of IPI IOCSR connection

Jiaxun Yang posted 3 patches 6 months, 1 week ago
There is a newer version of this series
[PATCH 2/3] hw/mips/loongson3_virt: Fix condition of IPI IOCSR connection
Posted by Jiaxun Yang 6 months, 1 week ago
This fixes Coverity CID-1547264.

Link: https://lore.kernel.org/qemu-devel/752417ad-ab72-4fed-8d1f-af41f15bc225@app.fastmail.com/
Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
---
 hw/mips/loongson3_virt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/mips/loongson3_virt.c b/hw/mips/loongson3_virt.c
index 528be84bf970..80e953512a85 100644
--- a/hw/mips/loongson3_virt.c
+++ b/hw/mips/loongson3_virt.c
@@ -575,7 +575,7 @@ static void mips_loongson3_virt_init(MachineState *machine)
         cpu_mips_clock_init(cpu);
         qemu_register_reset(main_cpu_reset, cpu);
 
-        if (ipi) {
+        if (!kvm_enabled()) {
             hwaddr base = ((hwaddr)node << 44) + virt_memmap[VIRT_IPI].base;
             base += core * 0x100;
             qdev_connect_gpio_out(ipi, i, cpu->env.irq[6]);

-- 
2.43.0