Received: from eggs.gnu.org ([208.118.235.92]:48946) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TJpJ9-0006Ob-JA for qemu-devel@nongnu.org; Thu, 04 Oct 2012 13:34:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TJpJ4-0000iH-C5 for qemu-devel@nongnu.org; Thu, 04 Oct 2012 13:33:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58060) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TJpJ4-0000hi-2z for qemu-devel@nongnu.org; Thu, 04 Oct 2012 13:33:54 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q94HXrIG022891 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 4 Oct 2012 13:33:53 -0400 From: =?UTF-8?q?S=C3=B8ren=20Sandmann?= Date: Thu, 4 Oct 2012 13:37:11 -0400 Message-Id: <1349372231-26019-1-git-send-email-sandmann@cs.au.dk> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH] Require spice-server 0.12.0 and spice-protocol 0.12.2 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: pbonzini@redhat.com, kraxel@redhat.com, =?UTF-8?q?S=C3=B8ren=20Sandmann=20Pedersen?= From: S=C3=B8ren Sandmann Pedersen Set the default PCI revision to QXL_REVISION_STABLE_V12, and remove the various #ifs on various subversions of spice-server 0.11.x. Also set the revision to 3 for the PC 1.2 machine for compatibility. Signed-off-by: Soren Sandmann --- configure | 10 ++-------- hw/pc_piix.c | 8 ++++++++ hw/qxl.c | 29 ----------------------------- hw/qxl.h | 5 ----- 4 files changed, 10 insertions(+), 42 deletions(-) diff --git a/configure b/configure index 8f99b7b..317a6b0 100755 --- a/configure +++ b/configure @@ -2685,20 +2685,14 @@ int main(void) { spice_server_new(); return 0; } EOF spice_cflags=3D$($pkg_config --cflags spice-protocol spice-server 2>/d= ev/null) spice_libs=3D$($pkg_config --libs spice-protocol spice-server 2>/dev/n= ull) - if $pkg_config --atleast-version=3D0.8.2 spice-server >/dev/null 2>&1 = && \ - $pkg_config --atleast-version=3D0.8.1 spice-protocol > /dev/null 2>= &1 && \ + if $pkg_config --atleast-version=3D0.12.0 spice-server >/dev/null 2>&1= && \ + $pkg_config --atleast-version=3D0.12.2 spice-protocol > /dev/null 2= >&1 && \ compile_prog "$spice_cflags" "$spice_libs" ; then spice=3D"yes" libs_softmmu=3D"$libs_softmmu $spice_libs" QEMU_CFLAGS=3D"$QEMU_CFLAGS $spice_cflags" spice_protocol_version=3D$($pkg_config --modversion spice-protocol) spice_server_version=3D$($pkg_config --modversion spice-server) - if $pkg_config --atleast-version=3D0.12.0 spice-protocol >/dev/null = 2>&1; then - spice_qxl_io_monitors_config_async=3D"yes" - fi - if $pkg_config --atleast-version=3D0.12.2 spice-protocol > /dev/null= 2>&1; then - spice_qxl_client_monitors_config=3D"yes" - fi else if test "$spice" =3D "yes" ; then feature_not_found "spice" diff --git a/hw/pc_piix.c b/hw/pc_piix.c index fd5898f..82364ab 100644 --- a/hw/pc_piix.c +++ b/hw/pc_piix.c @@ -371,6 +371,14 @@ static QEMUMachine pc_machine_v1_3 =3D { .driver =3D "ivshmem",\ .property =3D "use64",\ .value =3D "0",\ + },{\ + .driver =3D "qxl",\ + .property =3D "revision",\ + .value =3D stringify(3),\ + },{\ + .driver =3D "qxl-vga",\ + .property =3D "revision",\ + .value =3D stringify(3),\ } =20 static QEMUMachine pc_machine_v1_2 =3D { diff --git a/hw/qxl.c b/hw/qxl.c index 33169f3..c256bda 100644 --- a/hw/qxl.c +++ b/hw/qxl.c @@ -29,11 +29,6 @@ =20 #include "qxl.h" =20 -#ifndef CONFIG_QXL_IO_MONITORS_CONFIG_ASYNC -/* spice-protocol is too old, add missing definitions */ -#define QXL_IO_MONITORS_CONFIG_ASYNC (QXL_IO_FLUSH_RELEASE + 1) -#endif - /* * NOTE: SPICE_RING_PROD_ITEM accesses memory on the pci bar and as * such can be changed by the guest, so to avoid a guest trigerrable @@ -262,9 +257,6 @@ static void qxl_spice_destroy_surfaces(PCIQXLDevice *= qxl, qxl_async_io async) static void qxl_spice_monitors_config_async(PCIQXLDevice *qxl, int repla= y) { trace_qxl_spice_monitors_config(qxl->id); -/* 0x000b01 =3D=3D 0.11.1 */ -#if SPICE_SERVER_VERSION >=3D 0x000b01 && \ - defined(CONFIG_QXL_IO_MONITORS_CONFIG_ASYNC) if (replay) { /* * don't use QXL_COOKIE_TYPE_IO: @@ -286,10 +278,6 @@ static void qxl_spice_monitors_config_async(PCIQXLDe= vice *qxl, int replay) (uintptr_t)qxl_cookie_new(QXL_COOKIE_TYPE_IO, QXL_IO_MONITORS_CONFIG_ASYNC))= ; } -#else - fprintf(stderr, "qxl: too old spice-protocol/spice-server for " - "QXL_IO_MONITORS_CONFIG_ASYNC\n"); -#endif } =20 void qxl_spice_reset_image_cache(PCIQXLDevice *qxl) @@ -948,8 +936,6 @@ static void interface_async_complete(QXLInstance *sin= , uint64_t cookie_token) } } =20 -#if SPICE_SERVER_VERSION >=3D 0x000b04 - /* called from spice server thread context only */ static void interface_set_client_capabilities(QXLInstance *sin, uint8_t client_present, @@ -971,11 +957,6 @@ static void interface_set_client_capabilities(QXLIns= tance *sin, qxl_send_events(qxl, QXL_INTERRUPT_CLIENT); } =20 -#endif - -#if defined(CONFIG_QXL_CLIENT_MONITORS_CONFIG) \ - && SPICE_SERVER_VERSION >=3D 0x000b05 - static uint32_t qxl_crc32(const uint8_t *p, unsigned len) { /* @@ -1044,7 +1025,6 @@ static int interface_client_monitors_config(QXLInst= ance *sin, qxl_send_events(qxl, QXL_INTERRUPT_CLIENT_MONITORS_CONFIG); return 1; } -#endif =20 static const QXLInterface qxl_interface =3D { .base.type =3D SPICE_INTERFACE_QXL, @@ -1067,13 +1047,8 @@ static const QXLInterface qxl_interface =3D { .flush_resources =3D interface_flush_resources, .async_complete =3D interface_async_complete, .update_area_complete =3D interface_update_area_complete, -#if SPICE_SERVER_VERSION >=3D 0x000b04 .set_client_capabilities =3D interface_set_client_capabilities, -#endif -#if SPICE_SERVER_VERSION >=3D 0x000b05 && \ - defined(CONFIG_QXL_CLIENT_MONITORS_CONFIG) .client_monitors_config =3D interface_client_monitors_config, -#endif }; =20 static void qxl_enter_vga_mode(PCIQXLDevice *d) @@ -1971,14 +1946,10 @@ static int qxl_init_common(PCIQXLDevice *qxl) pci_device_rev =3D QXL_REVISION_STABLE_V10; io_size =3D 32; /* PCI region size must be pow2 */ break; -/* 0x000b01 =3D=3D 0.11.1 */ -#if SPICE_SERVER_VERSION >=3D 0x000b01 && \ - defined(CONFIG_QXL_IO_MONITORS_CONFIG_ASYNC) case 4: /* qxl-4 */ pci_device_rev =3D QXL_REVISION_STABLE_V12; io_size =3D msb_mask(QXL_IO_RANGE_SIZE * 2 - 1); break; -#endif default: error_report("Invalid revision %d for qxl device (max %d)", qxl->revision, QXL_DEFAULT_REVISION); diff --git a/hw/qxl.h b/hw/qxl.h index 5553824..e583cfb 100644 --- a/hw/qxl.h +++ b/hw/qxl.h @@ -129,12 +129,7 @@ typedef struct PCIQXLDevice { } = \ } while (0) =20 -#if 0 -/* spice-server 0.12 is still in development */ #define QXL_DEFAULT_REVISION QXL_REVISION_STABLE_V12 -#else -#define QXL_DEFAULT_REVISION QXL_REVISION_STABLE_V10 -#endif =20 /* qxl.c */ void *qxl_phys2virt(PCIQXLDevice *qxl, QXLPHYSICAL phys, int group_id); --=20 1.7.4