From b544cbc91055d4fc6f3f01c86fced8a8191fbfa1 Mon Sep 17 00:00:00 2001 Message-Id: In-Reply-To: References: From: Alon Levy Date: Sun, 7 Oct 2012 15:31:58 +0200 Subject: [PATCH 21/27] qxl: disallow unknown revisions RH-Author: Alon Levy Message-id: <1349623920-19894-15-git-send-email-alevy@redhat.com> Patchwork-id: 42789 O-Subject: [PATCH RHEL-6.4 v2 14/16] qxl: disallow unknown revisions Bugzilla: 770842 RH-Acked-by: Gerd Hoffmann RH-Acked-by: Paolo Bonzini RH-Acked-by: Arnon Gilboa Signed-off-by: Alon Levy Signed-off-by: Gerd Hoffmann Upstream: 36839d355e4ffc77d8f937caa6bb4c5530b9237e --- hw/qxl.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) Signed-off-by: Michal Novotny --- hw/qxl.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hw/qxl.c b/hw/qxl.c index 73c7ad2..2cba57a 100644 --- a/hw/qxl.c +++ b/hw/qxl.c @@ -1816,10 +1816,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_config_set_vendor_id(config, REDHAT_PCI_VENDOR_ID); -- 1.7.11.7