mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-27 13:30:52 +00:00
spice/qxl: zap spice 0.4 migration compatibility bits
Live migration from and to spice 0.4 qxl devices isn't going to work. Rip out the bits which attempt to support that. Zap the subsection logic which is obsolete now. Bumb the version to make a clean cut. This should obviously go in before 0.14 is released. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
parent
8d86e2bfe3
commit
b67737a6cf
79
hw/qxl.c
79
hw/qxl.c
@ -1418,43 +1418,10 @@ static int qxl_post_load(void *opaque, int version)
|
|||||||
}
|
}
|
||||||
dprint(d, 1, "%s: done\n", __FUNCTION__);
|
dprint(d, 1, "%s: done\n", __FUNCTION__);
|
||||||
|
|
||||||
/* spice 0.4 compatibility -- accept but ignore */
|
|
||||||
qemu_free(d->worker_data);
|
|
||||||
d->worker_data = NULL;
|
|
||||||
d->worker_data_size = 0;
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define QXL_SAVE_VERSION 20
|
#define QXL_SAVE_VERSION 21
|
||||||
|
|
||||||
static bool qxl_test_worker_data(void *opaque, int version_id)
|
|
||||||
{
|
|
||||||
PCIQXLDevice* d = opaque;
|
|
||||||
|
|
||||||
if (d->revision != 1) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (!d->worker_data_size) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (!d->worker_data) {
|
|
||||||
d->worker_data = qemu_malloc(d->worker_data_size);
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool qxl_test_spice04(void *opaque, int version_id)
|
|
||||||
{
|
|
||||||
PCIQXLDevice* d = opaque;
|
|
||||||
return d->revision == 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool qxl_test_spice06(void *opaque)
|
|
||||||
{
|
|
||||||
PCIQXLDevice* d = opaque;
|
|
||||||
return d->revision > 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
static VMStateDescription qxl_memslot = {
|
static VMStateDescription qxl_memslot = {
|
||||||
.name = "qxl-memslot",
|
.name = "qxl-memslot",
|
||||||
@ -1486,24 +1453,6 @@ static VMStateDescription qxl_surface = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
static VMStateDescription qxl_vmstate_spice06 = {
|
|
||||||
.name = "qxl/spice06",
|
|
||||||
.version_id = QXL_SAVE_VERSION,
|
|
||||||
.minimum_version_id = QXL_SAVE_VERSION,
|
|
||||||
.fields = (VMStateField []) {
|
|
||||||
VMSTATE_INT32_EQUAL(num_memslots, PCIQXLDevice),
|
|
||||||
VMSTATE_STRUCT_ARRAY(guest_slots, PCIQXLDevice, NUM_MEMSLOTS, 0,
|
|
||||||
qxl_memslot, struct guest_slots),
|
|
||||||
VMSTATE_STRUCT(guest_primary.surface, PCIQXLDevice, 0,
|
|
||||||
qxl_surface, QXLSurfaceCreate),
|
|
||||||
VMSTATE_INT32_EQUAL(num_surfaces, PCIQXLDevice),
|
|
||||||
VMSTATE_ARRAY(guest_surfaces.cmds, PCIQXLDevice, NUM_SURFACES, 0,
|
|
||||||
vmstate_info_uint64, uint64_t),
|
|
||||||
VMSTATE_UINT64(guest_cursor, PCIQXLDevice),
|
|
||||||
VMSTATE_END_OF_LIST()
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
static VMStateDescription qxl_vmstate = {
|
static VMStateDescription qxl_vmstate = {
|
||||||
.name = "qxl",
|
.name = "qxl",
|
||||||
.version_id = QXL_SAVE_VERSION,
|
.version_id = QXL_SAVE_VERSION,
|
||||||
@ -1519,25 +1468,17 @@ static VMStateDescription qxl_vmstate = {
|
|||||||
VMSTATE_UINT32(last_release_offset, PCIQXLDevice),
|
VMSTATE_UINT32(last_release_offset, PCIQXLDevice),
|
||||||
VMSTATE_UINT32(mode, PCIQXLDevice),
|
VMSTATE_UINT32(mode, PCIQXLDevice),
|
||||||
VMSTATE_UINT32(ssd.unique, PCIQXLDevice),
|
VMSTATE_UINT32(ssd.unique, PCIQXLDevice),
|
||||||
|
VMSTATE_INT32_EQUAL(num_memslots, PCIQXLDevice),
|
||||||
/* spice 0.4 sends/expects them */
|
VMSTATE_STRUCT_ARRAY(guest_slots, PCIQXLDevice, NUM_MEMSLOTS, 0,
|
||||||
VMSTATE_VBUFFER_UINT32(vga.vram_ptr, PCIQXLDevice, 0, qxl_test_spice04, 0,
|
qxl_memslot, struct guest_slots),
|
||||||
vga.vram_size),
|
VMSTATE_STRUCT(guest_primary.surface, PCIQXLDevice, 0,
|
||||||
VMSTATE_UINT32_TEST(worker_data_size, PCIQXLDevice, qxl_test_spice04),
|
qxl_surface, QXLSurfaceCreate),
|
||||||
VMSTATE_VBUFFER_UINT32(worker_data, PCIQXLDevice, 0, qxl_test_worker_data, 0,
|
VMSTATE_INT32_EQUAL(num_surfaces, PCIQXLDevice),
|
||||||
worker_data_size),
|
VMSTATE_ARRAY(guest_surfaces.cmds, PCIQXLDevice, NUM_SURFACES, 0,
|
||||||
|
vmstate_info_uint64, uint64_t),
|
||||||
|
VMSTATE_UINT64(guest_cursor, PCIQXLDevice),
|
||||||
VMSTATE_END_OF_LIST()
|
VMSTATE_END_OF_LIST()
|
||||||
},
|
},
|
||||||
.subsections = (VMStateSubsection[]) {
|
|
||||||
{
|
|
||||||
/* additional spice 0.6 state */
|
|
||||||
.vmsd = &qxl_vmstate_spice06,
|
|
||||||
.needed = qxl_test_spice06,
|
|
||||||
},{
|
|
||||||
/* end of list */
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static PCIDeviceInfo qxl_info_primary = {
|
static PCIDeviceInfo qxl_info_primary = {
|
||||||
|
4
hw/qxl.h
4
hw/qxl.h
@ -80,10 +80,6 @@ typedef struct PCIQXLDevice {
|
|||||||
|
|
||||||
/* io bar */
|
/* io bar */
|
||||||
uint32_t io_base;
|
uint32_t io_base;
|
||||||
|
|
||||||
/* spice 0.4 loadvm compatibility */
|
|
||||||
void *worker_data;
|
|
||||||
uint32_t worker_data_size;
|
|
||||||
} PCIQXLDevice;
|
} PCIQXLDevice;
|
||||||
|
|
||||||
#define PANIC_ON(x) if ((x)) { \
|
#define PANIC_ON(x) if ((x)) { \
|
||||||
|
Loading…
Reference in New Issue
Block a user