[Spice-devel] [PATCH 32/35] [rhel6 compat]: qxl: compat io size

alexl at redhat.com alexl at redhat.com
Thu Sep 9 10:16:15 PDT 2010


From: Gerd Hoffmann <kraxel at redhat.com>

---
 hw/qxl.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/hw/qxl.c b/hw/qxl.c
index 6c76bdc..991858e 100644
--- a/hw/qxl.c
+++ b/hw/qxl.c
@@ -1162,6 +1162,7 @@ static int qxl_init(PCIDevice *dev)
     ram_addr_t ram_size = msb_mask(qxl->vga.vram_size * 2 - 1);
     uint32_t pci_device_id;
     uint32_t pci_device_rev;
+    uint32_t io_size;
 
     if (device_id == 0 && dev->qdev.hotplugged) {
         device_id++;
@@ -1247,9 +1248,13 @@ static int qxl_init(PCIDevice *dev)
     qxl->vram_size = msb_mask(qxl->vram_size * 2 - 1);
     qxl->vram_offset = qemu_ram_alloc(&qxl->pci.qdev, "qxl.vram", qxl->vram_size);
 
+    io_size = msb_mask(QXL_IO_RANGE_SIZE * 2 - 1);
+    if (qxl->revision == 1) {
+        io_size = 8;
+    }
+
     pci_register_bar(&qxl->pci, QXL_IO_RANGE_INDEX,
-                     msb_mask(QXL_IO_RANGE_SIZE * 2 - 1),
-                     PCI_BASE_ADDRESS_SPACE_IO, qxl_map);
+                     io_size, PCI_BASE_ADDRESS_SPACE_IO, qxl_map);
 
     pci_register_bar(&qxl->pci, QXL_ROM_RANGE_INDEX,
                      qxl->rom_size, PCI_BASE_ADDRESS_SPACE_MEMORY,
-- 
1.7.0.1



More information about the Spice-devel mailing list