On Tue, 2019-03-05 at 15:38 +0100, Gerd Hoffmann wrote:
Hi,
> -device virtio-blk-pci-non-transitional \
> -device virtio-net-pci-non-transitional \
> -device virtio-gpu-pci-non-transitional \
>
> and you wouldn't have to question why you can use the
> non-transitional variant for pretty much everything, except for the
> few cases where you can't - for no apparent reason...
Well, there are no variants, only a single virtio-$foo-pci* device. So
you don't have to worry about picking one of the available variants,
there is no choice in the first place.
When adding an virtio-gpu-pci-non-transitional variant we'll create
confusion too, because it wouldn't be a real variant. We would have two
100% identical devices then, and people will probably wonder why they
exist and what the difference is ...
When looking at a single device, I mostly agree with your assessment;
however, when looking at the overall situation with VirtIO devices,
one might quite reasonably infer the following rules:
* devices marked as (non-)transitional are going to show up as
(non-)transitional;
* unmarked devices might show up as either one, depending on some
factor which is not immediately obvious.
So if you knew you wanted non-transitional devices you would expect
to just use the non-transitional variant for *all* VirtIO devices,
including virtio-gpu, without necessarily caring whether the unmarked
devices behaves any differently; if you tried to use the transitional
device, you'd get an error message telling you that device doesn't
exist, which is pretty reasonable and easy to research / understand.
With the current situation, once you've tried using non-transitional
virtio-gpu and gotten back an error message, there's quite a bit more
digging required to figure out *why* the device is not there in the
first place.
So I agree neither scenario is exactly perfect, but I still think
adding non-transitional alias devices would overall be more
user-friendly.
So I can't see how this would be so much better. We have to
document
the mess no matter what.
We have some documentation in libvirt:
https://libvirt.org/formatdomain.html#elementsVirtioTransitional
Not that more / improved documentation is ever a bad idea :)
--
Andrea Bolognani / Red Hat / Virtualization