@@ -852,6 +852,7 @@ static void virt_irq_init(LoongArchVirtMachineState *lvms)
CPULoongArchState *env;
CPUState *cpu_state;
int cpu, pin, i, start, num;
+ Error *local_err = NULL;
/*
* Extended IRQ model.
@@ -914,8 +915,7 @@ static void virt_irq_init(LoongArchVirtMachineState *lvms)
env = &(lacpu->env);
env->address_space_iocsr = &lvms->as_iocsr;
- /* connect ipi irq to cpu irq */
- qdev_connect_gpio_out(ipi, cpu, qdev_get_gpio_in(cpudev, IRQ_IPI));
+ hotplug_handler_plug(HOTPLUG_HANDLER(ipi), cpudev, &local_err);
env->ipistate = ipi;
}
Use hotplug_handler_plug() to nofity ipi object when cold-plug cpu is created, so that ipi can set and configure irq routing to new cpu. Signed-off-by: Bibo Mao <maobibo@loongson.cn> --- hw/loongarch/virt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)