qemu/0501-qxl-disallow-unknown-revisions.patch

29 lines
900 B
Diff
Raw Normal View History

From 0826dcf575c1f88b5082458d3876c2bfe0a1d9a3 Mon Sep 17 00:00:00 2001
2012-10-28 18:05:07 +00:00
From: Alon Levy <alevy@redhat.com>
Date: Tue, 21 Aug 2012 13:51:32 +0300
Subject: [PATCH] qxl: disallow unknown revisions
Signed-off-by: Alon Levy <alevy@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
hw/qxl.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/qxl.c b/hw/qxl.c
index e7e9dd9..20e844f 100644
2012-10-28 18:05:07 +00:00
--- a/hw/qxl.c
+++ b/hw/qxl.c
@@ -1873,9 +1873,9 @@ static int qxl_init_common(PCIQXLDevice *qxl)
break;
#endif
default:
- pci_device_rev = QXL_DEFAULT_REVISION;
- io_size = msb_mask(QXL_IO_RANGE_SIZE * 2 - 1);
- break;
+ 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);