[libvirt PATCH 0/5] qemu: support "max" CPU model

Daniel P. Berrangé berrange at redhat.com
Tue Feb 9 13:58:56 UTC 2021


QEMU has supported a "max" CPU model for many releases now, but somehow
we never got it wired up into libvirt.

"max" is useful for applications which don't care about live migration
and just want the best CPU model possible. Normally "host" would be used
but this only works for KVM. "max" is identical to "host" for KVM, while
for TCG it exposes every feature TCG implements.

This "max" model will be a natural choice for something like libguestfs
and probably other apps too.

In libvirt we enable it with

   <cpu mode="maximum"/>


Daniel P. Berrangé (5):
  conf: define a new "maximum" CPU mode
  conf: add reporting of "maximum" CPU mode in domain caps
  cpu: wire up support for maximum CPU mode
  qemu: probe for "-cpu max" support
  qemu: wire up support for maximum CPU model

 docs/formatdomain.rst                         | 24 +++++++++++++++++
 docs/formatdomaincaps.html.in                 |  6 +++++
 docs/schemas/domaincaps.rng                   | 13 +++++++++
 src/conf/cpu_conf.c                           | 13 ++++++---
 src/conf/cpu_conf.h                           |  1 +
 src/conf/domain_capabilities.c                | 15 +++++++++++
 src/conf/domain_capabilities.h                |  2 ++
 src/cpu/cpu.c                                 |  4 ++-
 src/cpu/cpu_ppc64.c                           | 10 +++++--
 src/cpu/cpu_x86.c                             |  3 ++-
 src/qemu/qemu_capabilities.c                  | 27 +++++++++++++++++++
 src/qemu/qemu_capabilities.h                  |  1 +
 src/qemu/qemu_command.c                       |  9 +++++--
 src/qemu/qemu_domain.c                        | 10 ++++---
 src/qemu/qemu_driver.c                        |  2 ++
 src/qemu/qemu_process.c                       |  8 +++---
 src/qemu/qemu_validate.c                      | 14 ++++++++--
 tests/domaincapsdata/bhyve_basic.x86_64.xml   |  1 +
 tests/domaincapsdata/bhyve_fbuf.x86_64.xml    |  1 +
 tests/domaincapsdata/bhyve_uefi.x86_64.xml    |  1 +
 tests/domaincapsdata/empty.xml                |  1 +
 tests/domaincapsdata/libxl-xenfv.xml          |  1 +
 tests/domaincapsdata/libxl-xenpv.xml          |  1 +
 .../domaincapsdata/qemu_1.5.3-q35.x86_64.xml  |  1 +
 .../domaincapsdata/qemu_1.5.3-tcg.x86_64.xml  |  1 +
 tests/domaincapsdata/qemu_1.5.3.x86_64.xml    |  1 +
 .../domaincapsdata/qemu_1.6.0-q35.x86_64.xml  |  1 +
 .../domaincapsdata/qemu_1.6.0-tcg.x86_64.xml  |  1 +
 tests/domaincapsdata/qemu_1.6.0.x86_64.xml    |  1 +
 .../domaincapsdata/qemu_1.7.0-q35.x86_64.xml  |  1 +
 .../domaincapsdata/qemu_1.7.0-tcg.x86_64.xml  |  1 +
 tests/domaincapsdata/qemu_1.7.0.x86_64.xml    |  1 +
 .../domaincapsdata/qemu_2.1.1-q35.x86_64.xml  |  1 +
 .../domaincapsdata/qemu_2.1.1-tcg.x86_64.xml  |  1 +
 tests/domaincapsdata/qemu_2.1.1.x86_64.xml    |  1 +
 .../domaincapsdata/qemu_2.10.0-q35.x86_64.xml |  6 +++++
 .../domaincapsdata/qemu_2.10.0-tcg.x86_64.xml |  6 +++++
 .../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   |  6 +++++
 .../domaincapsdata/qemu_2.11.0-q35.x86_64.xml |  6 +++++
 .../domaincapsdata/qemu_2.11.0-tcg.x86_64.xml |  6 +++++
 tests/domaincapsdata/qemu_2.11.0.s390x.xml    |  1 +
 tests/domaincapsdata/qemu_2.11.0.x86_64.xml   |  6 +++++
 .../domaincapsdata/qemu_2.12.0-q35.x86_64.xml |  6 +++++
 .../domaincapsdata/qemu_2.12.0-tcg.x86_64.xml |  6 +++++
 .../qemu_2.12.0-virt.aarch64.xml              |  6 +++++
 tests/domaincapsdata/qemu_2.12.0.aarch64.xml  |  6 +++++
 tests/domaincapsdata/qemu_2.12.0.ppc64.xml    |  6 +++++
 tests/domaincapsdata/qemu_2.12.0.s390x.xml    |  1 +
 tests/domaincapsdata/qemu_2.12.0.x86_64.xml   |  6 +++++
 .../domaincapsdata/qemu_2.4.0-q35.x86_64.xml  |  1 +
 .../domaincapsdata/qemu_2.4.0-tcg.x86_64.xml  |  1 +
 tests/domaincapsdata/qemu_2.4.0.x86_64.xml    |  1 +
 .../domaincapsdata/qemu_2.5.0-q35.x86_64.xml  |  1 +
 .../domaincapsdata/qemu_2.5.0-tcg.x86_64.xml  |  1 +
 tests/domaincapsdata/qemu_2.5.0.x86_64.xml    |  1 +
 .../domaincapsdata/qemu_2.6.0-q35.x86_64.xml  |  1 +
 .../domaincapsdata/qemu_2.6.0-tcg.x86_64.xml  |  1 +
 .../qemu_2.6.0-virt.aarch64.xml               |  1 +
 tests/domaincapsdata/qemu_2.6.0.aarch64.xml   |  1 +
 tests/domaincapsdata/qemu_2.6.0.ppc64.xml     |  1 +
 tests/domaincapsdata/qemu_2.6.0.x86_64.xml    |  1 +
 .../domaincapsdata/qemu_2.7.0-q35.x86_64.xml  |  1 +
 .../domaincapsdata/qemu_2.7.0-tcg.x86_64.xml  |  1 +
 tests/domaincapsdata/qemu_2.7.0.s390x.xml     |  1 +
 tests/domaincapsdata/qemu_2.7.0.x86_64.xml    |  1 +
 .../domaincapsdata/qemu_2.8.0-q35.x86_64.xml  |  1 +
 .../domaincapsdata/qemu_2.8.0-tcg.x86_64.xml  |  1 +
 tests/domaincapsdata/qemu_2.8.0.s390x.xml     |  1 +
 tests/domaincapsdata/qemu_2.8.0.x86_64.xml    |  1 +
 .../domaincapsdata/qemu_2.9.0-q35.x86_64.xml  |  6 +++++
 .../domaincapsdata/qemu_2.9.0-tcg.x86_64.xml  |  6 +++++
 tests/domaincapsdata/qemu_2.9.0.ppc64.xml     |  1 +
 tests/domaincapsdata/qemu_2.9.0.s390x.xml     |  1 +
 tests/domaincapsdata/qemu_2.9.0.x86_64.xml    |  6 +++++
 .../domaincapsdata/qemu_3.0.0-q35.x86_64.xml  |  6 +++++
 .../domaincapsdata/qemu_3.0.0-tcg.x86_64.xml  |  6 +++++
 tests/domaincapsdata/qemu_3.0.0.ppc64.xml     |  6 +++++
 tests/domaincapsdata/qemu_3.0.0.s390x.xml     |  1 +
 tests/domaincapsdata/qemu_3.0.0.x86_64.xml    |  6 +++++
 .../domaincapsdata/qemu_3.1.0-q35.x86_64.xml  |  6 +++++
 .../domaincapsdata/qemu_3.1.0-tcg.x86_64.xml  |  6 +++++
 tests/domaincapsdata/qemu_3.1.0.ppc64.xml     |  6 +++++
 tests/domaincapsdata/qemu_3.1.0.x86_64.xml    |  6 +++++
 .../domaincapsdata/qemu_4.0.0-q35.x86_64.xml  |  6 +++++
 .../domaincapsdata/qemu_4.0.0-tcg.x86_64.xml  |  6 +++++
 .../qemu_4.0.0-virt.aarch64.xml               |  6 +++++
 tests/domaincapsdata/qemu_4.0.0.aarch64.xml   |  6 +++++
 tests/domaincapsdata/qemu_4.0.0.ppc64.xml     |  6 +++++
 tests/domaincapsdata/qemu_4.0.0.s390x.xml     |  6 +++++
 tests/domaincapsdata/qemu_4.0.0.x86_64.xml    |  6 +++++
 .../domaincapsdata/qemu_4.1.0-q35.x86_64.xml  |  6 +++++
 .../domaincapsdata/qemu_4.1.0-tcg.x86_64.xml  |  6 +++++
 tests/domaincapsdata/qemu_4.1.0.x86_64.xml    |  6 +++++
 .../domaincapsdata/qemu_4.2.0-q35.x86_64.xml  |  6 +++++
 .../domaincapsdata/qemu_4.2.0-tcg.x86_64.xml  |  6 +++++
 .../qemu_4.2.0-virt.aarch64.xml               |  6 +++++
 tests/domaincapsdata/qemu_4.2.0.aarch64.xml   |  6 +++++
 tests/domaincapsdata/qemu_4.2.0.ppc64.xml     |  6 +++++
 tests/domaincapsdata/qemu_4.2.0.s390x.xml     |  6 +++++
 tests/domaincapsdata/qemu_4.2.0.x86_64.xml    |  6 +++++
 .../domaincapsdata/qemu_5.0.0-q35.x86_64.xml  |  6 +++++
 .../domaincapsdata/qemu_5.0.0-tcg.x86_64.xml  |  6 +++++
 .../qemu_5.0.0-virt.aarch64.xml               |  6 +++++
 tests/domaincapsdata/qemu_5.0.0.aarch64.xml   |  6 +++++
 tests/domaincapsdata/qemu_5.0.0.ppc64.xml     |  6 +++++
 tests/domaincapsdata/qemu_5.0.0.x86_64.xml    |  6 +++++
 .../domaincapsdata/qemu_5.1.0-q35.x86_64.xml  |  6 +++++
 .../domaincapsdata/qemu_5.1.0-tcg.x86_64.xml  |  6 +++++
 tests/domaincapsdata/qemu_5.1.0.sparc.xml     |  1 +
 tests/domaincapsdata/qemu_5.1.0.x86_64.xml    |  6 +++++
 .../domaincapsdata/qemu_5.2.0-q35.x86_64.xml  |  6 +++++
 .../domaincapsdata/qemu_5.2.0-tcg.x86_64.xml  |  6 +++++
 .../qemu_5.2.0-virt.aarch64.xml               |  6 +++++
 tests/domaincapsdata/qemu_5.2.0.aarch64.xml   |  6 +++++
 tests/domaincapsdata/qemu_5.2.0.ppc64.xml     |  6 +++++
 tests/domaincapsdata/qemu_5.2.0.s390x.xml     |  6 +++++
 tests/domaincapsdata/qemu_5.2.0.x86_64.xml    |  6 +++++
 .../domaincapsdata/qemu_6.0.0-q35.x86_64.xml  |  6 +++++
 .../domaincapsdata/qemu_6.0.0-tcg.x86_64.xml  |  6 +++++
 tests/domaincapsdata/qemu_6.0.0.x86_64.xml    |  6 +++++
 .../caps_2.10.0.x86_64.xml                    |  1 +
 .../caps_2.11.0.x86_64.xml                    |  1 +
 .../caps_2.12.0.aarch64.xml                   |  1 +
 .../caps_2.12.0.ppc64.xml                     |  1 +
 .../caps_2.12.0.x86_64.xml                    |  1 +
 .../caps_2.9.0.x86_64.xml                     |  1 +
 .../qemucapabilitiesdata/caps_3.0.0.ppc64.xml |  1 +
 .../caps_3.0.0.x86_64.xml                     |  1 +
 .../qemucapabilitiesdata/caps_3.1.0.ppc64.xml |  1 +
 .../caps_3.1.0.x86_64.xml                     |  1 +
 .../caps_4.0.0.aarch64.xml                    |  1 +
 .../qemucapabilitiesdata/caps_4.0.0.ppc64.xml |  1 +
 .../qemucapabilitiesdata/caps_4.0.0.s390x.xml |  1 +
 .../caps_4.0.0.x86_64.xml                     |  1 +
 .../caps_4.1.0.x86_64.xml                     |  1 +
 .../caps_4.2.0.aarch64.xml                    |  1 +
 .../qemucapabilitiesdata/caps_4.2.0.ppc64.xml |  1 +
 .../qemucapabilitiesdata/caps_4.2.0.s390x.xml |  1 +
 .../caps_4.2.0.x86_64.xml                     |  1 +
 .../caps_5.0.0.aarch64.xml                    |  1 +
 .../qemucapabilitiesdata/caps_5.0.0.ppc64.xml |  1 +
 .../caps_5.0.0.x86_64.xml                     |  1 +
 .../caps_5.1.0.x86_64.xml                     |  1 +
 .../caps_5.2.0.aarch64.xml                    |  1 +
 .../qemucapabilitiesdata/caps_5.2.0.ppc64.xml |  1 +
 .../qemucapabilitiesdata/caps_5.2.0.s390x.xml |  1 +
 .../caps_5.2.0.x86_64.xml                     |  1 +
 .../caps_6.0.0.x86_64.xml                     |  1 +
 .../cpu-cache-passthrough3.err                |  2 +-
 153 files changed, 575 insertions(+), 19 deletions(-)

-- 
2.29.2





More information about the libvir-list mailing list