diff options
| author | Bibo Mao <maobibo@loongson.cn> | 2025-09-06 15:02:00 +0800 |
|---|---|---|
| committer | Song Gao <gaosong@loongson.cn> | 2025-09-18 17:39:57 +0800 |
| commit | cb5ee0017fc9909916383634a3f13eae05e6fe5c (patch) | |
| tree | 7888585073fb8b6bfbd507c0a8d8e688b30c34c9 /hw/loongarch/boot.c | |
| parent | 6ca2df47c9b85f630faacaba8a042cb095075599 (diff) | |
| download | focaccia-qemu-cb5ee0017fc9909916383634a3f13eae05e6fe5c.tar.gz focaccia-qemu-cb5ee0017fc9909916383634a3f13eae05e6fe5c.zip | |
hw/loongarch/virt: Register reset interface with cpu plug callback
With cpu hotplug is implemented on LoongArch virt machine, reset interface with hot-added CPU should be registered. Otherwise there will be problem if system reboots after cpu is hot-added. Now register reset interface with CPU plug callback, so that all cold/hot added CPUs let their reset interface registered. And remove reset interface with CPU unplug callback. Signed-off-by: Bibo Mao <maobibo@loongson.cn> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Tested-by: Song Gao <gaosong@loongson.cn> Message-ID: <20250906070200.3749326-4-maobibo@loongson.cn> Signed-off-by: Song Gao <gaosong@loongson.cn>
Diffstat (limited to 'hw/loongarch/boot.c')
| -rw-r--r-- | hw/loongarch/boot.c | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/hw/loongarch/boot.c b/hw/loongarch/boot.c index 5799b4c75c..a516415822 100644 --- a/hw/loongarch/boot.c +++ b/hw/loongarch/boot.c @@ -350,13 +350,6 @@ static int64_t load_kernel_info(struct loongarch_boot_info *info) return kernel_entry; } -static void reset_load_elf(void *opaque) -{ - LoongArchCPU *cpu = opaque; - - cpu_reset(CPU(cpu)); -} - static void fw_cfg_add_kernel_info(struct loongarch_boot_info *info, FWCfgState *fw_cfg) { @@ -439,12 +432,6 @@ static void loongarch_direct_kernel_boot(MachineState *ms, void loongarch_load_kernel(MachineState *ms, struct loongarch_boot_info *info) { LoongArchVirtMachineState *lvms = LOONGARCH_VIRT_MACHINE(ms); - int i; - - /* register reset function */ - for (i = 0; i < ms->smp.cpus; i++) { - qemu_register_reset(reset_load_elf, LOONGARCH_CPU(qemu_get_cpu(i))); - } info->kernel_filename = ms->kernel_filename; info->kernel_cmdline = ms->kernel_cmdline; |