[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 02/16] hw/i386/vmport: Add compatability version field
From: |
Liran Alon |
Subject: |
[PATCH v2 02/16] hw/i386/vmport: Add compatability version field |
Date: |
Tue, 10 Mar 2020 18:53:18 +0200 |
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 <address@hidden>
---
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
- [PATCH v2 00/16]: hw/i386/vmport: Bug fixes and improvements, Liran Alon, 2020/03/10
- [PATCH v2 01/16] hw/i386/vmport: Add device properties, Liran Alon, 2020/03/10
- [PATCH v2 02/16] hw/i386/vmport: Add compatability version field,
Liran Alon <=
- [PATCH v2 04/16] hw/i386/vmport: Set EAX to -1 on failed and unsupported commands, Liran Alon, 2020/03/10
- [PATCH v2 03/16] hw/i386/vmport: Propagate IOPort read to vCPU EAX register, Liran Alon, 2020/03/10
- [PATCH v2 05/16] hw/i386/vmport: Introduce vmx-version property, Liran Alon, 2020/03/10
- [PATCH v2 06/16] hw/i386/vmport: Report VMX type in CMD_GETVERSION, Liran Alon, 2020/03/10
- [PATCH v2 07/16] hw/i386/vmport: Introduce vmport.h, Liran Alon, 2020/03/10
- [PATCH v2 09/16] hw/i386/vmport: Add support for CMD_GETBIOSUUID, Liran Alon, 2020/03/10
- [PATCH v2 10/16] hw/i386/vmport: Add support for CMD_GETTIME, Liran Alon, 2020/03/10
- [PATCH v2 11/16] hw/i386/vmport: Add support for CMD_GETTIMEFULL, Liran Alon, 2020/03/10
- [PATCH v2 12/16] hw/i386/vmport: Add support for CMD_GET_VCPU_INFO, Liran Alon, 2020/03/10
- [PATCH v2 13/16] hw/i386/vmport: Allow x2apic without IR, Liran Alon, 2020/03/10