[PATCH 0/5] Deduplicate some of validation code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



These stemmed from Cole's comment on my patches:

https://www.redhat.com/archives/libvir-list/2020-November/msg00888.html

The approach might not be that obvious at first because domCaps do
qemuCaps to device model translation and during validation we want
the exact opposite - we have parsed device model and want to check
whether qemuCaps has corresponding capability.

But what we can do, is let domCaps code fill a bitmap of supported
device models and then check if the bit that corresponds to parsed
device model is set.

In this series I'm fixing RNG and video models, which were checked
this way until very recently (until I touched the code). And also
I'm introducing graphics check (which is new) because that one
looked the most sane from virQEMUCapsFillDomainCaps(). The rest
there not that much.

Michal Prívozník (5):
  domain_capabilities: Introduce VIR_DOMAIN_CAPS_ENUM_IS_SET
  qemu_validate: Deduplicate code for video model check
  qemu_validate: Deduplicate code for RNG model check
  domcaps: Report egl-headless graphics type
  qemu_validate: Deduplicate code for graphics type check

 src/conf/domain_capabilities.c                |   2 +-
 src/conf/domain_capabilities.h                |   2 +
 src/qemu/qemu_capabilities.c                  |   8 +-
 src/qemu/qemu_capabilities.h                  |   9 ++
 src/qemu/qemu_validate.c                      | 107 ++++--------------
 .../domaincapsdata/qemu_2.10.0-q35.x86_64.xml |   1 +
 .../domaincapsdata/qemu_2.10.0-tcg.x86_64.xml |   1 +
 .../qemu_2.10.0-virt.aarch64.xml              |   1 +
 tests/domaincapsdata/qemu_2.10.0.aarch64.xml  |   1 +
 tests/domaincapsdata/qemu_2.10.0.ppc64.xml    |   1 +
 tests/domaincapsdata/qemu_2.10.0.s390x.xml    |   1 +
 tests/domaincapsdata/qemu_2.10.0.x86_64.xml   |   1 +
 .../domaincapsdata/qemu_2.11.0-q35.x86_64.xml |   1 +
 .../domaincapsdata/qemu_2.11.0-tcg.x86_64.xml |   1 +
 tests/domaincapsdata/qemu_2.11.0.s390x.xml    |   1 +
 tests/domaincapsdata/qemu_2.11.0.x86_64.xml   |   1 +
 .../domaincapsdata/qemu_2.12.0-q35.x86_64.xml |   1 +
 .../domaincapsdata/qemu_2.12.0-tcg.x86_64.xml |   1 +
 .../qemu_2.12.0-virt.aarch64.xml              |   1 +
 tests/domaincapsdata/qemu_2.12.0.aarch64.xml  |   1 +
 tests/domaincapsdata/qemu_2.12.0.ppc64.xml    |   1 +
 tests/domaincapsdata/qemu_2.12.0.s390x.xml    |   1 +
 tests/domaincapsdata/qemu_2.12.0.x86_64.xml   |   1 +
 .../domaincapsdata/qemu_3.0.0-q35.x86_64.xml  |   1 +
 .../domaincapsdata/qemu_3.0.0-tcg.x86_64.xml  |   1 +
 tests/domaincapsdata/qemu_3.0.0.ppc64.xml     |   1 +
 tests/domaincapsdata/qemu_3.0.0.s390x.xml     |   1 +
 tests/domaincapsdata/qemu_3.0.0.x86_64.xml    |   1 +
 .../domaincapsdata/qemu_3.1.0-q35.x86_64.xml  |   1 +
 .../domaincapsdata/qemu_3.1.0-tcg.x86_64.xml  |   1 +
 tests/domaincapsdata/qemu_3.1.0.ppc64.xml     |   1 +
 tests/domaincapsdata/qemu_3.1.0.x86_64.xml    |   1 +
 .../domaincapsdata/qemu_4.0.0-q35.x86_64.xml  |   1 +
 .../domaincapsdata/qemu_4.0.0-tcg.x86_64.xml  |   1 +
 .../qemu_4.0.0-virt.aarch64.xml               |   1 +
 tests/domaincapsdata/qemu_4.0.0.aarch64.xml   |   1 +
 tests/domaincapsdata/qemu_4.0.0.ppc64.xml     |   1 +
 tests/domaincapsdata/qemu_4.0.0.s390x.xml     |   1 +
 tests/domaincapsdata/qemu_4.0.0.x86_64.xml    |   1 +
 .../domaincapsdata/qemu_4.1.0-q35.x86_64.xml  |   1 +
 .../domaincapsdata/qemu_4.1.0-tcg.x86_64.xml  |   1 +
 tests/domaincapsdata/qemu_4.1.0.x86_64.xml    |   1 +
 .../domaincapsdata/qemu_4.2.0-q35.x86_64.xml  |   1 +
 .../domaincapsdata/qemu_4.2.0-tcg.x86_64.xml  |   1 +
 .../qemu_4.2.0-virt.aarch64.xml               |   1 +
 tests/domaincapsdata/qemu_4.2.0.aarch64.xml   |   1 +
 tests/domaincapsdata/qemu_4.2.0.ppc64.xml     |   1 +
 tests/domaincapsdata/qemu_4.2.0.s390x.xml     |   1 +
 tests/domaincapsdata/qemu_4.2.0.x86_64.xml    |   1 +
 .../domaincapsdata/qemu_5.0.0-q35.x86_64.xml  |   1 +
 .../domaincapsdata/qemu_5.0.0-tcg.x86_64.xml  |   1 +
 .../qemu_5.0.0-virt.aarch64.xml               |   1 +
 tests/domaincapsdata/qemu_5.0.0.aarch64.xml   |   1 +
 tests/domaincapsdata/qemu_5.0.0.ppc64.xml     |   1 +
 tests/domaincapsdata/qemu_5.0.0.x86_64.xml    |   1 +
 .../domaincapsdata/qemu_5.1.0-q35.x86_64.xml  |   1 +
 .../domaincapsdata/qemu_5.1.0-tcg.x86_64.xml  |   1 +
 tests/domaincapsdata/qemu_5.1.0.x86_64.xml    |   1 +
 .../domaincapsdata/qemu_5.2.0-q35.x86_64.xml  |   1 +
 .../domaincapsdata/qemu_5.2.0-tcg.x86_64.xml  |   1 +
 tests/domaincapsdata/qemu_5.2.0.x86_64.xml    |   1 +
 61 files changed, 97 insertions(+), 87 deletions(-)

-- 
2.26.2




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux