all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Arthur Bied-Charreton <a.bied-charreton@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH docs/manager/qemu-server v2 00/17] Add API and UI for custom CPU models
Date: Wed,  1 Apr 2026 10:00:11 +0200	[thread overview]
Message-ID: <20260401080028.62513-1-a.bied-charreton@proxmox.com> (raw)

This picks up and extends an old series [0] by Stefan Reiter.

This series adds a full CRUD API and a UI editor for custom CPU models
which allows users to manage them in the Datacenter interface rather
than editing /etc/pve/virtual-guest/cpu-models.conf manually.

It also improves on the existing VM CPU flags selector by providing a list
of nodes supporting each flag to help gauge cluster compatibility.

The changes touch three repositories:

- pve-docs adds an anchor so the UI can link directly to the "CPU Type"
  documentation

- qemu-server gets a new CPUFlags module grouping cpu-flags-related
  helpers, and introduces query_available_cpu_flags, which derives the
  set of flags accepted by QEMU as -cpu arguments and annotates each with
  the cluster nodes that report supporting it. The existing node-level
  cpu-flags endpoint is extended with an accel parameter (kvm/tcg, default
  kvm). Its default behavior is preserved modulo the added 'supported-on'
  field per flag.

- pve-manager gets two new cluster-level endpoints:
  1. /cluster/qemu/cpu-flags queries flags available across the cluster,
    and reports which node supports each flag
  2. /cluster/qemu/custom-cpu-models provides full CRUD for custom CPU
    model definitions
  The UI adds a "Custom CPU models" view in the Datacenter panel with an
  editor for model properties. The acceleration type can be chosen by the
  user to filter flags when creating a new VM/custom model, and it is pre-
  selected based on the VM's KVM config key when editing a VM's processor.
  The VM CPU flags selector is improved with an option to filter out flags
  that are not usable anywhere on the cluster.

Dependencies:
 pve-manager requires bumped pve-docs
 pve-manager requires bumped qemu-server

Changes since v1:
 - Reorder patches according to dependency directions

 qemu-server:
  - Rebase
  - Add preparatory commit renaming $default_filename to
    $cpu_models_filename
  - Squash helpers into commits with their first users
  - Drop unrelated formatting change
  - Move cluster-wide cpu-flags to pve-manager, related changes in
    pve-manager changelog, keep vm-specific cpu-flags endpoint
  - Return all flags from cpu-flags endpoint, not only the ones with at least one
   node supporting them - allow filtering for that in the UI
  - Return only VM-specific cpu-flags by default in node-specific endpoint
  - Add acceleration type filter to cpu-flags endpoint, defaulting to kvm
  - Document why no flags are currently returned for aarch64
  - Only add nested-virt to flags for hosts that support one of svm/vmx
  - Rename extract_flags to query_available_cpu_flags
  - Remove web references from doc comments
  - Refactor query_available_cpu_flags to a more imperative style
  - Move custom CPU models CRUD endpoints to pve-manager, related changes
    in pve-manager changelog
  - Introduce QemuServer::CPUFlags module grouping flags-related helpers
  - Add flag_is_aliased helper to identify flags covered by nested-virt

 pve-manager:
  - Rebase
  - Drop unneeded dirty state fix from original series
  - Update unknown flags behavior to
    1. Show unknown flags at the top of the list in the UI
    2. Add a description to unknown flags signaling that the flag is not
    recognized in the cluster/for the currently selected acceleration type
  - Rename allowCustom CPU model selector config field to showCustomModels
  - Change "Reported Model" to "Base Model" in the UI
  - Link directly to "CPU Type" section in onlineHelp refs
  - Improve message in remove confirm dialog for custom CPU models
  - Move "Custom CPU Models" further down in Datacenter menu, and group it
    with "{Directory,Resource} Mappings" under "Guest Resources/Hardware"
  - Pre-select acceleration type in VM-specific CPU flags edit/creation
    window based on the currently configured acceleration of the VM
  - Remove hardcoded list of VM-specific flags in frontend
  - Change 'Set' to 'Value' in VMCpuFlagSelector
  - Use "" instead of `` for user-facing strings
  - Add search bar for long lists of CPU flags
  - Return all flags from the backend, not only the ones with at least one
    node supporting them - allow filtering for that in the UI
  - Show svm/vmx in cpu-flags list regardless of overlap with nested-virt
  - Add endpoint for querying CPU flags cluster-wide
  (`/cluster/qemu/cpu-flags`)
  - Document missing supported flags for `aarch64`
  - Add CRUD endpoint for custom CPU models
  (`/cluster/qemu/custom-cpu-models`)

 pve-docs:
  - Add qm_cpu_type anchor to CPU Type section in qm.adoc

[0] https://lore.proxmox.com/pve-devel/20211028114150.3245864-1-s.reiter@proxmox.com/


pve-docs:

Arthur Bied-Charreton (1):
  qm: Add anchor to "CPU Type" section

 qm.adoc | 1 +
 1 file changed, 1 insertion(+)


qemu-server:

Arthur Bied-Charreton (7):
  cpu config: Rename CPU models config path variable
  cpu flags: Create CPUFlags module
  cpu flags: Add query_available_cpu_flags helper
  cpu config: Add helpers to lock and write config
  cpu: Register standard option for CPU format
  cpu config: Set 'type' field before writing
  cpu flags: Improve flags list returned by endpoint

 src/PVE/API2/Qemu/CPUFlags.pm   |  27 +++-
 src/PVE/QemuServer.pm           |  24 +---
 src/PVE/QemuServer/CPUConfig.pm | 110 +++------------
 src/PVE/QemuServer/CPUFlags.pm  | 230 ++++++++++++++++++++++++++++++++
 src/PVE/QemuServer/Makefile     |   1 +
 5 files changed, 280 insertions(+), 112 deletions(-)
 create mode 100644 src/PVE/QemuServer/CPUFlags.pm


