No functional change. This is done as a preparation for the following patches which will change guest-visible behavior. Adding this version field will allow us to maintain migration compatability from new QEMU version to old QEMU version (Given machine-type is the compatabile).
Signed-off-by: Liran Alon <liran.a...@oracle.com> --- hw/i386/vmport.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/hw/i386/vmport.c b/hw/i386/vmport.c index 8d7513e2a23c..ca4d95fc017f 100644 --- a/hw/i386/vmport.c +++ b/hw/i386/vmport.c @@ -44,6 +44,8 @@ typedef struct VMPortState { MemoryRegion io; VMPortReadFunc *func[VMPORT_ENTRIES]; void *opaque[VMPORT_ENTRIES]; + + uint8_t version; } VMPortState; static VMPortState *port_state; @@ -156,6 +158,12 @@ static void vmport_realizefn(DeviceState *dev, Error **errp) } static Property vmport_properties[] = { + /* + * Used to enforce compatibility for migration. + * On every guest-visible change, should make changes conditioned on + * version and define proper version for previous machine-types. + */ + DEFINE_PROP_UINT8("version", VMPortState, version, 1), DEFINE_PROP_END_OF_LIST(), }; -- 2.20.1