On 09/16/16 15:44, Andrea Bolognani wrote:
> On Fri, 2016-09-16 at 15:20 +0200, Pavel Hrdina wrote:
>>> There is something I wanted to clarify with Laszlo: is
>>> virtio-gpu-pci ever going to be usable on other architectures
>>> such as x86_64? Maybe it already is? Because if that's the
>>> case, we'll want to be able to choose between virtio-vga and
>>> One solution would be to keep mapping model='virtio' to
>>> virtio-vga and create a new model='virtio-gpu' that maps to
>>> virtio-gpu-pci, then forbid aarch64 mach-virt guests to use
>>> model='virtio'. Or something like that, I'm not married to
>>> the idea, I just think it's something we should definitely
>>> think about before this ends up in a release.
>> I have some patches in my TODO branch that will rewrite the video
>> device code. virtio-gpu-pci is usable also on other architectures
>> but it lacks the VGA compatibility mode. In libvirt all primary
>> video devices for x86 architecture have VGA mode. Currently we
>> allow only QXL to be used as secondary video device and now with
>> the virtio-gpu-pci it could be also used as secondary video device.
>> The solution would be simple, there is no need to add a new video
>> model 'virtio-gpu', we will use the existing model 'virtio', but
>> depending on architecture and also whether it's primary or
>> secondary video device we will use appropriate device.
>> We already do this for QXL.
> I don't know much about video devices, so forgive me if I'm
> asking silly questions, but what is preventing you (on x86)
> from having virtio-vga as secondary video device?
The "VGA compatibility" stuff in virtio-vga is not just the linear
framebuffer that lives in one of its MMIO BARs. VGA compatibility is
much larger baggage; for example, it involves hard-coded ISA IO ports.
Alex Williamson discusses VGA arbitration in the following blog post:
So the short answer is that "VGA compatibility" includes things that you
mostly want to have *exactly one* instance of, in your x86 system. Zero
instances of those things, and you might lose compatibility with some
software; more than one instance of that stuff, and things get really
messy with arbitration (hard-coded IO ports and MMIO ranges).
So, even in the physical word, a multi-graphics-card x86 workstation
usually has one primary VGA card (nowadays likely as an integrated
device), carrying the legacy baggage; and then a number of secondary
GPUs (that have none of that baggage).
> virtio-gpu-pci as primary video device?
I described this earlier -- virtio-gpu-pci is more limited than
virtio-vga as a primary graphics card, so wherever you can go with
virtio-vga as primary, you'll do that. In aarch64/KVM guests however,
virtio-vga is not an option, and the more limited (as primary)
virtio-gpu-pci card is still better (much better) than nothing.
libvir-list mailing list