diff mbox

[v2] qxl: bump pci rev

Message ID 1310057455-18570-11-git-send-email-alevy@redhat.com
State New
Headers show

Commit Message

Alon Levy July 7, 2011, 4:50 p.m. UTC
From: Gerd Hoffmann <kraxel@redhat.com>

Inform guest drivers about the new features I/O commands we have
now (async commands, S3 support).

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 hw/qxl.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

Comments

Gerd Hoffmann July 8, 2011, 7:19 a.m. UTC | #1
Hi,

> -        DEFINE_PROP_UINT32("revision", PCIQXLDevice, revision, 2),
> +        DEFINE_PROP_UINT32("revision", PCIQXLDevice, revision, 3),

Can't be done unconditionally.  With an older libspice we can't support 
the rev3 features.

cheers,
   Gerd
Alon Levy July 8, 2011, 8:02 a.m. UTC | #2
On Fri, Jul 08, 2011 at 09:19:10AM +0200, Gerd Hoffmann wrote:
>   Hi,
> 
> >-        DEFINE_PROP_UINT32("revision", PCIQXLDevice, revision, 2),
> >+        DEFINE_PROP_UINT32("revision", PCIQXLDevice, revision, 3),
> 
> Can't be done unconditionally.  With an older libspice we can't
> support the rev3 features.

ok. so this needs a runtime check for major_version.minor_version >= 3.1, no? a compile
time won't work because someone can change the shared object, no? (maybe I should just
check this scenario).

> 
> cheers,
>   Gerd
diff mbox

Patch

diff --git a/hw/qxl.c b/hw/qxl.c
index f72d5b8..395d994 100644
--- a/hw/qxl.c
+++ b/hw/qxl.c
@@ -1541,9 +1541,12 @@  static int qxl_init_common(PCIQXLDevice *qxl)
         pci_device_rev = QXL_REVISION_STABLE_V04;
         break;
     case 2: /* spice 0.6 -- qxl-2 */
-    default:
         pci_device_rev = QXL_REVISION_STABLE_V06;
         break;
+    case 3: /* qxl-3 */
+    default:
+        pci_device_rev = 3;
+        break;
     }
 
     pci_set_byte(&config[PCI_REVISION_ID], pci_device_rev);
@@ -1807,7 +1810,7 @@  static PCIDeviceInfo qxl_info_primary = {
     .qdev.props = (Property[]) {
         DEFINE_PROP_UINT32("ram_size", PCIQXLDevice, vga.vram_size, 64 * 1024 * 1024),
         DEFINE_PROP_UINT32("vram_size", PCIQXLDevice, vram_size, 64 * 1024 * 1024),
-        DEFINE_PROP_UINT32("revision", PCIQXLDevice, revision, 2),
+        DEFINE_PROP_UINT32("revision", PCIQXLDevice, revision, 3),
         DEFINE_PROP_UINT32("debug", PCIQXLDevice, debug, 0),
         DEFINE_PROP_UINT32("guestdebug", PCIQXLDevice, guestdebug, 0),
         DEFINE_PROP_UINT32("cmdlog", PCIQXLDevice, cmdlog, 0),
@@ -1828,7 +1831,7 @@  static PCIDeviceInfo qxl_info_secondary = {
     .qdev.props = (Property[]) {
         DEFINE_PROP_UINT32("ram_size", PCIQXLDevice, vga.vram_size, 64 * 1024 * 1024),
         DEFINE_PROP_UINT32("vram_size", PCIQXLDevice, vram_size, 64 * 1024 * 1024),
-        DEFINE_PROP_UINT32("revision", PCIQXLDevice, revision, 2),
+        DEFINE_PROP_UINT32("revision", PCIQXLDevice, revision, 3),
         DEFINE_PROP_UINT32("debug", PCIQXLDevice, debug, 0),
         DEFINE_PROP_UINT32("guestdebug", PCIQXLDevice, guestdebug, 0),
         DEFINE_PROP_UINT32("cmdlog", PCIQXLDevice, cmdlog, 0),