* [Qemu-devel] [5335] Change the way video graphics adapter is selected
@ 2008-09-28 0:42 malc
2008-09-28 6:01 ` Blue Swirl
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: malc @ 2008-09-28 0:42 UTC (permalink / raw)
To: qemu-devel
Revision: 5335
http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5335
Author: malc
Date: 2008-09-28 00:42:05 +0000 (Sun, 28 Sep 2008)
Log Message:
-----------
Change the way video graphics adapter is selected
Instead of having (current)three command line switches -std-vga,
-cirrusvga and -vmwarevga, provide one -vga switch which takes
an argument, so that:
qemu -std-vga becomes qemu -vga std
qemu -cirrusvga becomes qemu -vga cirrus
qemu -vmwarevga becomes qemu -vga vmware
Update documentation accordingly.
Modified Paths:
--------------
trunk/qemu-doc.texi
trunk/vl.c
Modified: trunk/qemu-doc.texi
===================================================================
--- trunk/qemu-doc.texi 2008-09-27 20:58:43 UTC (rev 5334)
+++ trunk/qemu-doc.texi 2008-09-28 00:42:05 UTC (rev 5335)
@@ -955,11 +955,24 @@
@item -L path
Set the directory for the BIOS, VGA BIOS and keymaps.
-@item -std-vga
-Simulate a standard VGA card with Bochs VBE extensions (default is
-Cirrus Logic GD5446 PCI VGA). If your guest OS supports the VESA 2.0
-VBE extensions (e.g. Windows XP) and if you want to use high
-resolution modes (>= 1280x1024x16) then you should use this option.
+@item -vga @var{type}
+Select type of VGA card to emulate. Valid values for @var{type} are
+@table @code
+@item cirrus
+Cirrus Logic GD5446 Video card. All Windows versions starting from
+Windows 95 should recognize and use this graphic card. For optimal
+performances, use 16 bit color depth in the guest and the host OS.
+(This one is the default)
+@item std
+Standard VGA card with Bochs VBE extensions. If your guest OS
+supports the VESA 2.0 VBE extensions (e.g. Windows XP) and if you want
+to use high resolution modes (>= 1280x1024x16) then you should use
+this option.
+@item vmware
+VMWare SVGA-II compatible adapter. Use it if you have sufficiently
+recent XFree86/XOrg server or Windows guest with a driver for this
+card.
+@end table
@item -no-acpi
Disable ACPI (Advanced Configuration and Power Interface) support. Use
Modified: trunk/vl.c
===================================================================
--- trunk/vl.c 2008-09-27 20:58:43 UTC (rev 5334)
+++ trunk/vl.c 2008-09-28 00:42:05 UTC (rev 5335)
@@ -7691,6 +7691,8 @@
" use -soundhw ? to get the list of supported cards\n"
" use -soundhw all to enable all of them\n"
#endif
+ "-vga [std|cirrus|vmware]\n"
+ " select video card type\n"
"-localtime set the real time clock to local time [default=utc]\n"
"-full-screen start in full screen\n"
#ifdef TARGET_I386
@@ -7769,8 +7771,6 @@
"-no-kqemu disable KQEMU kernel module usage\n"
#endif
#ifdef TARGET_I386
- "-std-vga simulate a standard VGA card with VESA Bochs Extensions\n"
- " (default is CL-GD5446 PCI VGA)\n"
"-no-acpi disable ACPI\n"
#endif
#ifdef CONFIG_CURSES
@@ -7861,10 +7861,8 @@
QEMU_OPTION_bios,
QEMU_OPTION_k,
QEMU_OPTION_localtime,
- QEMU_OPTION_cirrusvga,
- QEMU_OPTION_vmsvga,
QEMU_OPTION_g,
- QEMU_OPTION_std_vga,
+ QEMU_OPTION_vga,
QEMU_OPTION_echr,
QEMU_OPTION_monitor,
QEMU_OPTION_serial,
@@ -7966,7 +7964,7 @@
{ "g", 1, QEMU_OPTION_g },
#endif
{ "localtime", 0, QEMU_OPTION_localtime },
- { "std-vga", 0, QEMU_OPTION_std_vga },
+ { "vga", HAS_ARG, QEMU_OPTION_vga },
{ "echr", HAS_ARG, QEMU_OPTION_echr },
{ "monitor", HAS_ARG, QEMU_OPTION_monitor },
{ "serial", HAS_ARG, QEMU_OPTION_serial },
@@ -7990,8 +7988,6 @@
/* temporary options */
{ "usb", 0, QEMU_OPTION_usb },
- { "cirrusvga", 0, QEMU_OPTION_cirrusvga },
- { "vmwarevga", 0, QEMU_OPTION_vmsvga },
{ "no-acpi", 0, QEMU_OPTION_no_acpi },
{ "no-reboot", 0, QEMU_OPTION_no_reboot },
{ "no-shutdown", 0, QEMU_OPTION_no_shutdown },
@@ -8189,6 +8185,27 @@
}
#endif
+static void select_vgahw (const char *p)
+{
+ const char *opts;
+
+ if (strstart(p, "std", &opts)) {
+ cirrus_vga_enabled = 0;
+ vmsvga_enabled = 0;
+ } else if (strstart(p, "cirrus", &opts)) {
+ cirrus_vga_enabled = 1;
+ vmsvga_enabled = 0;
+ } else if (strstart(p, "vmware", &opts)) {
+ cirrus_vga_enabled = 0;
+ vmsvga_enabled = 1;
+ } else {
+ invalid_vga:
+ fprintf(stderr, "Unknown vga type: %s\n", p);
+ exit(1);
+ }
+ if (*opts) goto invalid_vga;
+}
+
#ifdef _WIN32
static BOOL WINAPI qemu_ctrl_handler(DWORD type)
{
@@ -8652,18 +8669,9 @@
case QEMU_OPTION_localtime:
rtc_utc = 0;
break;
- case QEMU_OPTION_cirrusvga:
- cirrus_vga_enabled = 1;
- vmsvga_enabled = 0;
+ case QEMU_OPTION_vga:
+ select_vgahw (optarg);
break;
- case QEMU_OPTION_vmsvga:
- cirrus_vga_enabled = 0;
- vmsvga_enabled = 1;
- break;
- case QEMU_OPTION_std_vga:
- cirrus_vga_enabled = 0;
- vmsvga_enabled = 0;
- break;
case QEMU_OPTION_g:
{
const char *p;
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] [5335] Change the way video graphics adapter is selected
2008-09-28 0:42 [Qemu-devel] [5335] Change the way video graphics adapter is selected malc
@ 2008-09-28 6:01 ` Blue Swirl
2008-09-28 14:42 ` Anthony Liguori
` (2 more replies)
2008-09-28 14:41 ` Anthony Liguori
2008-09-29 9:38 ` Daniel P. Berrange
2 siblings, 3 replies; 10+ messages in thread
From: Blue Swirl @ 2008-09-28 6:01 UTC (permalink / raw)
To: qemu-devel
On 9/28/08, malc <av1474@comtv.ru> wrote:
> Revision: 5335
> http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5335
> Author: malc
> Date: 2008-09-28 00:42:05 +0000 (Sun, 28 Sep 2008)
>
> Log Message:
> -----------
> Change the way video graphics adapter is selected
>
> Instead of having (current)three command line switches -std-vga,
> -cirrusvga and -vmwarevga, provide one -vga switch which takes
> an argument, so that:
> qemu -std-vga becomes qemu -vga std
> qemu -cirrusvga becomes qemu -vga cirrus
> qemu -vmwarevga becomes qemu -vga vmware
I'd prefer a more generic syntax, like -drive options:
-displayhw model=vga,type=std
-displayhw model=vga,type=std
-displayhw model=vga,type=std
-displayhw model=tcx,type=hardwarecursor
Then this option would be useful for non-VGA targets. I don't see -vga
xxx as an improvement over -xxx-vga.
Also, there should be compatibility support for previous syntax, like
-cdrom or -hda implies some -drive options.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] [5335] Change the way video graphics adapter is selected
2008-09-28 0:42 [Qemu-devel] [5335] Change the way video graphics adapter is selected malc
2008-09-28 6:01 ` Blue Swirl
@ 2008-09-28 14:41 ` Anthony Liguori
2008-09-29 9:38 ` Daniel P. Berrange
2 siblings, 0 replies; 10+ messages in thread
From: Anthony Liguori @ 2008-09-28 14:41 UTC (permalink / raw)
To: qemu-devel
malc wrote:
> Revision: 5335
> http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5335
> Author: malc
> Date: 2008-09-28 00:42:05 +0000 (Sun, 28 Sep 2008)
>
> Log Message:
> -----------
> Change the way video graphics adapter is selected
>
> Instead of having (current)three command line switches -std-vga,
> -cirrusvga and -vmwarevga, provide one -vga switch which takes
> an argument, so that:
> qemu -std-vga becomes qemu -vga std
> qemu -cirrusvga becomes qemu -vga cirrus
> qemu -vmwarevga becomes qemu -vga vmware
>
> Update documentation accordingly.
>
std is probably more aptly named "vesa".
I'm a little surprised that you didn't maintain the old arguments for
compatibility. Is this going to totally break management tools or can
they cope with this kind of change?
Regards,
Anthony Liguori
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] [5335] Change the way video graphics adapter is selected
2008-09-28 6:01 ` Blue Swirl
@ 2008-09-28 14:42 ` Anthony Liguori
2008-09-28 15:46 ` Blue Swirl
2008-09-28 14:57 ` andrzej zaborowski
2008-09-28 18:09 ` malc
2 siblings, 1 reply; 10+ messages in thread
From: Anthony Liguori @ 2008-09-28 14:42 UTC (permalink / raw)
To: qemu-devel
Blue Swirl wrote:
> On 9/28/08, malc <av1474@comtv.ru> wrote:
>
>> Revision: 5335
>> http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5335
>> Author: malc
>> Date: 2008-09-28 00:42:05 +0000 (Sun, 28 Sep 2008)
>>
>> Log Message:
>> -----------
>> Change the way video graphics adapter is selected
>>
>> Instead of having (current)three command line switches -std-vga,
>> -cirrusvga and -vmwarevga, provide one -vga switch which takes
>> an argument, so that:
>> qemu -std-vga becomes qemu -vga std
>> qemu -cirrusvga becomes qemu -vga cirrus
>> qemu -vmwarevga becomes qemu -vga vmware
>>
>
> I'd prefer a more generic syntax, like -drive options:
> -displayhw model=vga,type=std
> -displayhw model=vga,type=std
> -displayhw model=vga,type=std
> -displayhw model=tcx,type=hardwarecursor
>
I think this would quickly rat hole since it requires rewriting a huge
amount of code.
> Then this option would be useful for non-VGA targets. I don't see -vga
> xxx as an improvement over -xxx-vga.
>
If the next steps are creating a mechanism to register VGA hw emulation,
then I think this is a step in the right direction.
I think we have to get to a place where most hardware devices are
registered within a generic frame work before we start trying to expose
that to the user.
Regards,
Anthony Liguori
> Also, there should be compatibility support for previous syntax, like
> -cdrom or -hda implies some -drive options.
>
>
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] [5335] Change the way video graphics adapter is selected
2008-09-28 6:01 ` Blue Swirl
2008-09-28 14:42 ` Anthony Liguori
@ 2008-09-28 14:57 ` andrzej zaborowski
2008-09-28 15:55 ` Blue Swirl
2008-09-28 18:09 ` malc
2 siblings, 1 reply; 10+ messages in thread
From: andrzej zaborowski @ 2008-09-28 14:57 UTC (permalink / raw)
To: qemu-devel
2008/9/28 Blue Swirl <blauwirbel@gmail.com>:
> On 9/28/08, malc <av1474@comtv.ru> wrote:
>> Revision: 5335
>> http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5335
>> Author: malc
>> Date: 2008-09-28 00:42:05 +0000 (Sun, 28 Sep 2008)
>>
>> Log Message:
>> -----------
>> Change the way video graphics adapter is selected
>>
>> Instead of having (current)three command line switches -std-vga,
>> -cirrusvga and -vmwarevga, provide one -vga switch which takes
>> an argument, so that:
>> qemu -std-vga becomes qemu -vga std
>> qemu -cirrusvga becomes qemu -vga cirrus
>> qemu -vmwarevga becomes qemu -vga vmware
>
> I'd prefer a more generic syntax, like -drive options:
> -displayhw model=vga,type=std
> -displayhw model=vga,type=std
> -displayhw model=vga,type=std
> -displayhw model=tcx,type=hardwarecursor
My thinking was that the next improvement to the -xxxvga syntax should
be to allow multiple graphics cards to be inserted. An interesting
question is whether a bus hierarchy oriented syntax instead of
functionality otiented would be better, for example -pcihw
slot=N,model=vga (perhaps not).
>
> Then this option would be useful for non-VGA targets. I don't see -vga
> xxx as an improvement over -xxx-vga.
>
> Also, there should be compatibility support for previous syntax, like
> -cdrom or -hda implies some -drive options.
Agreed.
Cheers
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] [5335] Change the way video graphics adapter is selected
2008-09-28 14:42 ` Anthony Liguori
@ 2008-09-28 15:46 ` Blue Swirl
0 siblings, 0 replies; 10+ messages in thread
From: Blue Swirl @ 2008-09-28 15:46 UTC (permalink / raw)
To: qemu-devel
On 9/28/08, Anthony Liguori <anthony@codemonkey.ws> wrote:
> Blue Swirl wrote:
>
> > On 9/28/08, malc <av1474@comtv.ru> wrote:
> >
> >
> > > Revision: 5335
> > >
> http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5335
> > > Author: malc
> > > Date: 2008-09-28 00:42:05 +0000 (Sun, 28 Sep 2008)
> > >
> > > Log Message:
> > > -----------
> > > Change the way video graphics adapter is selected
> > >
> > > Instead of having (current)three command line switches -std-vga,
> > > -cirrusvga and -vmwarevga, provide one -vga switch which takes
> > > an argument, so that:
> > > qemu -std-vga becomes qemu -vga std
> > > qemu -cirrusvga becomes qemu -vga cirrus
> > > qemu -vmwarevga becomes qemu -vga vmware
> > >
> > >
> >
> > I'd prefer a more generic syntax, like -drive options:
> > -displayhw model=vga,type=std
> > -displayhw model=vga,type=std
> > -displayhw model=vga,type=std
> > -displayhw model=tcx,type=hardwarecursor
> >
> >
>
> I think this would quickly rat hole since it requires rewriting a huge
> amount of code.
I forgot to change the copied part, I meant to write:
-displayhw model=vga,type=std
-displayhw model=vga,type=cirrrus
-displayhw model=vga,type=vmware
-displayhw model=tcx,type=hardwarecursor
These options should be (for now) mutually exclusive, so you could
select only one. I think the code changes would be limited to vl.c,
with similar parsing to what is done for -drive. The devices would not
be changed at this stage. I can't see how this would become any mess,
what problems you foresee?
> > Then this option would be useful for non-VGA targets. I don't see -vga
> > xxx as an improvement over -xxx-vga.
> >
> >
>
> If the next steps are creating a mechanism to register VGA hw emulation,
> then I think this is a step in the right direction.
>
> I think we have to get to a place where most hardware devices are
> registered within a generic frame work before we start trying to expose that
> to the user.
Maybe. It would be great to get a config file.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] [5335] Change the way video graphics adapter is selected
2008-09-28 14:57 ` andrzej zaborowski
@ 2008-09-28 15:55 ` Blue Swirl
2008-09-28 18:47 ` andrzej zaborowski
0 siblings, 1 reply; 10+ messages in thread
From: Blue Swirl @ 2008-09-28 15:55 UTC (permalink / raw)
To: qemu-devel
On 9/28/08, andrzej zaborowski <balrogg@gmail.com> wrote:
> 2008/9/28 Blue Swirl <blauwirbel@gmail.com>:
>
> > On 9/28/08, malc <av1474@comtv.ru> wrote:
> >> Revision: 5335
> >> http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5335
> >> Author: malc
> >> Date: 2008-09-28 00:42:05 +0000 (Sun, 28 Sep 2008)
> >>
> >> Log Message:
> >> -----------
> >> Change the way video graphics adapter is selected
> >>
> >> Instead of having (current)three command line switches -std-vga,
> >> -cirrusvga and -vmwarevga, provide one -vga switch which takes
> >> an argument, so that:
> >> qemu -std-vga becomes qemu -vga std
> >> qemu -cirrusvga becomes qemu -vga cirrus
> >> qemu -vmwarevga becomes qemu -vga vmware
> >
> > I'd prefer a more generic syntax, like -drive options:
> > -displayhw model=vga,type=std
> > -displayhw model=vga,type=std
> > -displayhw model=vga,type=std
> > -displayhw model=tcx,type=hardwarecursor
>
>
> My thinking was that the next improvement to the -xxxvga syntax should
> be to allow multiple graphics cards to be inserted. An interesting
> question is whether a bus hierarchy oriented syntax instead of
> functionality otiented would be better, for example -pcihw
> slot=N,model=vga (perhaps not).
That would work too, but there are more buses than just PCI. Even the
old Sparcstations with SBus supported more than one display device.
And for that you would have to specify how the devices and windows
(SDL etc.) are connected. Then the syntax would become:
-displayhw model=vga,type=std,screen=0 -displayhw model=vga,type=cirrus,screen=1
or, if you follow the logic in this commit:
-vga std,0 -vga cirrus,1
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] [5335] Change the way video graphics adapter is selected
2008-09-28 6:01 ` Blue Swirl
2008-09-28 14:42 ` Anthony Liguori
2008-09-28 14:57 ` andrzej zaborowski
@ 2008-09-28 18:09 ` malc
2 siblings, 0 replies; 10+ messages in thread
From: malc @ 2008-09-28 18:09 UTC (permalink / raw)
To: qemu-devel
On Sun, 28 Sep 2008, Blue Swirl wrote:
> On 9/28/08, malc <av1474@comtv.ru> wrote:
>> Revision: 5335
>> http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5335
>> Author: malc
>> Date: 2008-09-28 00:42:05 +0000 (Sun, 28 Sep 2008)
>>
>> Log Message:
>> -----------
>> Change the way video graphics adapter is selected
>>
>> Instead of having (current)three command line switches -std-vga,
>> -cirrusvga and -vmwarevga, provide one -vga switch which takes
>> an argument, so that:
>> qemu -std-vga becomes qemu -vga std
>> qemu -cirrusvga becomes qemu -vga cirrus
>> qemu -vmwarevga becomes qemu -vga vmware
>
> I'd prefer a more generic syntax, like -drive options:
> -displayhw model=vga,type=std
> -displayhw model=vga,type=std
> -displayhw model=vga,type=std
> -displayhw model=tcx,type=hardwarecursor
>
> Then this option would be useful for non-VGA targets. I don't see -vga
> xxx as an improvement over -xxx-vga.
It wasn't intended to be an improvement to the current stuff, that said
i belive it is. The goal was to find a way to provide an option (later
commit) for controlling the retrace stuff, i could have added yet another
command line switch for that, but it makes no sense in isolation.
[..snip..]
--
mailto:av1474@comtv.ru
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] [5335] Change the way video graphics adapter is selected
2008-09-28 15:55 ` Blue Swirl
@ 2008-09-28 18:47 ` andrzej zaborowski
0 siblings, 0 replies; 10+ messages in thread
From: andrzej zaborowski @ 2008-09-28 18:47 UTC (permalink / raw)
To: qemu-devel
2008/9/28 Blue Swirl <blauwirbel@gmail.com>:
> On 9/28/08, andrzej zaborowski <balrogg@gmail.com> wrote:
>> My thinking was that the next improvement to the -xxxvga syntax should
>> be to allow multiple graphics cards to be inserted. An interesting
>> question is whether a bus hierarchy oriented syntax instead of
>> functionality otiented would be better, for example -pcihw
>> slot=N,model=vga (perhaps not).
>
> That would work too, but there are more buses than just PCI. Even the
Yes, for example USB related options already work this way.
> old Sparcstations with SBus supported more than one display device.
> And for that you would have to specify how the devices and windows
> (SDL etc.) are connected.
Or you could leave it the way it is now: if you register three vga's
they will get three consecutive vc's, similarly to -serial. So for
example -serial -std-vga -serial -std-vga would give you 4 vc's in
this order.
Regards
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] [5335] Change the way video graphics adapter is selected
2008-09-28 0:42 [Qemu-devel] [5335] Change the way video graphics adapter is selected malc
2008-09-28 6:01 ` Blue Swirl
2008-09-28 14:41 ` Anthony Liguori
@ 2008-09-29 9:38 ` Daniel P. Berrange
2 siblings, 0 replies; 10+ messages in thread
From: Daniel P. Berrange @ 2008-09-29 9:38 UTC (permalink / raw)
To: qemu-devel
On Sun, Sep 28, 2008 at 12:42:06AM +0000, malc wrote:
> Revision: 5335
> http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5335
> Author: malc
> Date: 2008-09-28 00:42:05 +0000 (Sun, 28 Sep 2008)
>
> Log Message:
> -----------
> Change the way video graphics adapter is selected
>
> Instead of having (current)three command line switches -std-vga,
> -cirrusvga and -vmwarevga, provide one -vga switch which takes
> an argument, so that:
> qemu -std-vga becomes qemu -vga std
> qemu -cirrusvga becomes qemu -vga cirrus
> qemu -vmwarevga becomes qemu -vga vmware
>
> Update documentation accordingly.
This breaks compatability with existing management tools for merely
cosmetic benefits. Please add back in support for the existing
syntax, in the same way that -hda, etc was preserved when we added
-driver syntax.
Daniel
--
|: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2008-09-29 9:38 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-28 0:42 [Qemu-devel] [5335] Change the way video graphics adapter is selected malc
2008-09-28 6:01 ` Blue Swirl
2008-09-28 14:42 ` Anthony Liguori
2008-09-28 15:46 ` Blue Swirl
2008-09-28 14:57 ` andrzej zaborowski
2008-09-28 15:55 ` Blue Swirl
2008-09-28 18:47 ` andrzej zaborowski
2008-09-28 18:09 ` malc
2008-09-28 14:41 ` Anthony Liguori
2008-09-29 9:38 ` Daniel P. Berrange
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).