qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] hw/sparc64: Create VGA device only if it has re


From: BALATON Zoltan
Subject: Re: [Qemu-devel] [PATCH] hw/sparc64: Create VGA device only if it has really been requested
Date: Mon, 17 Dec 2018 12:48:31 +0100 (CET)
User-agent: Alpine 2.21.9999 (BSF 287 2018-06-16)

On Sun, 16 Dec 2018, Thomas Huth wrote:
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 <address@hidden>
---
hw/sparc64/sun4u.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c
index f76b19e4e9..ce7236c322 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 */

Can't comment on the actual patch but looks like a whitespace is missing here.

Regards,
BALATON Zoltan

+    }

    memset(&macaddr, 0, sizeof(MACAddr));
    onboard_nic = false;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]