aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorStefan Hajnoczi <stefanha@redhat.com>2019-06-20 18:37:08 +0100
committerKevin Wolf <kwolf@redhat.com>2019-07-08 16:00:26 +0200
commite965ffa70ac8ddc334dd5990f6907789bd9e6af6 (patch)
tree9ee1d1a9292c3d482e73859d4778769820ebb35e /include
parent60dbc5a1c5176269669ffc26c081ab2cfb7f12f7 (diff)
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>
Diffstat (limited to 'include')
-rw-r--r--include/hw/qdev-core.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h
index fa55dc10ae..e157fc4acd 100644
--- a/include/hw/qdev-core.h
+++ b/include/hw/qdev-core.h
@@ -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