aboutsummaryrefslogtreecommitdiff
path: root/hw/qxl.c
diff options
context:
space:
mode:
authorAlon Levy <alevy@redhat.com>2012-08-21 13:51:32 +0300
committerGerd Hoffmann <kraxel@redhat.com>2012-09-05 17:11:55 +0200
commit36839d355e4ffc77d8f937caa6bb4c5530b9237e (patch)
treef1eb87b6b1f1722e07b77df071cc57443ee05cef /hw/qxl.c
parent511b13e2c9b426b3c56060909693de5097f0b496 (diff)
qxl: disallow unknown revisions
Signed-off-by: Alon Levy <alevy@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/qxl.c')
-rw-r--r--hw/qxl.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/hw/qxl.c b/hw/qxl.c
index baf9bb4dfb..d134a701de 100644
--- a/hw/qxl.c
+++ b/hw/qxl.c
@@ -1798,10 +1798,13 @@ static int qxl_init_common(PCIQXLDevice *qxl)
io_size = 16;
break;
case 3: /* qxl-3 */
- default:
pci_device_rev = QXL_DEFAULT_REVISION;
io_size = msb_mask(QXL_IO_RANGE_SIZE * 2 - 1);
break;
+ default:
+ error_report("Invalid revision %d for qxl device (max %d)",
+ qxl->revision, QXL_DEFAULT_REVISION);
+ return -1;
}
pci_set_byte(&config[PCI_REVISION_ID], pci_device_rev);