qemu/system
Peter Maydell e41f32fe82 system/bootdevice: Don't unregister reset handler in restore_boot_order()
Currently the qemu_register_reset() API permits the reset handler functions
registered with it to remove themselves from within the callback function.
This is fine with our current implementation, but is a bit odd, because
generally reset is supposed to be idempotent, and doesn't fit well in a
three-phase-reset world where a resettable object will get multiple
callbacks as the system is reset.

We now have only one user of qemu_register_reset() which makes use of
the ability to unregister itself within the callback:
restore_boot_order().  We want to change our implementation of
qemu_register_reset() to something where it would be awkward to
maintain the "can self-unregister" feature.  Rather than making that
reimplementation complicated, change restore_boot_order() so that it
doesn't unregister itself but instead returns doing nothing for any
calls after it has done the "restore the boot order" work.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Acked-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20240220160622.114437-4-peter.maydell@linaro.org
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
2024-02-27 13:01:42 +00:00
..
arch_init.c
async-teardown.c
balloon.c balloon: Fix a misleading error message 2023-11-17 10:07:52 +01:00
bootdevice.c system/bootdevice: Don't unregister reset handler in restore_boot_order() 2024-02-27 13:01:42 +00:00
cpu-throttle.c qemu/main-loop: rename qemu_cond_wait_iothread() to qemu_cond_wait_bql() 2024-01-08 10:45:43 -05:00
cpu-timers.c system/cpu-timers: Introduce ICountMode enumerator 2024-01-19 12:28:59 +01:00
cpus.c qemu/main-loop: rename qemu_cond_wait_iothread() to qemu_cond_wait_bql() 2024-01-08 10:45:43 -05:00
datadir.c
device_tree.c
dirtylimit.c system/cpus: rename qemu_mutex_lock_iothread() to bql_lock() 2024-01-08 10:45:43 -05:00
dma-helpers.c scsi: assert that callbacks run in the correct AioContext 2023-12-21 22:49:27 +01:00
globals.c net: make nb_nics and nd_table[] static in net/net.c 2024-02-02 16:23:48 +00:00
ioport.c exec/ioport: Add portio_list_set_enabled() 2024-02-14 06:09:32 -05:00
main.c softmmu: pass the main loop status to gdb "Wxx" packet 2023-10-12 12:33:24 +10:00
memory_ldst.c.inc system: Move memory_ldst.c.inc to system 2024-02-13 10:59:25 +03:00
memory_mapping.c memory: follow Error API guidelines 2023-10-19 23:13:27 +02:00
memory.c system/cpus: rename qemu_mutex_lock_iothread() to bql_lock() 2024-01-08 10:45:43 -05:00
meson.build configure, meson: rename targetos to host_os 2023-12-31 09:11:29 +01:00
physmem.c system/physmem: remove redundant arg reassignment 2024-02-20 20:34:21 +03:00
qdev-monitor.c Add virtio-sound-pci device 2023-11-07 03:39:10 -05:00
qemu-seccomp.c
qtest.c system/qtest: Include missing 'hw/core/cpu.h' header 2023-12-20 10:29:23 +01:00
rtc.c
runstate-action.c
runstate-hmp-cmds.c
runstate.c qapi: Remove deprecated 'singlestep' member of StatusInfo 2024-01-19 11:38:32 +01:00
tpm-hmp-cmds.c
tpm.c
trace-events
trace.h
vl.c system/vl: Update description for input grab key 2024-02-22 08:59:16 +03:00
watchpoint.c system/watchpoint: Move TCG specific code to accel/tcg/ 2024-01-19 12:28:59 +01:00