[pve-devel] [PATCH v9 0/6] Add basics for custom CPU models
Stefan Reiter
s.reiter at proxmox.com
Thu Mar 26 16:13:27 CET 2020
Based on the RFC and following on- and off-list discussion about custom CPU
models [0].
In essence, this revised patch allows a user to specify custom CPU models in
/etc/pve/cpu-models.conf (section-config style [1]), where VMs using that CPU
model inherit details from the definition. This removes any fragile
"auto-magical" CPU flag detection, while still giving the user a way to create
VMs with the best possible subset of CPU features maintaining live-migration
compatibility.
Includes the infrastructure for broadcasting supported CPU flags for each
cluster-node via the key-value store - this is not necessary for the
custom-cpu feature in particular, but I think could prove useful for
implementing the GUI part (e.g. show the user which flags are supported on which
nodes).
v8 -> v9:
* rebase remaining patches on master
v7 -> v8:
* rebase on master, fix tests now using +pve0
* fixed nits noted by Thomas
* moved live-migration/snapshot patches forward to avoid temporary breakage
* fix CPU hotplug with custom CPUs
* guard mkdir with check_cfs_is_mounted and also run before write
* fix rebase-error in cfg2cmd tests (getaddrinfo_all)
* dropped applied patches
< see [2] for older history >
[0]: https://pve.proxmox.com/pipermail/pve-devel/2019-July/038268.html
[1]: e.g.:
cpu-model: custom-cpu-name
host-phys-bits 1
flags +aes;+avx;+avx2
reported-model kvm64
[2] https://pve.proxmox.com/pipermail/pve-devel/2020-January/041278.html
qemu-server: Stefan Reiter (6):
Include "-cpu" parameter with live-migration
Include "-cpu" parameter with snapshots/suspend
Add helpers to better structure CPU option handling
Rework get_cpu_options and allow custom CPU models
fix #2318: allow phys-bits and host-phys-bits CPU settings
cfg2cmd: add test cases for custom CPU models
PVE/API2/Qemu.pm | 9 +-
PVE/QemuConfig.pm | 34 ++-
PVE/QemuMigrate.pm | 21 ++
PVE/QemuServer.pm | 41 ++-
PVE/QemuServer/CPUConfig.pm | 281 ++++++++++++++----
test/cfg2cmd/custom-cpu-model-defaults.conf | 8 +
.../custom-cpu-model-defaults.conf.cmd | 24 ++
test/cfg2cmd/custom-cpu-model.conf | 8 +
test/cfg2cmd/custom-cpu-model.conf.cmd | 27 ++
test/cfg2cmd/i440fx-win10-hostpci.conf.cmd | 2 +-
test/cfg2cmd/minimal-defaults.conf.cmd | 2 +-
test/cfg2cmd/pinned-version.conf.cmd | 2 +-
.../q35-linux-hostpci-multifunction.conf.cmd | 2 +-
test/cfg2cmd/q35-linux-hostpci.conf.cmd | 2 +-
test/cfg2cmd/q35-win10-hostpci.conf.cmd | 2 +-
test/cfg2cmd/simple1.conf.cmd | 2 +-
test/cfg2cmd/spice-enhancments.conf.cmd | 2 +-
test/cfg2cmd/spice-linux-4.1.conf.cmd | 2 +-
test/cfg2cmd/spice-usb3.conf.cmd | 2 +-
test/cfg2cmd/spice-win.conf.cmd | 2 +-
test/run_config2command_tests.pl | 23 ++
21 files changed, 416 insertions(+), 82 deletions(-)
create mode 100644 test/cfg2cmd/custom-cpu-model-defaults.conf
create mode 100644 test/cfg2cmd/custom-cpu-model-defaults.conf.cmd
create mode 100644 test/cfg2cmd/custom-cpu-model.conf
create mode 100644 test/cfg2cmd/custom-cpu-model.conf.cmd
--
2.26.0
More information about the pve-devel
mailing list