pve-manager:

Arthur Bied-Charreton (9):
  api: Add endpoint querying available CPU flags cluster-wide
  api: Add CRUD handlers for custom CPU models
  ui: CPUModelSelector: Allow filtering out custom models
  ui: Add basic custom CPU model editor
  ui: VMCPUFlagSelector: Add CPU flag editor for custom models
  ui: VMCPUFlagSelector: Fix buffered rendering error
  ui: VMCPUFlagSelector: Allow filtering out flags supported on 0 nodes
  ui: VMCPUFlagSelector: Add search bar for large lists of flags
  RFC: ui: Group custom CPU with resource mappings

 PVE/API2/Cluster.pm                      |   7 +
 PVE/API2/Cluster/Makefile                |   4 +-
 PVE/API2/Cluster/Qemu.pm                 |  47 ++++
 PVE/API2/Cluster/Qemu/CPUFlags.pm        |  68 ++++++
 PVE/API2/Cluster/Qemu/CustomCPUModels.pm | 211 ++++++++++++++++
 PVE/API2/Cluster/Qemu/Makefile           |  18 ++
 www/css/ext6-pve.css                     |   4 +
 www/manager6/Makefile                    |   3 +
 www/manager6/dc/CPUTypeEdit.js           | 103 ++++++++
 www/manager6/dc/CPUTypeView.js           | 149 ++++++++++++
 www/manager6/dc/Config.js                |  27 +++
 www/manager6/form/CPUModelSelector.js    |  12 +-
 www/manager6/form/PhysBitsSelector.js    | 153 ++++++++++++
 www/manager6/form/VMCPUFlagSelector.js   | 297 ++++++++++++++++++++---
 www/manager6/qemu/ProcessorEdit.js       |   6 +
 15 files changed, 1080 insertions(+), 29 deletions(-)
 create mode 100644 PVE/API2/Cluster/Qemu.pm
 create mode 100644 PVE/API2/Cluster/Qemu/CPUFlags.pm
 create mode 100644 PVE/API2/Cluster/Qemu/CustomCPUModels.pm
 create mode 100644 PVE/API2/Cluster/Qemu/Makefile
 create mode 100644 www/manager6/dc/CPUTypeEdit.js
 create mode 100644 www/manager6/dc/CPUTypeView.js
 create mode 100644 www/manager6/form/PhysBitsSelector.js


Summary over all repositories:
  21 files changed, 1361 insertions(+), 141 deletions(-)

-- 
Generated by murpp 0.10.0



             reply	other threads:[~2026-04-01  8:00 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-01  8:00 Arthur Bied-Charreton [this message]
2026-04-01  8:00 ` [PATCH pve-docs v2 01/17] qm: Add anchor to "CPU Type" section Arthur Bied-Charreton
2026-04-01  8:00 ` [PATCH qemu-server v2 02/17] cpu config: Rename CPU models config path variable Arthur Bied-Charreton
2026-04-01  8:00 ` [PATCH qemu-server v2 03/17] cpu flags: Create CPUFlags module Arthur Bied-Charreton
2026-04-01  8:00 ` [PATCH qemu-server v2 04/17] cpu flags: Add query_available_cpu_flags helper Arthur Bied-Charreton
2026-04-01  8:00 ` [PATCH qemu-server v2 05/17] cpu config: Add helpers to lock and write config Arthur Bied-Charreton
2026-04-01  8:00 ` [PATCH qemu-server v2 06/17] cpu: Register standard option for CPU format Arthur Bied-Charreton
2026-04-01  8:00 ` [PATCH qemu-server v2 07/17] cpu config: Set 'type' field before writing Arthur Bied-Charreton
2026-04-01  8:00 ` [PATCH qemu-server v2 08/17] cpu flags: Improve flags list returned by endpoint Arthur Bied-Charreton
2026-04-01  8:00 ` [PATCH pve-manager v2 09/17] api: Add endpoint querying available CPU flags cluster-wide Arthur Bied-Charreton
2026-04-01  8:00 ` [PATCH pve-manager v2 10/17] api: Add CRUD handlers for custom CPU models Arthur Bied-Charreton
2026-04-01  8:00 ` [PATCH pve-manager v2 11/17] ui: CPUModelSelector: Allow filtering out custom models Arthur Bied-Charreton
2026-04-01  8:00 ` [PATCH pve-manager v2 12/17] ui: Add basic custom CPU model editor Arthur Bied-Charreton
2026-04-01  8:00 ` [PATCH pve-manager v2 13/17] ui: VMCPUFlagSelector: Add CPU flag editor for custom models Arthur Bied-Charreton
2026-04-01  8:00 ` [PATCH pve-manager v2 14/17] ui: VMCPUFlagSelector: Fix buffered rendering error Arthur Bied-Charreton
2026-04-01  8:00 ` [PATCH pve-manager v2 15/17] ui: VMCPUFlagSelector: Allow filtering out flags supported on 0 nodes Arthur Bied-Charreton
2026-04-01  8:00 ` [PATCH pve-manager v2 16/17] ui: VMCPUFlagSelector: Add search bar for large lists of flags Arthur Bied-Charreton
2026-04-01  8:00 ` [PATCH pve-manager v2 17/17] RFC: ui: Group custom CPU with resource mappings Arthur Bied-Charreton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260401080028.62513-1-a.bied-charreton@proxmox.com \
    --to=a.bied-charreton@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal