On Mon, Nov 11, 2024 at 09:27:00AM +0100, Martin Kletzander wrote:
On Thu, Nov 07, 2024 at 06:34:49PM +0100, Andrea Bolognani wrote:
> When virtio-(non-)transitional models were introduced, the
> documentation was updated to include them; at the same time,
> language was introduced indicating that using the existing
> virtio model is no longer recommended.
>
> This is unnecessarily harsh, and has resulted in people
> incorrectly believing (through no fault of their own) that the
> virtio model has been deprecated.
>
> In reality, it's perfectly fine to use the virtio model as the
> stress-free option that, while often not producing the ideal
> PCI topology, will generally get the job done and work reliably
> across libvirt versions and machine types.
I wonder who reviewed the harsh language back then 🤔 =D
Whoever that might have been, they should probably be ashamed of
themselves right now, and might want to make amends through concrete
actions such as improving the documentation O:-)
> +Virtio device models
> +~~~~~~~~~~~~~~~~~~~~
> +
> +Virtio devices come in several variants, some of which are only applicable to
> +certain machine types or scenarios. The variant can be chosen via the ``model``
> +attribute, which supports the following values:
>
> -:since:`Since 5.2.0`, some of QEMU's virtio devices, when used with PCI/PCIe
> -machine types, accept the following ``model`` values:
> +``virtio``
> + This is the recommended choice in the absence of guest OS specific
> + constraints, as it will will generally work correctly across a large range
> + of architectures, machine types and libvirt versions.
> +
> +:since:`Since 5.2.0`, the following values can additionally be used with machine
> +types based on PCI (either conventional PCI or PCI Express):
I think that you cannot specify model='virtio' before 5.2.0. Maybe what
Daniel suggested, keeping the mention of compatibility with older
versions is the better way to go. From the above one might think that
model='virtio' will work on older libvirt, and it will look like it
does, but it won't get parsed.
It will work with many devices (net, balloon, rng, ...) but not with
others (disk, fs, input, ...) so blanket statements in either
direction will end up being partially incorrect. Each device's
documentation contains the complete and accurate version history for
when the attribute and its possible values were introduced. So in my
opinion it's fine to be a bit more hand-wavy here. The goal of this
section is to give an overview of how virtio device models work
overall, not replicate information already found elsewhere.
Well, that's pretty minor in the end, so either way you decide,
unless
someone objects
Reviewed-by: Martin Kletzander <mkletzan(a)redhat.com>
Thanks. I'll give Daniel some time to weigh in before pushing.
--
Andrea Bolognani / Red Hat / Virtualization