[PATCH 00/33] qemu: Improve handling of architecture-specific defaults

Andrea Bolognani posted 33 patches 1 month ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20240124193753.1265454-1-abologna@redhat.com
There is a newer version of this series
.../qemuxmlconfdata/title-and-description.xml |  19 +
...tomatic-unavailable-q35.x86_64-latest.args |  33 +
...utomatic-unavailable-q35.x86_64-latest.xml |  30 +
...b-controller-automatic-unavailable-q35.xml |  20 +
...86_64-pc-default-models.x86_64-latest.args |  39 ++
...x86_64-pc-default-models.x86_64-latest.xml |  50 ++
.../x86_64-pc-default-models.xml              |  21 +
.../x86_64-pc-minimal.x86_64-latest.args      |  33 +
...ml => x86_64-pc-minimal.x86_64-latest.xml} |  24 +-
tests/qemuxmlconfdata/x86_64-pc-minimal.xml   |  12 +
...6_64-q35-default-models.x86_64-latest.args |  44 ++
...86_64-q35-default-models.x86_64-latest.xml |  68 ++
.../x86_64-q35-default-models.xml             |  21 +
.../x86_64-q35-minimal.x86_64-latest.args     |  38 ++
.../x86_64-q35-minimal.x86_64-latest.xml      |  50 ++
tests/qemuxmlconfdata/x86_64-q35-minimal.xml  |  12 +
tests/qemuxmlconftest.c                       |  28 +-
68 files changed, 1783 insertions(+), 488 deletions(-)
create mode 100644 tests/qemuxmlconfdata/aarch64-panic-no-model.aarch64-latest.err
create mode 100644 tests/qemuxmlconfdata/aarch64-panic-no-model.xml
create mode 100644 tests/qemuxmlconfdata/aarch64-virt-default-models.aarch64-latest.args
create mode 100644 tests/qemuxmlconfdata/aarch64-virt-default-models.aarch64-latest.xml
create mode 100644 tests/qemuxmlconfdata/aarch64-virt-default-models.xml
create mode 100644 tests/qemuxmlconfdata/aarch64-virt-minimal.aarch64-latest.args
create mode 100644 tests/qemuxmlconfdata/aarch64-virt-minimal.aarch64-latest.xml
create mode 100644 tests/qemuxmlconfdata/aarch64-virt-minimal.xml
delete mode 100644 tests/qemuxmlconfdata/minimal-no-memory.xml
delete mode 100644 tests/qemuxmlconfdata/minimal.x86_64-latest.args
delete mode 100644 tests/qemuxmlconfdata/minimal.xml
rename tests/qemuxmlconfdata/{minimal-no-memory.x86_64-latest.err => no-memory.x86_64-latest.err} (100%)
create mode 100644 tests/qemuxmlconfdata/no-memory.xml
create mode 100644 tests/qemuxmlconfdata/ppc64-pseries-default-models.ppc64-latest.args
create mode 100644 tests/qemuxmlconfdata/ppc64-pseries-default-models.ppc64-latest.xml
create mode 100644 tests/qemuxmlconfdata/ppc64-pseries-default-models.xml
create mode 100644 tests/qemuxmlconfdata/ppc64-pseries-minimal.ppc64-latest.args
create mode 100644 tests/qemuxmlconfdata/ppc64-pseries-minimal.ppc64-latest.xml
create mode 100644 tests/qemuxmlconfdata/ppc64-pseries-minimal.xml
create mode 100644 tests/qemuxmlconfdata/riscv64-virt-default-models.riscv64-latest.args
create mode 100644 tests/qemuxmlconfdata/riscv64-virt-default-models.riscv64-latest.xml
create mode 100644 tests/qemuxmlconfdata/riscv64-virt-default-models.xml
create mode 100644 tests/qemuxmlconfdata/riscv64-virt-minimal.riscv64-latest.args
create mode 100644 tests/qemuxmlconfdata/riscv64-virt-minimal.riscv64-latest.xml
create mode 100644 tests/qemuxmlconfdata/riscv64-virt-minimal.xml
create mode 100644 tests/qemuxmlconfdata/s390x-ccw-default-models.s390x-latest.args
create mode 100644 tests/qemuxmlconfdata/s390x-ccw-default-models.s390x-latest.xml
create mode 100644 tests/qemuxmlconfdata/s390x-ccw-default-models.xml
create mode 100644 tests/qemuxmlconfdata/s390x-ccw-minimal.s390x-latest.args
create mode 100644 tests/qemuxmlconfdata/s390x-ccw-minimal.s390x-latest.xml
create mode 100644 tests/qemuxmlconfdata/s390x-ccw-minimal.xml
create mode 100644 tests/qemuxmlconfdata/title-and-description.x86_64-latest.args
copy tests/qemuxmlconfdata/{440fx-wrong-root.xml => title-and-description.x86_64-latest.xml} (58%)
create mode 100644 tests/qemuxmlconfdata/title-and-description.xml
create mode 100644 tests/qemuxmlconfdata/usb-controller-automatic-unavailable-q35.x86_64-latest.args
create mode 100644 tests/qemuxmlconfdata/usb-controller-automatic-unavailable-q35.x86_64-latest.xml
create mode 100644 tests/qemuxmlconfdata/usb-controller-automatic-unavailable-q35.xml
create mode 100644 tests/qemuxmlconfdata/x86_64-pc-default-models.x86_64-latest.args
create mode 100644 tests/qemuxmlconfdata/x86_64-pc-default-models.x86_64-latest.xml
create mode 100644 tests/qemuxmlconfdata/x86_64-pc-default-models.xml
create mode 100644 tests/qemuxmlconfdata/x86_64-pc-minimal.x86_64-latest.args
rename tests/qemuxmlconfdata/{minimal.x86_64-latest.xml => x86_64-pc-minimal.x86_64-latest.xml} (52%)
create mode 100644 tests/qemuxmlconfdata/x86_64-pc-minimal.xml
create mode 100644 tests/qemuxmlconfdata/x86_64-q35-default-models.x86_64-latest.args
create mode 100644 tests/qemuxmlconfdata/x86_64-q35-default-models.x86_64-latest.xml
create mode 100644 tests/qemuxmlconfdata/x86_64-q35-default-models.xml
create mode 100644 tests/qemuxmlconfdata/x86_64-q35-minimal.x86_64-latest.args
create mode 100644 tests/qemuxmlconfdata/x86_64-q35-minimal.x86_64-latest.xml
create mode 100644 tests/qemuxmlconfdata/x86_64-q35-minimal.xml
[PATCH 00/33] qemu: Improve handling of architecture-specific defaults
Posted by Andrea Bolognani 1 month ago
This is a significantly expanded upon follow up to [1], and
specifically the last 5 patches in that series.

While looking at implementing the improvements suggested by Peter, I
realized that there were many additional areas in which our handling
of defaults was suboptimal, with the relevant code scattered all over
the place and sometimes duplicated. So I set out to rationalize
things.

I ended up changing very little in terms of observable behavior
outside of RISC-V, where I feel that we still have leeway to make
things right before it reaches significant adoption and backwards
compatibility becomes a major concern.

[1] https://lists.libvirt.org/archives/list/devel@lists.libvirt.org/thread/MREXSFFSTO3X35NOOUD4TH224JZYMZ2I/

Andrea Bolognani (33):
  tests: Add usb-controller-automatic-unavailable-q35
  tests: Add aarch64-panic-no-model
  tests: Add title-and-description
  tests: Drop existing <title> and <description> tags
  tests: Rename and minimize no-memory
  tests: Add minimal cases for many architectures
  tests: Drop minimal
  tests: Add default-models cases for many architectures
  qemu: Fix a few comments
  qemu: Default to no USB and no memballoon for new architectures
  qemu: Clean up qemuDomainDefaultNetModel()
  qemu: Drop qemuDomainFindSCSIControllerModel()
  qemu: Drop qemuDomainSetSCSIControllerModel()
  qemu: Add missing error handling
  qemu: Simplify qemuDomainFindOrCreateSCSIDiskController()
  qemu: Move qemuDomainGetSCSIControllerModel()
  qemu: Rename qemuDomainDefaultSCSIControllerModel()
  qemu: Clean up qemuDomainDefaultSCSIControllerModel()
  qemu: Add qemuDomainDefaultUSBControllerModel()
  qemu: Enhance qemuDomainDefaultUSBControllerModel()
  qemu: Clean up qemuDomainDefaultUSBControllerModel()
  qemu: Move qemuDomainForbidLegacyUSBController()
  qemu: Enhance qemuDomainForbidLegacyUSBController()
  qemu: Add qemuDomainDefaultSerialType()
  qemu: Add qemuDomainDefaultSerialModel()
  qemu: Add qemuDomainDefaultPanicModel()
  qemu: Use qemuDomainDefaultPanicModel() more
  qemu: Rename qemuDomainDefaultVideoModel()
  qemu: Move qemuDomainDefault*() functions together
  qemu: Only default to <panic model='isa'/> on x86
  qemu: Don't add memballoon by default on RISC-V
  qemu: Use qemu-xhci by default on RISC-V
  qemu: Use virtio-scsi by default on RISC-V

 src/qemu/qemu_alias.c                         |  13 +-
 src/qemu/qemu_command.c                       |  23 +-
 src/qemu/qemu_domain.c                        | 588 ++++++++++++------
 src/qemu/qemu_domain.h                        |   4 +
 src/qemu/qemu_domain_address.c                |  87 ---
 src/qemu/qemu_domain_address.h                |  11 -
 src/qemu/qemu_hotplug.c                       |  13 +-
 src/qemu/qemu_validate.c                      |   9 +-
 tests/qemuxmlconfdata/440fx-wrong-root.xml    |   5 -
 .../aarch64-panic-no-model.aarch64-latest.err |   1 +
 .../aarch64-panic-no-model.xml                |  13 +
 ...64-virt-default-models.aarch64-latest.args |  44 ++
 ...h64-virt-default-models.aarch64-latest.xml |  79 +++
 .../aarch64-virt-default-models.xml           |  21 +
 .../aarch64-virt-minimal.aarch64-latest.args  |  31 +
 .../aarch64-virt-minimal.aarch64-latest.xml   |  26 +
 .../qemuxmlconfdata/aarch64-virt-minimal.xml  |  12 +
 .../cpu-host-model-features.x86_64-latest.xml |   5 -
 .../cpu-host-model-features.xml               |   5 -
 ...ost-passthrough-features.x86_64-latest.xml |   5 -
 .../cpu-host-passthrough-features.xml         |   5 -
 .../cpu-tsc-frequency.x86_64-latest.xml       |   5 -
 tests/qemuxmlconfdata/cpu-tsc-frequency.xml   |   5 -
 .../disk-cdrom-bus-other.x86_64-latest.xml    |   1 -
 .../qemuxmlconfdata/disk-cdrom-bus-other.xml  |   1 -
 tests/qemuxmlconfdata/minimal-no-memory.xml   |  25 -
 .../minimal.x86_64-latest.args                |  36 --
 tests/qemuxmlconfdata/minimal.xml             |  34 -
 tests/qemuxmlconfdata/missing-machine.xml     |   1 -
 ...latest.err => no-memory.x86_64-latest.err} |   0
 tests/qemuxmlconfdata/no-memory.xml           |  11 +
 ...4-pseries-default-models.ppc64-latest.args |  38 ++
 ...64-pseries-default-models.ppc64-latest.xml |  53 ++
 .../ppc64-pseries-default-models.xml          |  21 +
 .../ppc64-pseries-minimal.ppc64-latest.args   |  33 +
 .../ppc64-pseries-minimal.ppc64-latest.xml    |  33 +
 .../qemuxmlconfdata/ppc64-pseries-minimal.xml |  12 +
 ...64-virt-default-models.riscv64-latest.args |  42 ++
 ...v64-virt-default-models.riscv64-latest.xml |  69 ++
 .../riscv64-virt-default-models.xml           |  21 +
 .../riscv64-virt-minimal.riscv64-latest.args  |  30 +
 .../riscv64-virt-minimal.riscv64-latest.xml   |  20 +
 .../qemuxmlconfdata/riscv64-virt-minimal.xml  |  12 +
 ...s390x-ccw-default-models.s390x-latest.args |  37 ++
 .../s390x-ccw-default-models.s390x-latest.xml |  46 ++
 .../s390x-ccw-default-models.xml              |  21 +
 .../s390x-ccw-minimal.s390x-latest.args       |  32 +
 .../s390x-ccw-minimal.s390x-latest.xml        |  27 +
 tests/qemuxmlconfdata/s390x-ccw-minimal.xml   |  12 +
 .../title-and-description.x86_64-latest.args  |  31 +
 ...> title-and-description.x86_64-latest.xml} |  20 +-
 .../qemuxmlconfdata/title-and-description.xml |  19 +
 ...tomatic-unavailable-q35.x86_64-latest.args |  33 +
 ...utomatic-unavailable-q35.x86_64-latest.xml |  30 +
 ...b-controller-automatic-unavailable-q35.xml |  20 +
 ...86_64-pc-default-models.x86_64-latest.args |  39 ++
 ...x86_64-pc-default-models.x86_64-latest.xml |  50 ++
 .../x86_64-pc-default-models.xml              |  21 +
 .../x86_64-pc-minimal.x86_64-latest.args      |  33 +
 ...ml => x86_64-pc-minimal.x86_64-latest.xml} |  24 +-
 tests/qemuxmlconfdata/x86_64-pc-minimal.xml   |  12 +
 ...6_64-q35-default-models.x86_64-latest.args |  44 ++
 ...86_64-q35-default-models.x86_64-latest.xml |  68 ++
 .../x86_64-q35-default-models.xml             |  21 +
 .../x86_64-q35-minimal.x86_64-latest.args     |  38 ++
 .../x86_64-q35-minimal.x86_64-latest.xml      |  50 ++
 tests/qemuxmlconfdata/x86_64-q35-minimal.xml  |  12 +
 tests/qemuxmlconftest.c                       |  28 +-
 68 files changed, 1783 insertions(+), 488 deletions(-)
 create mode 100644 tests/qemuxmlconfdata/aarch64-panic-no-model.aarch64-latest.err
 create mode 100644 tests/qemuxmlconfdata/aarch64-panic-no-model.xml
 create mode 100644 tests/qemuxmlconfdata/aarch64-virt-default-models.aarch64-latest.args
 create mode 100644 tests/qemuxmlconfdata/aarch64-virt-default-models.aarch64-latest.xml
 create mode 100644 tests/qemuxmlconfdata/aarch64-virt-default-models.xml
 create mode 100644 tests/qemuxmlconfdata/aarch64-virt-minimal.aarch64-latest.args
 create mode 100644 tests/qemuxmlconfdata/aarch64-virt-minimal.aarch64-latest.xml
 create mode 100644 tests/qemuxmlconfdata/aarch64-virt-minimal.xml
 delete mode 100644 tests/qemuxmlconfdata/minimal-no-memory.xml
 delete mode 100644 tests/qemuxmlconfdata/minimal.x86_64-latest.args
 delete mode 100644 tests/qemuxmlconfdata/minimal.xml
 rename tests/qemuxmlconfdata/{minimal-no-memory.x86_64-latest.err => no-memory.x86_64-latest.err} (100%)
 create mode 100644 tests/qemuxmlconfdata/no-memory.xml
 create mode 100644 tests/qemuxmlconfdata/ppc64-pseries-default-models.ppc64-latest.args
 create mode 100644 tests/qemuxmlconfdata/ppc64-pseries-default-models.ppc64-latest.xml
 create mode 100644 tests/qemuxmlconfdata/ppc64-pseries-default-models.xml
 create mode 100644 tests/qemuxmlconfdata/ppc64-pseries-minimal.ppc64-latest.args
 create mode 100644 tests/qemuxmlconfdata/ppc64-pseries-minimal.ppc64-latest.xml
 create mode 100644 tests/qemuxmlconfdata/ppc64-pseries-minimal.xml
 create mode 100644 tests/qemuxmlconfdata/riscv64-virt-default-models.riscv64-latest.args
 create mode 100644 tests/qemuxmlconfdata/riscv64-virt-default-models.riscv64-latest.xml
 create mode 100644 tests/qemuxmlconfdata/riscv64-virt-default-models.xml
 create mode 100644 tests/qemuxmlconfdata/riscv64-virt-minimal.riscv64-latest.args
 create mode 100644 tests/qemuxmlconfdata/riscv64-virt-minimal.riscv64-latest.xml
 create mode 100644 tests/qemuxmlconfdata/riscv64-virt-minimal.xml
 create mode 100644 tests/qemuxmlconfdata/s390x-ccw-default-models.s390x-latest.args
 create mode 100644 tests/qemuxmlconfdata/s390x-ccw-default-models.s390x-latest.xml
 create mode 100644 tests/qemuxmlconfdata/s390x-ccw-default-models.xml
 create mode 100644 tests/qemuxmlconfdata/s390x-ccw-minimal.s390x-latest.args
 create mode 100644 tests/qemuxmlconfdata/s390x-ccw-minimal.s390x-latest.xml
 create mode 100644 tests/qemuxmlconfdata/s390x-ccw-minimal.xml
 create mode 100644 tests/qemuxmlconfdata/title-and-description.x86_64-latest.args
 copy tests/qemuxmlconfdata/{440fx-wrong-root.xml => title-and-description.x86_64-latest.xml} (58%)
 create mode 100644 tests/qemuxmlconfdata/title-and-description.xml
 create mode 100644 tests/qemuxmlconfdata/usb-controller-automatic-unavailable-q35.x86_64-latest.args
 create mode 100644 tests/qemuxmlconfdata/usb-controller-automatic-unavailable-q35.x86_64-latest.xml
 create mode 100644 tests/qemuxmlconfdata/usb-controller-automatic-unavailable-q35.xml
 create mode 100644 tests/qemuxmlconfdata/x86_64-pc-default-models.x86_64-latest.args
 create mode 100644 tests/qemuxmlconfdata/x86_64-pc-default-models.x86_64-latest.xml
 create mode 100644 tests/qemuxmlconfdata/x86_64-pc-default-models.xml
 create mode 100644 tests/qemuxmlconfdata/x86_64-pc-minimal.x86_64-latest.args
 rename tests/qemuxmlconfdata/{minimal.x86_64-latest.xml => x86_64-pc-minimal.x86_64-latest.xml} (52%)
 create mode 100644 tests/qemuxmlconfdata/x86_64-pc-minimal.xml
 create mode 100644 tests/qemuxmlconfdata/x86_64-q35-default-models.x86_64-latest.args
 create mode 100644 tests/qemuxmlconfdata/x86_64-q35-default-models.x86_64-latest.xml
 create mode 100644 tests/qemuxmlconfdata/x86_64-q35-default-models.xml
 create mode 100644 tests/qemuxmlconfdata/x86_64-q35-minimal.x86_64-latest.args
 create mode 100644 tests/qemuxmlconfdata/x86_64-q35-minimal.x86_64-latest.xml
 create mode 100644 tests/qemuxmlconfdata/x86_64-q35-minimal.xml

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