qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Alon Levy <alevy@redhat.com>
To: qemu-devel@nongnu.org, kraxel@redhat.com
Subject: [Qemu-devel] [PATCH v5 1.2 queue 2/4] qxl: disallow unknown revisions
Date: Fri, 17 Aug 2012 14:50:50 +0300	[thread overview]
Message-ID: <1345204252-8205-3-git-send-email-alevy@redhat.com> (raw)
In-Reply-To: <1345204252-8205-1-git-send-email-alevy@redhat.com>

Signed-off-by: Alon Levy <alevy@redhat.com>
---
 hw/qxl.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/hw/qxl.c b/hw/qxl.c
index 6c48eb9..c978f5e 100644
--- a/hw/qxl.c
+++ b/hw/qxl.c
@@ -1797,10 +1797,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);
-- 
1.7.11.2

  parent reply	other threads:[~2012-08-17 11:51 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-17 11:50 [Qemu-devel] [PATCH v5 1.2 queue 0/4] QXL_IO_MONITORS_CONFIG_ASYNC + misc Alon Levy
2012-08-17 11:50 ` [Qemu-devel] [PATCH v5 1.2 queue 1/4] qxl/update_area_io: guest_bug on invalid parameters Alon Levy
2012-08-17 11:50 ` Alon Levy [this message]
2012-08-17 11:50 ` [Qemu-devel] [PATCH v5 1.2 queue 3/4] qxl: add QXL_IO_MONITORS_CONFIG_ASYNC Alon Levy
2012-08-17 12:38   ` [Qemu-devel] [PATCH v6 1.2] " Alon Levy
2012-08-17 15:39   ` [Qemu-devel] [PATCH v7 " Alon Levy
2012-08-18 14:31     ` Blue Swirl
2012-08-18 16:16       ` Alon Levy
2012-08-18 19:07         ` Blue Swirl
2012-08-20  8:56           ` Alon Levy
2012-08-20  6:07         ` Gerd Hoffmann
2012-08-20  8:00           ` Alon Levy
2012-08-20  8:20             ` Alon Levy
2012-08-20  8:32             ` Gerd Hoffmann
2012-08-20  8:48               ` Alon Levy
2012-08-20  9:02                 ` Gerd Hoffmann
2012-08-20  9:37                   ` Alon Levy
2012-08-17 11:50 ` [Qemu-devel] [PATCH v5 1.2 queue 4/4] configure: print spice-protocol and spice-server versions Alon Levy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1345204252-8205-3-git-send-email-alevy@redhat.com \
    --to=alevy@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).