aboutsummaryrefslogtreecommitdiff
path: root/hw/sparc64
diff options
context:
space:
mode:
authorThomas Huth <huth@tuxfamily.org>2018-12-16 22:52:10 +0100
committerMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>2019-02-06 21:07:53 +0000
commitc3019efc713c0afd6f0c51602b378f1094ef6e89 (patch)
treeae11698908443415441de4a9d5dbfdf9b82f8d02 /hw/sparc64
parent47994e16b1d66411953623e7c0bf0cdcd50bd507 (diff)
hw/sparc64: Create VGA device only if it has really been requested
The sun4u/sun4v machine currently always creates a VGA device, even if the user started QEMU with "-nodefaults" or "-vga none". That's likely not what the users expect in this case, so add a check whether the VGA adapter has really been requested. Signed-off-by: Thomas Huth <huth@tuxfamily.org> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Diffstat (limited to 'hw/sparc64')
-rw-r--r--hw/sparc64/sun4u.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c
index f76b19e4e9..37ecc14c6d 100644
--- a/hw/sparc64/sun4u.c
+++ b/hw/sparc64/sun4u.c
@@ -596,7 +596,15 @@ static void sun4uv_init(MemoryRegion *address_space_mem,
qdev_connect_gpio_out_named(DEVICE(ebus), "isa-irq", 4,
qdev_get_gpio_in_named(DEVICE(sabre), "pbm-irq", OBIO_SER_IRQ));
- pci_dev = pci_create_simple(pci_busA, PCI_DEVFN(2, 0), "VGA");
+ switch (vga_interface_type) {
+ case VGA_STD:
+ pci_create_simple(pci_busA, PCI_DEVFN(2, 0), "VGA");
+ break;
+ case VGA_NONE:
+ break;
+ default:
+ abort(); /* Should not happen - types are checked in vl.c already */
+ }
memset(&macaddr, 0, sizeof(MACAddr));
onboard_nic = false;