[PATCH FOR-10.7.0 0/3] qemu: Expose availability of PS/2 feature in domcaps

Andrea Bolognani posted 3 patches 3 weeks, 1 day ago
src/conf/domain_capabilities.c                |  1 +
src/conf/domain_capabilities.h                |  1 +
src/conf/schemas/domaincaps.rng               |  9 +++++++
src/qemu/qemu_capabilities.c                  | 24 +++++++++++++++----
src/qemu/qemu_capabilities.h                  |  3 ++-
src/qemu/qemu_domain.c                        | 14 +++++++----
src/qemu/qemu_domain.h                        |  6 +++++
src/qemu/qemu_validate.c                      |  2 +-
.../domaincapsdata/qemu_5.2.0-q35.x86_64.xml  |  1 +
.../qemu_5.2.0-tcg-virt.riscv64.xml           |  1 +
.../domaincapsdata/qemu_5.2.0-tcg.x86_64.xml  |  1 +
.../qemu_5.2.0-virt.aarch64.xml               |  1 +
.../qemu_5.2.0-virt.riscv64.xml               |  1 +
tests/domaincapsdata/qemu_5.2.0.aarch64.xml   |  1 +
tests/domaincapsdata/qemu_5.2.0.ppc64.xml     |  1 +
tests/domaincapsdata/qemu_5.2.0.s390x.xml     |  1 +
tests/domaincapsdata/qemu_5.2.0.x86_64.xml    |  1 +
.../domaincapsdata/qemu_6.0.0-q35.x86_64.xml  |  1 +
.../domaincapsdata/qemu_6.0.0-tcg.x86_64.xml  |  1 +
.../qemu_6.0.0-virt.aarch64.xml               |  1 +
tests/domaincapsdata/qemu_6.0.0.aarch64.xml   |  1 +
tests/domaincapsdata/qemu_6.0.0.s390x.xml     |  1 +
tests/domaincapsdata/qemu_6.0.0.x86_64.xml    |  1 +
.../domaincapsdata/qemu_6.1.0-q35.x86_64.xml  |  1 +
.../domaincapsdata/qemu_6.1.0-tcg.x86_64.xml  |  1 +
tests/domaincapsdata/qemu_6.1.0.x86_64.xml    |  1 +
.../domaincapsdata/qemu_6.2.0-q35.x86_64.xml  |  1 +
.../domaincapsdata/qemu_6.2.0-tcg.x86_64.xml  |  1 +
.../qemu_6.2.0-virt.aarch64.xml               |  1 +
tests/domaincapsdata/qemu_6.2.0.aarch64.xml   |  1 +
tests/domaincapsdata/qemu_6.2.0.ppc64.xml     |  1 +
tests/domaincapsdata/qemu_6.2.0.x86_64.xml    |  1 +
.../qemu_7.0.0-hvf.aarch64+hvf.xml            |  1 +
.../domaincapsdata/qemu_7.0.0-q35.x86_64.xml  |  1 +
.../domaincapsdata/qemu_7.0.0-tcg.x86_64.xml  |  1 +
.../qemu_7.0.0-virt.aarch64.xml               |  1 +
tests/domaincapsdata/qemu_7.0.0.aarch64.xml   |  1 +
tests/domaincapsdata/qemu_7.0.0.ppc64.xml     |  1 +
tests/domaincapsdata/qemu_7.0.0.x86_64.xml    |  1 +
.../domaincapsdata/qemu_7.1.0-q35.x86_64.xml  |  1 +
.../domaincapsdata/qemu_7.1.0-tcg.x86_64.xml  |  1 +
tests/domaincapsdata/qemu_7.1.0.ppc64.xml     |  1 +
tests/domaincapsdata/qemu_7.1.0.x86_64.xml    |  1 +
.../qemu_7.2.0-hvf.x86_64+hvf.xml             |  1 +
.../domaincapsdata/qemu_7.2.0-q35.x86_64.xml  |  1 +
.../qemu_7.2.0-tcg.x86_64+hvf.xml             |  1 +
.../domaincapsdata/qemu_7.2.0-tcg.x86_64.xml  |  1 +
tests/domaincapsdata/qemu_7.2.0.ppc.xml       |  1 +
tests/domaincapsdata/qemu_7.2.0.x86_64.xml    |  1 +
.../domaincapsdata/qemu_8.0.0-q35.x86_64.xml  |  1 +
.../qemu_8.0.0-tcg-virt.riscv64.xml           |  1 +
.../domaincapsdata/qemu_8.0.0-tcg.x86_64.xml  |  1 +
.../qemu_8.0.0-virt.riscv64.xml               |  1 +
tests/domaincapsdata/qemu_8.0.0.x86_64.xml    |  1 +
.../domaincapsdata/qemu_8.1.0-q35.x86_64.xml  |  1 +
.../domaincapsdata/qemu_8.1.0-tcg.x86_64.xml  |  1 +
tests/domaincapsdata/qemu_8.1.0.s390x.xml     |  1 +
tests/domaincapsdata/qemu_8.1.0.x86_64.xml    |  1 +
.../domaincapsdata/qemu_8.2.0-q35.x86_64.xml  |  1 +
.../qemu_8.2.0-tcg-virt.loongarch64.xml       |  1 +
.../domaincapsdata/qemu_8.2.0-tcg.x86_64.xml  |  1 +
.../qemu_8.2.0-virt.aarch64.xml               |  1 +
.../qemu_8.2.0-virt.loongarch64.xml           |  1 +
tests/domaincapsdata/qemu_8.2.0.aarch64.xml   |  1 +
tests/domaincapsdata/qemu_8.2.0.armv7l.xml    |  1 +
tests/domaincapsdata/qemu_8.2.0.s390x.xml     |  1 +
tests/domaincapsdata/qemu_8.2.0.x86_64.xml    |  1 +
.../domaincapsdata/qemu_9.0.0-q35.x86_64.xml  |  1 +
.../domaincapsdata/qemu_9.0.0-tcg.x86_64.xml  |  1 +
tests/domaincapsdata/qemu_9.0.0.sparc.xml     |  1 +
tests/domaincapsdata/qemu_9.0.0.x86_64.xml    |  1 +
.../domaincapsdata/qemu_9.1.0-q35.x86_64.xml  |  1 +
.../domaincapsdata/qemu_9.1.0-tcg.x86_64.xml  |  1 +
tests/domaincapsdata/qemu_9.1.0.x86_64.xml    |  1 +
74 files changed, 115 insertions(+), 11 deletions(-)
[PATCH FOR-10.7.0 0/3] qemu: Expose availability of PS/2 feature in domcaps
Posted by Andrea Bolognani 3 weeks, 1 day ago
<blurb supported='no'/>

Andrea Bolognani (3):
  qemu: Export a few functions
  qemu: Change signature for virQEMUCapsSupportsI8042Toggle()
  qemu: Expose availability of PS/2 feature in domcaps

 src/conf/domain_capabilities.c                |  1 +
 src/conf/domain_capabilities.h                |  1 +
 src/conf/schemas/domaincaps.rng               |  9 +++++++
 src/qemu/qemu_capabilities.c                  | 24 +++++++++++++++----
 src/qemu/qemu_capabilities.h                  |  3 ++-
 src/qemu/qemu_domain.c                        | 14 +++++++----
 src/qemu/qemu_domain.h                        |  6 +++++
 src/qemu/qemu_validate.c                      |  2 +-
 .../domaincapsdata/qemu_5.2.0-q35.x86_64.xml  |  1 +
 .../qemu_5.2.0-tcg-virt.riscv64.xml           |  1 +
 .../domaincapsdata/qemu_5.2.0-tcg.x86_64.xml  |  1 +
 .../qemu_5.2.0-virt.aarch64.xml               |  1 +
 .../qemu_5.2.0-virt.riscv64.xml               |  1 +
 tests/domaincapsdata/qemu_5.2.0.aarch64.xml   |  1 +
 tests/domaincapsdata/qemu_5.2.0.ppc64.xml     |  1 +
 tests/domaincapsdata/qemu_5.2.0.s390x.xml     |  1 +
 tests/domaincapsdata/qemu_5.2.0.x86_64.xml    |  1 +
 .../domaincapsdata/qemu_6.0.0-q35.x86_64.xml  |  1 +
 .../domaincapsdata/qemu_6.0.0-tcg.x86_64.xml  |  1 +
 .../qemu_6.0.0-virt.aarch64.xml               |  1 +
 tests/domaincapsdata/qemu_6.0.0.aarch64.xml   |  1 +
 tests/domaincapsdata/qemu_6.0.0.s390x.xml     |  1 +
 tests/domaincapsdata/qemu_6.0.0.x86_64.xml    |  1 +
 .../domaincapsdata/qemu_6.1.0-q35.x86_64.xml  |  1 +
 .../domaincapsdata/qemu_6.1.0-tcg.x86_64.xml  |  1 +
 tests/domaincapsdata/qemu_6.1.0.x86_64.xml    |  1 +
 .../domaincapsdata/qemu_6.2.0-q35.x86_64.xml  |  1 +
 .../domaincapsdata/qemu_6.2.0-tcg.x86_64.xml  |  1 +
 .../qemu_6.2.0-virt.aarch64.xml               |  1 +
 tests/domaincapsdata/qemu_6.2.0.aarch64.xml   |  1 +
 tests/domaincapsdata/qemu_6.2.0.ppc64.xml     |  1 +
 tests/domaincapsdata/qemu_6.2.0.x86_64.xml    |  1 +
 .../qemu_7.0.0-hvf.aarch64+hvf.xml            |  1 +
 .../domaincapsdata/qemu_7.0.0-q35.x86_64.xml  |  1 +
 .../domaincapsdata/qemu_7.0.0-tcg.x86_64.xml  |  1 +
 .../qemu_7.0.0-virt.aarch64.xml               |  1 +
 tests/domaincapsdata/qemu_7.0.0.aarch64.xml   |  1 +
 tests/domaincapsdata/qemu_7.0.0.ppc64.xml     |  1 +
 tests/domaincapsdata/qemu_7.0.0.x86_64.xml    |  1 +
 .../domaincapsdata/qemu_7.1.0-q35.x86_64.xml  |  1 +
 .../domaincapsdata/qemu_7.1.0-tcg.x86_64.xml  |  1 +
 tests/domaincapsdata/qemu_7.1.0.ppc64.xml     |  1 +
 tests/domaincapsdata/qemu_7.1.0.x86_64.xml    |  1 +
 .../qemu_7.2.0-hvf.x86_64+hvf.xml             |  1 +
 .../domaincapsdata/qemu_7.2.0-q35.x86_64.xml  |  1 +
 .../qemu_7.2.0-tcg.x86_64+hvf.xml             |  1 +
 .../domaincapsdata/qemu_7.2.0-tcg.x86_64.xml  |  1 +
 tests/domaincapsdata/qemu_7.2.0.ppc.xml       |  1 +
 tests/domaincapsdata/qemu_7.2.0.x86_64.xml    |  1 +
 .../domaincapsdata/qemu_8.0.0-q35.x86_64.xml  |  1 +
 .../qemu_8.0.0-tcg-virt.riscv64.xml           |  1 +
 .../domaincapsdata/qemu_8.0.0-tcg.x86_64.xml  |  1 +
 .../qemu_8.0.0-virt.riscv64.xml               |  1 +
 tests/domaincapsdata/qemu_8.0.0.x86_64.xml    |  1 +
 .../domaincapsdata/qemu_8.1.0-q35.x86_64.xml  |  1 +
 .../domaincapsdata/qemu_8.1.0-tcg.x86_64.xml  |  1 +
 tests/domaincapsdata/qemu_8.1.0.s390x.xml     |  1 +
 tests/domaincapsdata/qemu_8.1.0.x86_64.xml    |  1 +
 .../domaincapsdata/qemu_8.2.0-q35.x86_64.xml  |  1 +
 .../qemu_8.2.0-tcg-virt.loongarch64.xml       |  1 +
 .../domaincapsdata/qemu_8.2.0-tcg.x86_64.xml  |  1 +
 .../qemu_8.2.0-virt.aarch64.xml               |  1 +
 .../qemu_8.2.0-virt.loongarch64.xml           |  1 +
 tests/domaincapsdata/qemu_8.2.0.aarch64.xml   |  1 +
 tests/domaincapsdata/qemu_8.2.0.armv7l.xml    |  1 +
 tests/domaincapsdata/qemu_8.2.0.s390x.xml     |  1 +
 tests/domaincapsdata/qemu_8.2.0.x86_64.xml    |  1 +
 .../domaincapsdata/qemu_9.0.0-q35.x86_64.xml  |  1 +
 .../domaincapsdata/qemu_9.0.0-tcg.x86_64.xml  |  1 +
 tests/domaincapsdata/qemu_9.0.0.sparc.xml     |  1 +
 tests/domaincapsdata/qemu_9.0.0.x86_64.xml    |  1 +
 .../domaincapsdata/qemu_9.1.0-q35.x86_64.xml  |  1 +
 .../domaincapsdata/qemu_9.1.0-tcg.x86_64.xml  |  1 +
 tests/domaincapsdata/qemu_9.1.0.x86_64.xml    |  1 +
 74 files changed, 115 insertions(+), 11 deletions(-)

-- 
2.46.0
Re: [PATCH FOR-10.7.0 0/3] qemu: Expose availability of PS/2 feature in domcaps
Posted by Michal Prívozník 3 weeks, 1 day ago
On 8/28/24 15:08, Andrea Bolognani wrote:
> <blurb supported='no'/>
> 
> Andrea Bolognani (3):
>   qemu: Export a few functions
>   qemu: Change signature for virQEMUCapsSupportsI8042Toggle()
>   qemu: Expose availability of PS/2 feature in domcaps
> 

>  74 files changed, 115 insertions(+), 11 deletions(-)
> 

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>

and definitely release material.

Michal
Re: [PATCH FOR-10.7.0 0/3] qemu: Expose availability of PS/2 feature in domcaps
Posted by Kamil Szczęk 3 weeks, 1 day ago
Hi Andrea,

I was actually working on the same thing today, but haven't gotten around to posting the patches yet.
Do you think it would make sense to make this feature indeterminate for non-i8042 machines?

Like so:

static void
virQEMUCapsFillDomainFeaturePS2Caps(virQEMUCaps *qemuCaps,
                                    virDomainCaps *domCaps)
{
    if (!virQEMUCapsMachineSupportsI8042(qemuCaps, domCaps->machine, domCaps->arch))
        return;

    if (virQEMUCapsMachineSupportsI8042Toggle(qemuCaps, domCaps->machine, domCaps->arch))
        domCaps->features[VIR_DOMAIN_CAPS_FEATURE_PS2] = VIR_TRISTATE_BOOL_YES;
    else
        domCaps->features[VIR_DOMAIN_CAPS_FEATURE_PS2] = VIR_TRISTATE_BOOL_NO;
}
Re: [PATCH FOR-10.7.0 0/3] qemu: Expose availability of PS/2 feature in domcaps
Posted by Andrea Bolognani 3 weeks, 1 day ago
On Wed, Aug 28, 2024 at 01:49:22PM GMT, Kamil Szczęk wrote:
> Hi Andrea,
>
> I was actually working on the same thing today, but haven't gotten around to posting the patches yet.
> Do you think it would make sense to make this feature indeterminate for non-i8042 machines?
>
> Like so:
>
> static void
> virQEMUCapsFillDomainFeaturePS2Caps(virQEMUCaps *qemuCaps,
>                                     virDomainCaps *domCaps)
> {
>     if (!virQEMUCapsMachineSupportsI8042(qemuCaps, domCaps->machine, domCaps->arch))
>         return;
>
>     if (virQEMUCapsMachineSupportsI8042Toggle(qemuCaps, domCaps->machine, domCaps->arch))
>         domCaps->features[VIR_DOMAIN_CAPS_FEATURE_PS2] = VIR_TRISTATE_BOOL_YES;
>     else
>         domCaps->features[VIR_DOMAIN_CAPS_FEATURE_PS2] = VIR_TRISTATE_BOOL_NO;
> }

I had something like that initially, but then I realized that it
doesn't really make sense. Reporting

  <ps2 supported='no'/>

on e.g. aarch64 is entirely accurate after all.

-- 
Andrea Bolognani / Red Hat / Virtualization
Re: [PATCH FOR-10.7.0 0/3] qemu: Expose availability of PS/2 feature in domcaps
Posted by Kamil Szczęk 3 weeks, 1 day ago
On Wednesday, August 28th, 2024 at 16:24, Andrea Bolognani <abologna@redhat.com> wrote:
> 
> On Wed, Aug 28, 2024 at 01:49:22PM GMT, Kamil Szczęk wrote:
> 
> > Hi Andrea,
> > 
> > I was actually working on the same thing today, but haven't gotten around to posting the patches yet.
> > Do you think it would make sense to make this feature indeterminate for non-i8042 machines?
> > 
> > Like so:
> > 
> > static void
> > virQEMUCapsFillDomainFeaturePS2Caps(virQEMUCaps *qemuCaps,
> > virDomainCaps *domCaps)
> > {
> > if (!virQEMUCapsMachineSupportsI8042(qemuCaps, domCaps->machine, domCaps->arch))
> > return;
> > 
> > if (virQEMUCapsMachineSupportsI8042Toggle(qemuCaps, domCaps->machine, domCaps->arch))
> > domCaps->features[VIR_DOMAIN_CAPS_FEATURE_PS2] = VIR_TRISTATE_BOOL_YES;
> > else
> > domCaps->features[VIR_DOMAIN_CAPS_FEATURE_PS2] = VIR_TRISTATE_BOOL_NO;
> > }
> 
> 
> I had something like that initially, but then I realized that it
> doesn't really make sense. Reporting
> 
> <ps2 supported='no'/>
> 
> 
> on e.g. aarch64 is entirely accurate after all.

Yeah, that's true. LGTM otherwise.