From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 38E061FF13A for ; Wed, 01 Apr 2026 10:00:44 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id D5D8111BEA; Wed, 1 Apr 2026 10:00:39 +0200 (CEST) From: Arthur Bied-Charreton 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 Message-ID: <20260401080028.62513-1-a.bied-charreton@proxmox.com> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL -0.272 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment KAM_LAZY_DOMAIN_SECURITY 1 Sending domain does not have any anti-forgery methods POISEN_SPAM_PILL 0.1 Meta: its spam POISEN_SPAM_PILL_1 0.1 random spam to be learned in bayes POISEN_SPAM_PILL_3 0.1 random spam to be learned in bayes RDNS_NONE 0.793 Delivered to internal network by a host with no rDNS SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_NONE 0.001 SPF: sender does not publish an SPF Record Message-ID-Hash: K557V4A7LPJBCCLPOP5YW4DOIVSNDXFG X-Message-ID-Hash: K557V4A7LPJBCCLPOP5YW4DOIVSNDXFG X-MailFrom: abied-charreton@jett.proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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