qemu/hw/core
Juraj Marcin 1b063fe2df reset: Use ResetType for qemu_devices_reset() and MachineClass::reset()
Currently, both qemu_devices_reset() and MachineClass::reset() use
ShutdownCause for the reason of the reset. However, the Resettable
interface uses ResetState, so ShutdownCause needs to be translated to
ResetType somewhere. Translating it qemu_devices_reset() makes adding
new reset types harder, as they cannot always be matched to a single
ShutdownCause here, and devices may need to check the ResetType to
determine what to reset and if to reset at all.

This patch moves this translation up in the call stack to
qemu_system_reset() and updates all MachineClass children to use the
ResetType instead.

Message-ID: <20240904103722.946194-2-jmarcin@redhat.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Juraj Marcin <jmarcin@redhat.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
2024-09-24 11:33:34 +02:00
..
bus.c hw/core: Remove transitional infrastructure from BusClass 2024-02-02 13:51:57 +00:00
clock-vmstate.c hw/core: Constify VMState 2023-12-29 11:17:30 +11:00
clock.c hw/core/clock: allow clock_propagate on child clocks 2024-04-30 15:01:05 +01:00
cpu-common.c gdbstub: Add helper function to unregister GDB register space 2024-07-22 20:15:41 -04:00
cpu-sysemu.c exec: Declare target_words_bigendian() in 'exec/tswap.h' 2024-04-26 17:03:05 +02:00
fw-path-provider.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
generic-loader.c exec: Declare target_words_bigendian() in 'exec/tswap.h' 2024-04-26 17:03:05 +02:00
gpio.c hw/qdev: Rename qdev_connect_gpio_out*() 'input_pin' parameter 2021-12-31 13:21:36 +01:00
guest-loader.c Mark remaining global TypeInfo instances as const 2022-02-21 13:30:20 +00:00
guest-loader.h hw/core: implement a guest-loader to support static hypervisor guests 2021-03-10 15:34:11 +00:00
hotplug.c call HotplugHandler->plug() as the last step in device realization 2018-10-19 13:44:12 +02:00
irq.c hw: Move declaration of IRQState to header and add init function 2024-09-11 07:20:30 -04:00
Kconfig kconfig: allow compiling out QEMU device tree code per target 2024-05-10 15:45:15 +02:00
loader-fit.c hw/core: ensure kernel_end never gets used undefined 2024-07-05 12:33:41 +01:00
loader.c loader: remove load_image_gzipped function as its not used anywhere 2024-07-16 20:04:08 +02:00
machine-hmp-cmds.c hw/core: Introduce module-id as the topology subindex 2024-04-25 12:48:12 +02:00
machine-qmp-cmds.c hw/intc: Introduce x-query-interrupt-controllers QMP command 2024-06-19 12:40:49 +02:00
machine-smp.c hw/core: allow parameter=1 for SMP topology on any machine 2024-05-17 16:49:04 +02:00
machine.c hw: add compat machines for 9.2 2024-09-05 13:12:36 +01:00
meson.build kconfig: allow compiling out QEMU device tree code per target 2024-05-10 15:45:15 +02:00
nmi.c hw/core: Improve error message when machine doesn't provide NMIs 2023-02-23 14:10:17 +01:00
null-machine.c Do not include sysemu/sysemu.h if it's not really necessary 2021-05-02 17:24:50 +02:00
numa.c hw/core: replace assert(0) with g_assert_not_reached() 2024-09-13 20:12:16 +02:00
or-irq.c hw: Use device_class_set_legacy_reset() instead of opencoding 2024-09-13 15:31:44 +01:00
platform-bus.c platform-bus: fix refcount leak 2024-09-05 13:12:37 +01:00
ptimer.c hw/core/ptimer: fix timer zero period condition for freq > 1GHz 2024-08-12 11:40:16 +01:00
qdev-clock.c Drop more useless casts from void * to pointer 2022-12-14 16:19:35 +01:00
qdev-fw.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
qdev-hotplug.c hw/core: Extract hotplug-related functions to qdev-hotplug.c 2021-11-01 19:44:11 +01:00
qdev-prop-internal.h qdev: Make qdev_propinfo_get_uint16() static 2020-12-15 10:02:07 -05:00
qdev-properties-system.c QAPI patches patches for 2024-09-10 2024-09-10 17:48:54 +01:00
qdev-properties.c qapi: Inline and remove QERR_PROPERTY_VALUE_BAD definition 2024-04-24 09:50:58 +02:00
qdev.c hw/core/qdev: Simplify legacy_reset handling 2024-09-13 15:31:45 +01:00
register.c hw/core/register: Add more 64-bit utilities 2021-09-01 11:59:12 +10:00
reset.c reset: Use ResetType for qemu_devices_reset() and MachineClass::reset() 2024-09-24 11:33:34 +02:00
resetcontainer.c hw/core: Add ResetContainer which holds objects implementing Resettable 2024-02-27 13:01:42 +00:00
resettable.c hw/core/resettable: Remove transitional_function machinery 2024-09-13 15:31:46 +01:00
split-irq.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
stream.c hw/core/stream: Rename StreamSlave as StreamSink 2020-12-10 12:15:04 -05:00
sysbus-fdt.c hw/core: Tidy up unnecessary casting away of const 2022-10-22 22:50:27 +02:00
sysbus.c hw/sysbus: Remove now unused sysbus_address_space() 2024-02-26 18:40:21 +01:00
trace-events trace-events: remove the remaining vcpu trace events 2023-06-01 11:05:05 -04:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00
uboot_image.h hw/core: Sync uboot_image.h from U-Boot v2022.01 2022-05-24 10:38:50 +10:00
vm-change-state-handler.c qdev: Add qdev_add_vm_change_state_handler_full() 2023-09-11 08:34:05 +02:00
vmstate-if.c vmstate: add qom interface to get id 2020-01-06 18:41:32 +04:00