mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
hw/loongarch/virt: Add reset support for kernel irqchip
When system reboot, interrupt controller is restored to initial state. However if interrupt controller extioi/ipi/pch_pic is emulated in kernel, it should notify kvm to do so. Here suspend and restore API is used for reset, set initial state in qemu user space and restore API is used to notify kvm to reload register state. Reviewed-by: Song Gao <gaosong@loongson.cn> Signed-off-by: Bibo Mao <maobibo@loongson.cn> Message-ID: <20250606063033.2557365-11-maobibo@loongson.cn> Signed-off-by: Song Gao <gaosong@loongson.cn>
This commit is contained in:
parent
0dd6798a1a
commit
c642ddf19b
6 changed files with 24 additions and 0 deletions
|
@ -122,6 +122,10 @@ static void loongarch_ipi_reset_hold(Object *obj, ResetType type)
|
|||
core->clear = 0;
|
||||
memset(core->buf, 0, sizeof(core->buf));
|
||||
}
|
||||
|
||||
if (kvm_irqchip_in_kernel()) {
|
||||
kvm_ipi_put(obj, 0);
|
||||
}
|
||||
}
|
||||
|
||||
static void loongarch_ipi_cpu_plug(HotplugHandler *hotplug_dev,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue