mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 09:13:55 -06:00
hw/loongarch/virt: Set iocsr address space when CPU is created
There is only one iocsr address space for the whole virt-machine board. When CPU is created, the one of percpu points to that of the board. Here set iocsr address space when CPU is created rather than IPI creation stage. Signed-off-by: Bibo Mao <maobibo@loongson.cn> Reviewed-by: Bibo Mao <maobibo@loongson.cn>
This commit is contained in:
parent
3754f985a8
commit
28bec94c7d
1 changed files with 1 additions and 1 deletions
|
@ -388,7 +388,6 @@ static void virt_irq_init(LoongArchVirtMachineState *lvms)
|
|||
cpudev = DEVICE(cpu_state);
|
||||
lacpu = LOONGARCH_CPU(cpu_state);
|
||||
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));
|
||||
|
@ -689,6 +688,7 @@ static void virt_init(MachineState *machine)
|
|||
machine->possible_cpus->cpus[i].cpu = cpu;
|
||||
lacpu = LOONGARCH_CPU(cpu);
|
||||
lacpu->phy_id = machine->possible_cpus->cpus[i].arch_id;
|
||||
lacpu->env.address_space_iocsr = &lvms->as_iocsr;
|
||||
}
|
||||
fw_cfg_add_memory(machine);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue