As a preparation for switching to a vmstate based migration let us introduce a vmstate macro for CcwDevice.
No changes in behavior, we just added some dead code -- which should rise to life soon. Signed-off-by: Halil Pasic <pa...@linux.vnet.ibm.com> Reviewed-by: Guenther Hutzl <hu...@linux.vnet.ibm.com> --- hw/s390x/ccw-device.c | 10 ++++++++++ hw/s390x/ccw-device.h | 4 ++++ 2 files changed, 14 insertions(+) diff --git a/hw/s390x/ccw-device.c b/hw/s390x/ccw-device.c index fb8d640..f9bfa15 100644 --- a/hw/s390x/ccw-device.c +++ b/hw/s390x/ccw-device.c @@ -50,6 +50,16 @@ static void ccw_device_class_init(ObjectClass *klass, void *data) dc->props = ccw_device_properties; } +const VMStateDescription vmstate_ccw_dev = { + .name = "s390_ccw_dev", + .version_id = 1, + .minimum_version_id = 1, + .fields = (VMStateField[]) { + VMSTATE_STRUCT_POINTER(sch, CcwDevice, vmstate_subch_dev, SubchDev), + VMSTATE_END_OF_LIST() + } +}; + static const TypeInfo ccw_device_info = { .name = TYPE_CCW_DEVICE, .parent = TYPE_DEVICE, diff --git a/hw/s390x/ccw-device.h b/hw/s390x/ccw-device.h index 89c8e5d..4e6af28 100644 --- a/hw/s390x/ccw-device.h +++ b/hw/s390x/ccw-device.h @@ -27,6 +27,10 @@ typedef struct CcwDevice { CssDevId subch_id; } CcwDevice; +extern const VMStateDescription vmstate_ccw_dev; +#define VMSTATE_CCW_DEVICE(_field, _state) \ + VMSTATE_STRUCT(_field, _state, 1, vmstate_ccw_dev, CcwDevice) + typedef struct CCWDeviceClass { DeviceClass parent_class; void (*unplug)(HotplugHandler *, DeviceState *, Error **); -- 2.10.2