All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] hw/sparc64: Create VGA device only if it has really been requested
@ 2018-12-16 21:52 Thomas Huth
  2018-12-17 11:48 ` BALATON Zoltan
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Huth @ 2018-12-16 21:52 UTC (permalink / raw)
  To: Mark Cave-Ayland, qemu-devel

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>
---
 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 */
+    }
 
     memset(&macaddr, 0, sizeof(MACAddr));
     onboard_nic = false;
-- 
2.17.2

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH] hw/sparc64: Create VGA device only if it has really been requested
  2018-12-16 21:52 [Qemu-devel] [PATCH] hw/sparc64: Create VGA device only if it has really been requested Thomas Huth
@ 2018-12-17 11:48 ` BALATON Zoltan
  2018-12-18 20:26   ` Thomas Huth
  0 siblings, 1 reply; 5+ messages in thread
From: BALATON Zoltan @ 2018-12-17 11:48 UTC (permalink / raw)
  To: Thomas Huth; +Cc: Mark Cave-Ayland, qemu-devel

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 <huth@tuxfamily.org>
> ---
> 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;
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH] hw/sparc64: Create VGA device only if it has really been requested
  2018-12-17 11:48 ` BALATON Zoltan
@ 2018-12-18 20:26   ` Thomas Huth
  2018-12-19 12:23     ` Mark Cave-Ayland
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Huth @ 2018-12-18 20:26 UTC (permalink / raw)
  To: BALATON Zoltan; +Cc: Mark Cave-Ayland, qemu-devel

Am Mon, 17 Dec 2018 12:48:31 +0100 (CET)
schrieb BALATON Zoltan <balaton@eik.bme.hu>:

> 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 <huth@tuxfamily.org>
> > ---
> > 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.

Oops. Mark, can you fix it up when applying the patch (if you don't
object it)? Or shall I resend?

By the way, would it make sense to enable virtio-vga for the sun4u
machines, too?

 Thomas

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH] hw/sparc64: Create VGA device only if it has really been requested
  2018-12-18 20:26   ` Thomas Huth
@ 2018-12-19 12:23     ` Mark Cave-Ayland
  2018-12-19 18:36       ` Thomas Huth
  0 siblings, 1 reply; 5+ messages in thread
From: Mark Cave-Ayland @ 2018-12-19 12:23 UTC (permalink / raw)
  To: Thomas Huth, BALATON Zoltan; +Cc: qemu-devel

On 18/12/2018 20:26, Thomas Huth wrote:

> Am Mon, 17 Dec 2018 12:48:31 +0100 (CET)
> schrieb BALATON Zoltan <balaton@eik.bme.hu>:
> 
>> 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 <huth@tuxfamily.org>
>>> ---
>>> 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.
> 
> Oops. Mark, can you fix it up when applying the patch (if you don't
> object it)? Or shall I resend?

That's okay, I can fix this up easily enough.

> By the way, would it make sense to enable virtio-vga for the sun4u
> machines, too?

Hmmm that's one thing I haven't really tested - is there any reason to use this over
the bochs_drm driver?


ATB,

Mark.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH] hw/sparc64: Create VGA device only if it has really been requested
  2018-12-19 12:23     ` Mark Cave-Ayland
@ 2018-12-19 18:36       ` Thomas Huth
  0 siblings, 0 replies; 5+ messages in thread
From: Thomas Huth @ 2018-12-19 18:36 UTC (permalink / raw)
  To: Mark Cave-Ayland; +Cc: BALATON Zoltan, qemu-devel

Am Wed, 19 Dec 2018 12:23:31 +0000
schrieb Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>:

> On 18/12/2018 20:26, Thomas Huth wrote:
[...]
> > By the way, would it make sense to enable virtio-vga for the sun4u
> > machines, too?  
> 
> Hmmm that's one thing I haven't really tested - is there any reason
> to use this over the bochs_drm driver?

With virtio-vga, you'd get virtio-gpu features, too. See Gerd's talk
from KVM forum 2015 for details:

https://www.youtube.com/watch?v=4d-ObxgqZOs

 Thomas

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-12-19 18:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-16 21:52 [Qemu-devel] [PATCH] hw/sparc64: Create VGA device only if it has really been requested Thomas Huth
2018-12-17 11:48 ` BALATON Zoltan
2018-12-18 20:26   ` Thomas Huth
2018-12-19 12:23     ` Mark Cave-Ayland
2018-12-19 18:36       ` Thomas Huth

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.