[pve-devel] [PATCH 0/7] Add basics for custom CPU models

Stefan Reiter s.reiter at proxmox.com
Mon Sep 2 16:27:52 CEST 2019


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).

I intentionally wanted to send this series before starting any GUI or new API
work, to get some feedback if this approach works better than the cluster-cpu
one.

[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
    basemodel kvm64


qemu: Stefan Reiter (1):
  Trigger pve-api-updates on update

 debian/triggers | 1 +
 1 file changed, 1 insertion(+)
 create mode 100644 debian/triggers

manager: Stefan Reiter (1):
  Broadcast supported CPU flags

 PVE/Service/pvestatd.pm | 28 ++++++++++++++++++++++++++--
 1 file changed, 26 insertions(+), 2 deletions(-)

qemu-server: Stefan Reiter (5):
  Add QEMU CPU flag querying helpers
  Add CustomCPUConfig for storing/parsing custom CPU models
  Support custom CPU types in get_cpu_options
  Handle CPU flags defined in custom CPU type
  Allow custom CPU types in API

 PVE/QemuServer.pm                 | 173 +++++++++++++++++++++++++++++-
 PVE/QemuServer/CustomCPUConfig.pm | 129 ++++++++++++++++++++++
 PVE/QemuServer/Makefile           |   1 +
 3 files changed, 299 insertions(+), 4 deletions(-)
 create mode 100644 PVE/QemuServer/CustomCPUConfig.pm

-- 
2.20.1




More information about the pve-devel mailing list