render / rpms / libvirt

Forked from rpms/libvirt 4 months ago
Clone
6eb56c
From c9056e682a8a67dc29e39eb01392fcf8ee978c31 Mon Sep 17 00:00:00 2001
6eb56c
From: Jonathan Wright <jonathan@almalinux.org>
6eb56c
Date: Wed, 3 Jan 2024 09:26:59 -0600
6eb56c
Subject: [PATCH] conf: Restore setting default bus for input devices
6eb56c
6eb56c
Prior to v9.3.0-rc1~30 we used to set default bus for <input/>
6eb56c
devices, during XML parsing. In the commit this code was moved to
6eb56c
a post parse callback. But somehow the line that sets the bus in
6eb56c
one specific case disappeared. Bring it back.
6eb56c
6eb56c
Resolves: https://gitlab.com/libvirt/libvirt/-/issues/577
6eb56c
Fixes: c4bc4d3b82fbe22e03c986ca896090f481df5c10
6eb56c
Signed-off-by: Jonathan Wright <jonathan@almalinux.org>
6eb56c
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
6eb56c
---
6eb56c
 src/conf/domain_postparse.c | 1 +
6eb56c
 1 file changed, 1 insertion(+)
6eb56c
6eb56c
diff --git a/src/conf/domain_postparse.c b/src/conf/domain_postparse.c
6eb56c
index e79913b73f..ee27023f3e 100644
6eb56c
--- a/src/conf/domain_postparse.c
6eb56c
+++ b/src/conf/domain_postparse.c
6eb56c
@@ -657,6 +657,7 @@ virDomainInputDefPostParse(virDomainInputDef *input,
6eb56c
             if ((input->type == VIR_DOMAIN_INPUT_TYPE_MOUSE ||
6eb56c
                  input->type == VIR_DOMAIN_INPUT_TYPE_KBD) &&
6eb56c
                 (ARCH_IS_X86(def->os.arch) || def->os.arch == VIR_ARCH_NONE)) {
6eb56c
+                    input->bus = VIR_DOMAIN_INPUT_BUS_PS2;
6eb56c
             } else if (ARCH_IS_S390(def->os.arch) ||
6eb56c
                        input->type == VIR_DOMAIN_INPUT_TYPE_PASSTHROUGH) {
6eb56c
                 input->bus = VIR_DOMAIN_INPUT_BUS_VIRTIO;
6eb56c
--