Re: [libvirt] [Qemu-devel] -vga std vs. -device VGA

[adding libvirt] On 11/13/2013 10:01 PM, Alexey Kardashevskiy wrote:
Hi everyone.
Here is a problem with the SPAPR machine and a libvirt's habit to use "-nodefaults".
When we run QEMU with "-vga std", a VGA device is created from the machine_init callback and if VGA is added, then we automatically add a PCI USB OHCI adapter with a keyboard and everybody (SLOF, yaboot, guest kernel) is happy - there are both input and output devices.
However libvirt uses "-device VGA" to create a VGA device. In this case the actual VGA device is created in vl.c and we (SPAPR) do not have control over this process so we do not automatically create anything in addition to VGA. As a result, yaboot fails as there is no input device.
x86 creates a whole bunch of various devices including a keyboard controller (i8042) even with "-nodefaults" but this is not true for SPAPR.
Then libvirt needs to be taught to provide the same devices via -device that would be present during -vga.
Since we (POWERPC folks) want everything to work as close to x86 as possible, we need to do something about it :)
Hmm, but adding automatic devices in a future qemu release compared to what you do now could be a regression - once libvirt is taught how to provide the correct devices for the qemu that exists now, wouldn't that mean that your automatic device adding creates duplicates? Libvirt uses -nodefaults for a reason - we really don't like automatic devices (especially when the set of WHAT is automatic is prone to change between qemu builds), and would much rather call out everything explicitly so that we can guarantee guest ABI stability across qemu upgrades.
So the question is - is there any proper (i. e. qemu-upstreamable) way to detect a VGA device presence and create additional devices (OHCI, keyboard, mouse) as "-vga" does it now? The machine reset callback is too late for that.
Or we should just print an error (in QEMU or SLOF) and do nothing and let the user configure all required devices in libvirt?
I'm in favor of printing an error if not enough devices were supplied, and fixing libvirt to supply the correct devices when it doesn't use -vga. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Il 14/11/2013 14:11, Eric Blake ha scritto:
Or we should just print an error (in QEMU or SLOF) and do nothing and let the user configure all required devices in libvirt? I'm in favor of printing an error if not enough devices were supplied, and fixing libvirt to supply the correct devices when it doesn't use -vga.
It's not an error to create a system with a VGA and a mouse but with no keyboard. Maybe it's somewhat weird for a pSeries, but it's definitely a configuration that can work. Paolo -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBAgAGBQJShg7NAAoJEBvWZb6bTYbyhGMP/Avd+isN55amTIultiXRtnQD wT8A57eMJ8IU3RsSxqwqaDYhOkaCPGnTQsgZmbENEjcH+TcZOPA80f5GKHILeH2H wURF4IhJ2ZQBthnjsnJV3wMPjFbTZ5bonnruWOjcMp03KFq1rDvGkc5ZCJ4H+3g2 mupL8fZbX7BSbzK6K1pii9PxsWQUvfssQARAp1KgFP0PtraP/+9AvSzjoSCH3c5K yi48HHlBzDoLo8mzAuc6iIPVmD+KGLDbzqAM+pzcFxSRUS2xWtmymULk0u06jfEM 0190dadkDaVimQ4OjDWrx0qSYxXjrU2YSQM/xvm9HzIlGOOUDCo3ujBjZjmXusqR OkP1+B+GFRNmbBrxUA7wTKsr3hSznoj2pUNgKacr0EOcMqT1Nwq7HuklPXuOUH/0 6n2h2QjsSfvzOE4+KLZZv9TP0Tj0QcgKOZfxlvKcIdumHB24wxZALyKHu6Umh/Uk ANt9fD2alTAH2zpU+SAJeXVcvlglMhWpzRHM9c0ML2EAbLXs5atJFkAhlycn5yQK nq3tEVQRBpdGo8/ETzzhbBc0bKXgE8cztEk0QAJm5i/4J6eSatImjCYrxEyeZsq9 AQep6ZoK492bKlFQt93ERTLjG8mD8qOWmv31nkbN+jsnbNFQo5VLBxvuoJqahezY R9tSYYBKldCoK+b2OVgl =nuI7 -----END PGP SIGNATURE-----
participants (2)
-
Eric Blake
-
Paolo Bonzini