Re: [Qemu-devel] [PATCH] vga: print friendly error message in case multiple vga devices are added

2018-05-08 Thread Gerd Hoffmann
On Mon, May 07, 2018 at 06:00:56PM +0100, Peter Maydell wrote: > On 7 May 2018 at 15:30, Gerd Hoffmann wrote: > > The only one which passes global_vmstate == false is "-device > > secondary-vga", and that does *not* register vga ioports (the > > registers can be accessed via mmio pci bar though).

Re: [Qemu-devel] [PATCH] vga: print friendly error message in case multiple vga devices are added

2018-05-07 Thread Eric Blake
On 05/07/2018 05:10 AM, Gerd Hoffmann wrote: ... to a virtual machine. Without that we fail a ramblock register sanity check, leading to a abort(), which isn't exactly user friendly. https://bugzilla.redhat.com/show_bug.cgi?id=1206037 Signed-off-by: Gerd Hoffmann --- hw/display/vga.c | 8 +++

Re: [Qemu-devel] [PATCH] vga: print friendly error message in case multiple vga devices are added

2018-05-07 Thread Peter Maydell
On 7 May 2018 at 15:30, Gerd Hoffmann wrote: > The only one which passes global_vmstate == false is "-device > secondary-vga", and that does *not* register vga ioports (the > registers can be accessed via mmio pci bar though). Looks like virtio-vga does as well. > So, right now global_vmstate ==

Re: [Qemu-devel] [PATCH] vga: print friendly error message in case multiple vga devices are added

2018-05-07 Thread Gerd Hoffmann
On Mon, May 07, 2018 at 02:36:30PM +0100, Peter Maydell wrote: > On 7 May 2018 at 13:11, Gerd Hoffmann wrote: > >> This seems like a bit of an irritating reason to refuse to > >> allow multiple VGA devices though, since we could make > >> them work by having the vmstate be not-global. > > > > Mult

Re: [Qemu-devel] [PATCH] vga: print friendly error message in case multiple vga devices are added

2018-05-07 Thread Peter Maydell
On 7 May 2018 at 13:11, Gerd Hoffmann wrote: >> This seems like a bit of an irritating reason to refuse to >> allow multiple VGA devices though, since we could make >> them work by having the vmstate be not-global. > > Multiple vga devices will also try to use the same isa vga > ports. Seems that

Re: [Qemu-devel] [PATCH] vga: print friendly error message in case multiple vga devices are added

2018-05-07 Thread Gerd Hoffmann
> > +if (global_vmstate) { > > +static int have_vga; > > +if (have_vga) { > > +error_report("only one vga device is supported"); > > +exit(1); > > +} > > +have_vga = true; > > +} > > s->is_vbe_vmstate = 1; > > memory_region_i

Re: [Qemu-devel] [PATCH] vga: print friendly error message in case multiple vga devices are added

2018-05-07 Thread Peter Maydell
On 7 May 2018 at 11:10, Gerd Hoffmann wrote: > ... to a virtual machine. Without that we fail a ramblock register > sanity check, leading to a abort(), which isn't exactly user friendly. > > https://bugzilla.redhat.com/show_bug.cgi?id=1206037 > Signed-off-by: Gerd Hoffmann > --- > hw/display/vg

[Qemu-devel] [PATCH] vga: print friendly error message in case multiple vga devices are added

2018-05-07 Thread Gerd Hoffmann
... to a virtual machine. Without that we fail a ramblock register sanity check, leading to a abort(), which isn't exactly user friendly. https://bugzilla.redhat.com/show_bug.cgi?id=1206037 Signed-off-by: Gerd Hoffmann --- hw/display/vga.c | 8 1 file changed, 8 insertions(+) diff --g