mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-01 06:43:53 -06:00
qdev: add qdev_add_vm_change_state_handler()
Children sometimes depend on their parent's vm change state handler having completed. Add a vm change state handler API for devices that guarantees tree depth ordering. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
60dbc5a1c5
commit
e965ffa70a
3 changed files with 67 additions and 0 deletions
|
@ -6,6 +6,7 @@
|
|||
#include "qom/object.h"
|
||||
#include "hw/irq.h"
|
||||
#include "hw/hotplug.h"
|
||||
#include "sysemu/sysemu.h"
|
||||
|
||||
enum {
|
||||
DEV_NVECTORS_UNSPECIFIED = -1,
|
||||
|
@ -450,4 +451,8 @@ static inline bool qbus_is_hotpluggable(BusState *bus)
|
|||
void device_listener_register(DeviceListener *listener);
|
||||
void device_listener_unregister(DeviceListener *listener);
|
||||
|
||||
VMChangeStateEntry *qdev_add_vm_change_state_handler(DeviceState *dev,
|
||||
VMChangeStateHandler *cb,
|
||||
void *opaque);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue