From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>
Subject: [Qemu-devel] [PATCH 5/6] spice/qxl: zap spice 0.4 migration compatibility bits
Date: Mon, 10 Jan 2011 14:31:50 +0100 [thread overview]
Message-ID: <1294666311-23457-6-git-send-email-kraxel@redhat.com> (raw)
In-Reply-To: <1294666311-23457-1-git-send-email-kraxel@redhat.com>
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>
---
hw/qxl.c | 79 ++++++++------------------------------------------------------
hw/qxl.h | 4 ---
2 files changed, 10 insertions(+), 73 deletions(-)
diff --git a/hw/qxl.c b/hw/qxl.c
index 207aa63..81be592 100644
--- a/hw/qxl.c
+++ b/hw/qxl.c
@@ -1418,43 +1418,10 @@ static int qxl_post_load(void *opaque, int version)
}
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;
}
-#define QXL_SAVE_VERSION 20
-
-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;
-}
+#define QXL_SAVE_VERSION 21
static VMStateDescription 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 = {
.name = "qxl",
.version_id = QXL_SAVE_VERSION,
@@ -1519,25 +1468,17 @@ static VMStateDescription qxl_vmstate = {
VMSTATE_UINT32(last_release_offset, PCIQXLDevice),
VMSTATE_UINT32(mode, PCIQXLDevice),
VMSTATE_UINT32(ssd.unique, PCIQXLDevice),
-
- /* spice 0.4 sends/expects them */
- VMSTATE_VBUFFER_UINT32(vga.vram_ptr, PCIQXLDevice, 0, qxl_test_spice04, 0,
- vga.vram_size),
- VMSTATE_UINT32_TEST(worker_data_size, PCIQXLDevice, qxl_test_spice04),
- VMSTATE_VBUFFER_UINT32(worker_data, PCIQXLDevice, 0, qxl_test_worker_data, 0,
- worker_data_size),
-
+ 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()
},
- .subsections = (VMStateSubsection[]) {
- {
- /* additional spice 0.6 state */
- .vmsd = &qxl_vmstate_spice06,
- .needed = qxl_test_spice06,
- },{
- /* end of list */
- },
- },
};
static PCIDeviceInfo qxl_info_primary = {
diff --git a/hw/qxl.h b/hw/qxl.h
index 98e11ce..f6c450d 100644
--- a/hw/qxl.h
+++ b/hw/qxl.h
@@ -80,10 +80,6 @@ typedef struct PCIQXLDevice {
/* io bar */
uint32_t io_base;
-
- /* spice 0.4 loadvm compatibility */
- void *worker_data;
- uint32_t worker_data_size;
} PCIQXLDevice;
#define PANIC_ON(x) if ((x)) { \
--
1.7.1
next prev parent reply other threads:[~2011-01-10 13:32 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-10 13:31 [Qemu-devel] [PULL 0/6] spice patch queue Gerd Hoffmann
2011-01-10 13:31 ` [Qemu-devel] [PATCH 1/6] add migration state change notifiers Gerd Hoffmann
2011-01-10 13:31 ` [Qemu-devel] [PATCH 2/6] spice: client migration Gerd Hoffmann
2011-01-10 15:49 ` Daniel P. Berrange
2011-01-10 15:57 ` Alon Levy
2011-01-10 16:08 ` Gerd Hoffmann
2011-01-10 16:18 ` Daniel P. Berrange
2011-01-10 16:37 ` Gerd Hoffmann
2011-01-10 19:26 ` Alon Levy
2011-01-10 19:39 ` Daniel P. Berrange
2011-01-11 8:15 ` Gerd Hoffmann
2011-01-10 13:31 ` [Qemu-devel] [PATCH 3/6] spice: MAINTAINERS update Gerd Hoffmann
2011-01-10 13:31 ` [Qemu-devel] [PATCH 4/6] vnc/spice: fix "never" and "now" expire_time Gerd Hoffmann
2011-01-10 13:31 ` Gerd Hoffmann [this message]
2011-01-10 13:31 ` [Qemu-devel] [PATCH 6/6] spice: add chardev (v4) Gerd Hoffmann
-- strict thread matches above, loose matches on Subject: below --
2011-01-11 12:08 [Qemu-devel] [PULL v2 0/6] spice patch queue Gerd Hoffmann
2011-01-11 12:08 ` [Qemu-devel] [PATCH 5/6] spice/qxl: zap spice 0.4 migration compatibility bits Gerd Hoffmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1294666311-23457-6-git-send-email-kraxel@redhat.com \
--to=kraxel@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).