qxl: disallow unknown revisions
Signed-off-by: Alon Levy <alevy@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
parent
511b13e2c9
commit
36839d355e
5
hw/qxl.c
5
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);
|
||||
|
|
Loading…
Reference in a new issue