]> xenbits.xensource.com Git - libvirt.git/commitdiff
conf: Restore setting default bus for input devices
authorJonathan Wright <jonathan@almalinux.org>
Wed, 3 Jan 2024 15:26:59 +0000 (09:26 -0600)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 3 Jan 2024 16:22:04 +0000 (17:22 +0100)
Prior to v9.3.0-rc1~30 we used to set default bus for <input/>
devices, during XML parsing. In the commit this code was moved to
a post parse callback. But somehow the line that sets the bus in
one specific case disappeared. Bring it back.

Resolves: https://gitlab.com/libvirt/libvirt/-/issues/577
Fixes: c4bc4d3b82fbe22e03c986ca896090f481df5c10
Signed-off-by: Jonathan Wright <jonathan@almalinux.org>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/conf/domain_postparse.c

index e79913b73fd94604e52a81c37df86ee0315794d1..ee27023f3ed3bff7802a4ec92fcd9f5b18df60cf 100644 (file)
@@ -657,6 +657,7 @@ virDomainInputDefPostParse(virDomainInputDef *input,
             if ((input->type == VIR_DOMAIN_INPUT_TYPE_MOUSE ||
                  input->type == VIR_DOMAIN_INPUT_TYPE_KBD) &&
                 (ARCH_IS_X86(def->os.arch) || def->os.arch == VIR_ARCH_NONE)) {
+                    input->bus = VIR_DOMAIN_INPUT_BUS_PS2;
             } else if (ARCH_IS_S390(def->os.arch) ||
                        input->type == VIR_DOMAIN_INPUT_TYPE_PASSTHROUGH) {
                 input->bus = VIR_DOMAIN_INPUT_BUS_VIRTIO;