[libvirt] [PATCH] qemu: Refuse to use "ps2" on machines that do not have this bus

Michal Privoznik mprivozn at redhat.com
Thu Jan 23 13:24:32 UTC 2020


On 1/15/20 1:23 PM, Thomas Huth wrote:
> The "ps2" bus is only available on certain machines like x86. On
> machines like s390x, we should refuse to add a device to this bus
> instead of silently ignoring it.
> 
> Looking at the QEMU sources, PS/2 is only available if the QEMU binary
> has the "i8042" device, so let's check for that and only allow "ps2"
> devices if this QEMU device is available, or if we're on x86 anyway
> (so we don't have to fake the QEMU_CAPS_DEVICE_I8042 capability in
> all the tests that use <input ... bus='ps2'/> in their xml data).
> 
> Reported-by: Sebastian Mitterle <smitterl at redhat.com>
> Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1763191
> Signed-off-by: Thomas Huth <thuth at redhat.com>
> ---
>   src/qemu/qemu_capabilities.c                           |  2 ++
>   src/qemu/qemu_capabilities.h                           |  1 +
>   src/qemu/qemu_domain.c                                 | 10 +++++++++-
>   tests/qemucapabilitiesdata/caps_1.5.3.x86_64.xml       |  1 +
>   tests/qemucapabilitiesdata/caps_1.6.0.x86_64.xml       |  1 +
>   tests/qemucapabilitiesdata/caps_1.7.0.x86_64.xml       |  1 +
>   tests/qemucapabilitiesdata/caps_2.1.1.x86_64.xml       |  1 +
>   tests/qemucapabilitiesdata/caps_2.10.0.ppc64.xml       |  1 +
>   tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml      |  1 +
>   tests/qemucapabilitiesdata/caps_2.11.0.x86_64.xml      |  1 +
>   tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml       |  1 +
>   tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml      |  1 +
>   tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml       |  1 +
>   tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml       |  1 +
>   tests/qemucapabilitiesdata/caps_2.6.0.ppc64.xml        |  1 +
>   tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml       |  1 +
>   tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml       |  1 +
>   tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml       |  1 +
>   tests/qemucapabilitiesdata/caps_2.9.0.ppc64.xml        |  1 +
>   tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml       |  1 +
>   tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml        |  1 +
>   tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml       |  1 +
>   tests/qemucapabilitiesdata/caps_3.1.0.ppc64.xml        |  1 +
>   tests/qemucapabilitiesdata/caps_3.1.0.x86_64.xml       |  1 +
>   tests/qemucapabilitiesdata/caps_4.0.0.ppc64.xml        |  1 +
>   tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml       |  1 +
>   tests/qemucapabilitiesdata/caps_4.1.0.x86_64.xml       |  1 +
>   tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml        |  1 +
>   tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml       |  1 +
>   .../qemuhotplug-base-ccw-live+ccw-virtio.xml           |  6 ------
>   ...cw-live-with-2-ccw-virtio+ccw-virtio-1-explicit.xml |  6 ------
>   ...ccw-live-with-2-ccw-virtio+ccw-virtio-1-reverse.xml |  6 ------
>   .../qemuhotplug-base-ccw-live-with-2-ccw-virtio.xml    |  6 ------
>   ...-ccw-live-with-ccw-virtio+ccw-virtio-2-explicit.xml |  6 ------
>   ...plug-base-ccw-live-with-ccw-virtio+ccw-virtio-2.xml |  6 ------
>   .../qemuhotplug-base-ccw-live-with-ccw-virtio.xml      |  6 ------
>   .../qemuhotplug-base-ccw-live.xml                      |  6 ------
>   37 files changed, 38 insertions(+), 49 deletions(-)

Rebased onto current master and pushed.

Michal




More information about the libvir-list mailing list