|
@@ -95,6 +95,7 @@ typedef void (*DeviceUnrealize)(DeviceState *dev);
|
|
typedef void (*DeviceReset)(DeviceState *dev);
|
|
typedef void (*DeviceReset)(DeviceState *dev);
|
|
typedef void (*BusRealize)(BusState *bus, Error **errp);
|
|
typedef void (*BusRealize)(BusState *bus, Error **errp);
|
|
typedef void (*BusUnrealize)(BusState *bus);
|
|
typedef void (*BusUnrealize)(BusState *bus);
|
|
|
|
+typedef int (*DeviceSyncConfig)(DeviceState *dev, Error **errp);
|
|
|
|
|
|
/**
|
|
/**
|
|
* struct DeviceClass - The base class for all devices.
|
|
* struct DeviceClass - The base class for all devices.
|
|
@@ -103,6 +104,9 @@ typedef void (*BusUnrealize)(BusState *bus);
|
|
* property is changed to %true.
|
|
* property is changed to %true.
|
|
* @unrealize: Callback function invoked when the #DeviceState:realized
|
|
* @unrealize: Callback function invoked when the #DeviceState:realized
|
|
* property is changed to %false.
|
|
* property is changed to %false.
|
|
|
|
+ * @sync_config: Callback function invoked when QMP command device-sync-config
|
|
|
|
+ * is called. Should synchronize device configuration from host to guest part
|
|
|
|
+ * and notify the guest about the change.
|
|
* @hotpluggable: indicates if #DeviceClass is hotpluggable, available
|
|
* @hotpluggable: indicates if #DeviceClass is hotpluggable, available
|
|
* as readonly "hotpluggable" property of #DeviceState instance
|
|
* as readonly "hotpluggable" property of #DeviceState instance
|
|
*
|
|
*
|
|
@@ -162,6 +166,7 @@ struct DeviceClass {
|
|
DeviceReset legacy_reset;
|
|
DeviceReset legacy_reset;
|
|
DeviceRealize realize;
|
|
DeviceRealize realize;
|
|
DeviceUnrealize unrealize;
|
|
DeviceUnrealize unrealize;
|
|
|
|
+ DeviceSyncConfig sync_config;
|
|
|
|
|
|
/**
|
|
/**
|
|
* @vmsd: device state serialisation description for
|
|
* @vmsd: device state serialisation description for
|
|
@@ -547,6 +552,7 @@ bool qdev_hotplug_allowed(DeviceState *dev, Error **errp);
|
|
*/
|
|
*/
|
|
HotplugHandler *qdev_get_hotplug_handler(DeviceState *dev);
|
|
HotplugHandler *qdev_get_hotplug_handler(DeviceState *dev);
|
|
void qdev_unplug(DeviceState *dev, Error **errp);
|
|
void qdev_unplug(DeviceState *dev, Error **errp);
|
|
|
|
+int qdev_sync_config(DeviceState *dev, Error **errp);
|
|
void qdev_simple_device_unplug_cb(HotplugHandler *hotplug_dev,
|
|
void qdev_simple_device_unplug_cb(HotplugHandler *hotplug_dev,
|
|
DeviceState *dev, Error **errp);
|
|
DeviceState *dev, Error **errp);
|
|
void qdev_machine_creation_done(void);
|
|
void qdev_machine_creation_done(void);
|