qemu-patch-raspberry4/hw/core
Damien Hedde bc5a39bf26 hw/core: create Resettable QOM interface
This commit defines an interface allowing multi-phase reset. This aims
to solve a problem of the actual single-phase reset (built in
DeviceClass and BusClass): reset behavior is dependent on the order
in which reset handlers are called. In particular doing external
side-effect (like setting an qemu_irq) is problematic because receiving
object may not be reset yet.

The Resettable interface divides the reset in 3 well defined phases.
To reset an object tree, all 1st phases are executed then all 2nd then
all 3rd. See the comments in include/hw/resettable.h for a more complete
description. The interface defines 3 phases to let the future
possibility of holding an object into reset for some time.

The qdev/qbus reset in DeviceClass and BusClass will be modified in
following commits to use this interface. A mechanism is provided
to allow executing a transitional reset handler in place of the 2nd
phase which is executed in children-then-parent order inside a tree.
This will allow to transition devices and buses smoothly while
keeping the exact current qdev/qbus reset behavior for now.

Documentation will be added in a following commit.

Signed-off-by: Damien Hedde <damien.hedde@greensocs.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 20200123132823.1117486-4-damien.hedde@greensocs.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2020-01-30 16:02:03 +00:00
..
bus.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
cpu.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
empty_slot.c Include hw/hw.h exactly where needed 2019-08-16 13:31:52 +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 hw/core/loader: Let load_elf() populate a field with CPU-specific flags 2020-01-29 19:28:52 +01:00
hotplug.c call HotplugHandler->plug() as the last step in device realization 2018-10-19 13:44:12 +02:00
irq.c Revert "irq: introduce qemu_irq_proxy()" 2019-11-05 23:33:12 +01:00
Kconfig hw/core: Add a config switch for the generic loader device 2019-08-20 09:11:17 +02:00
loader-fit.c hw/core: Fix fit_load_fdt() error API violations 2019-12-18 08:36:15 +01:00
loader.c hw/core/loader: Let load_elf() populate a field with CPU-specific flags 2020-01-29 19:28:52 +01:00
machine-hmp-cmds.c hmp: drop Error pointer indirection in hmp_handle_error 2019-12-18 08:36:16 +01:00
machine-qmp-cmds.c qapi: report the default CPU type for each machine 2019-09-03 14:39:46 -03:00
machine.c usb-redir: remove 'remote wakeup' flag from configuration descriptor 2020-01-13 09:17:31 +01:00
Makefile.objs hw/core: create Resettable QOM interface 2020-01-30 16:02:03 +00:00
nmi.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
null-machine.c hw/core: Move cpu.c, cpu.h from qom/ to hw/core/ 2019-08-21 13:24:01 +02:00
numa.c virtio, pci, pc: fixes, features 2020-01-07 16:25:00 +00:00
or-irq.c hw/core/or-irq: Fix incorrect assert forbidding num-lines == MAX_OR_LINES 2020-01-30 16:02:01 +00:00
platform-bus.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
ptimer.c ptimer: Remove old ptimer_init_with_bh() API 2019-11-11 13:44:16 +00:00
qdev-fw.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
qdev-properties-system.c audio: add audiodev properties to frontends 2019-08-21 09:13:37 +02:00
qdev-properties.c qdev: register properties as class properties 2020-01-24 20:59:16 +01:00
qdev.c hw/core/qdev: add trace events to help with resettable transition 2020-01-30 16:02:03 +00:00
register.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
reset.c qemu/queue.h: leave head structs anonymous unless necessary 2019-01-11 15:46:55 +01:00
resettable.c hw/core: create Resettable QOM interface 2020-01-30 16:02:03 +00:00
split-irq.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
stream.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
sysbus.c sysbus: remove unused sysbus_try_create* 2020-01-07 16:06:59 +04:00
trace-events hw/core: create Resettable QOM interface 2020-01-30 16:02:03 +00:00
uboot_image.h Support u-boot noload images for arm as used by, NetBSD/evbarm GENERIC kernel. 2019-01-07 15:46:20 +00:00
vm-change-state-handler.c sysemu: Split sysemu/runstate.h off sysemu/sysemu.h 2019-08-16 13:37:36 +02:00
vmstate-if.c vmstate: add qom interface to get id 2020-01-06 18:41:32 +04:00