[PATCH] conf: Restore setting default bus for input devices

Michal Privoznik posted 1 patch 4 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/2698f2cd2b9a2e7966b0ad9ae27501a7f5d13d58.1704286693.git.mprivozn@redhat.com
src/conf/domain_postparse.c | 1 +
1 file changed, 1 insertion(+)
[PATCH] conf: Restore setting default bus for input devices
Posted by Michal Privoznik 4 months ago
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: Michal Privoznik <mprivozn@redhat.com>
---
 src/conf/domain_postparse.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/conf/domain_postparse.c b/src/conf/domain_postparse.c
index e79913b73f..ed9411f5e6 100644
--- a/src/conf/domain_postparse.c
+++ b/src/conf/domain_postparse.c
@@ -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;
-- 
2.41.0
_______________________________________________
Devel mailing list -- devel@lists.libvirt.org
To unsubscribe send an email to devel-leave@lists.libvirt.org
Re: [PATCH] conf: Restore setting default bus for input devices
Posted by Jiri Denemark 4 months ago
On Wed, Jan 03, 2024 at 13:58:13 +0100, Michal Privoznik wrote:
> 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: Michal Privoznik <mprivozn@redhat.com>
> ---
>  src/conf/domain_postparse.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/src/conf/domain_postparse.c b/src/conf/domain_postparse.c
> index e79913b73f..ed9411f5e6 100644
> --- a/src/conf/domain_postparse.c
> +++ b/src/conf/domain_postparse.c
> @@ -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;

An identical patch was proposed earlier by
https://gitlab.com/libvirt/libvirt/-/merge_requests/310

I guess it would be fair to merge it with your commit message and use it
instead of this patch to give the original author a nice feeling of
making a useful contribution.

Jirka
_______________________________________________
Devel mailing list -- devel@lists.libvirt.org
To unsubscribe send an email to devel-leave@lists.libvirt.org