From patchwork Mon Jan 10 13:31:50 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 78155 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 93345B70A9 for ; Tue, 11 Jan 2011 01:00:51 +1100 (EST) Received: from localhost ([127.0.0.1]:60694 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PcHuW-0004z9-Pv for incoming@patchwork.ozlabs.org; Mon, 10 Jan 2011 08:35:48 -0500 Received: from [140.186.70.92] (port=33507 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PcHqt-00039D-9S for qemu-devel@nongnu.org; Mon, 10 Jan 2011 08:32:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PcHqr-0002tf-Au for qemu-devel@nongnu.org; Mon, 10 Jan 2011 08:32:03 -0500 Received: from mx1.redhat.com ([209.132.183.28]:8637) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PcHqr-0002tS-36 for qemu-devel@nongnu.org; Mon, 10 Jan 2011 08:32:01 -0500 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id p0ADW0Ix020841 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 10 Jan 2011 08:32:00 -0500 Received: from rincewind.home.kraxel.org (vpn2-8-96.ams2.redhat.com [10.36.8.96]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p0ADVvw0000402; Mon, 10 Jan 2011 08:31:58 -0500 Received: by rincewind.home.kraxel.org (Postfix, from userid 500) id 10CC8415FB; Mon, 10 Jan 2011 14:31:51 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Mon, 10 Jan 2011 14:31:50 +0100 Message-Id: <1294666311-23457-6-git-send-email-kraxel@redhat.com> In-Reply-To: <1294666311-23457-1-git-send-email-kraxel@redhat.com> References: <1294666311-23457-1-git-send-email-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. Cc: Gerd Hoffmann Subject: [Qemu-devel] [PATCH 5/6] spice/qxl: zap spice 0.4 migration compatibility bits X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 --- 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)) { \