On Tue, Jan 18, 2022 at 04:03:49PM +0100, Ján Tomko wrote:
virtio-input is virtio-1.0 only and these models have been only
present
in one upstream QEMU release, then removed by:
Here too, please mention the version (4.0) explicitly.
+++
b/tests/qemuxml2argvdata/virtio-non-transitional.x86_64-latest.args
@@ -47,7 +47,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
-device
'{"driver":"virtio-9p-pci-non-transitional","id":"fs0","fsdev":"fsdev-fs0","mount_tag":"fs1","bus":"pci.1","addr":"0x0"}'
\
-netdev user,id=hostnet0 \
-device
'{"driver":"virtio-net-pci-non-transitional","netdev":"hostnet0","id":"net0","mac":"00:11:22:33:44:55","bus":"pci.2","addr":"0x0"}'
\
--device
'{"driver":"virtio-input-host-pci-non-transitional","id":"input0","evdev":"/dev/input/event1234","bus":"pci.9","addr":"0x0"}'
\
+-device
'{"driver":"virtio-input-host-pci","id":"input0","evdev":"/dev/input/event1234","bus":"pci.9","addr":"0x0"}'
\
This should be fine guest ABI wise, since the plain version of the
device has always been 1.0-only and thus should match the
non-transitional version perfectly.
+++ b/tests/qemuxml2argvdata/virtio-transitional.x86_64-latest.args
@@ -39,7 +39,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
-device
'{"driver":"virtio-9p-pci-transitional","id":"fs0","fsdev":"fsdev-fs0","mount_tag":"fs1","bus":"pci.2","addr":"0x1"}'
\
-netdev user,id=hostnet0 \
-device
'{"driver":"virtio-net-pci-transitional","netdev":"hostnet0","id":"net0","mac":"00:11:22:33:44:55","bus":"pci.2","addr":"0x2"}'
\
--device
'{"driver":"virtio-input-host-pci-transitional","id":"input0","evdev":"/dev/input/event1234","bus":"pci.2","addr":"0x9"}'
\
+-device
'{"driver":"virtio-input-host-pci","id":"input0","evdev":"/dev/input/event1234","bus":"pci.2","addr":"0x9"}'
\
This is not right - the device went from transitional to 1.0-only.
The problem is actually in the fact that we accepted
"virtio-(non-)transitional" as model for this device in the first
place, which we shouldn't have. And that was my mistake: when I wrote
commit ff3f22e0ece293d3c6f6af58d048724d2fcd8039
Author: Andrea Bolognani <abologna(a)redhat.com>
Date: Wed Mar 6 12:30:25 2019 +0100
qemu: Improve validation for virtio input devices
While the parser and schema have to accept all possible models,
virtio-(non-)transitional models are only applicable to
type=passthrough and should be otherwise rejected.
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
Reviewed-by: Cole Robinson <crobinso(a)redhat.com>
I was clearly under the impression that
virtio-input-host-pci-(non-)transitional was a valid QEMU device that
it made sense to expose to users. I guess I must have had QEMU 4.0
installed on my machine O:-)
So
Reviewed-by: Andrea Bolognani <abologna(a)redhat.com>
to the qemuBuildVirtioDevGetConfigDev() hunk, but it needs to come
after a patch that fixes qemuValidateDomainDeviceDefInput() so that
it rejects virtio-(non-)transitional as model for all virtio input
devices and ajusts the test suite accordingly.
--
Andrea Bolognani / Red Hat / Virtualization