all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Arthur Bied-Charreton <a.bied-charreton@proxmox.com>
To: "Max R. Carrara" <m.carrara@proxmox.com>
Cc: pve-devel@lists.proxmox.com
Subject: Re: [PATCH docs/manager/qemu-server v5 00/21] Add API and UI for custom CPU models
Date: Mon, 18 May 2026 07:51:25 +0200	[thread overview]
Message-ID: <uanhrp2eefdvq7rq5cud5xdcwtxqxtcpfy73urcfe72vpkzsef@l5skmg6jxvip> (raw)
In-Reply-To: <DIJEX1VJMQN1.1SXF3VBWVCF41@proxmox.com>

On Fri, May 15, 2026 at 07:05:26PM +0200, Max R. Carrara wrote:
> On Fri May 15, 2026 at 11:28 AM CEST, Arthur Bied-Charreton wrote:
> > 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.
> >
> > [...]
> 
> Did some preliminary testing and tried to configure a custom CPU based
> on the 'x86-64-v4' model. Unfortunately it seems like that model isn't
> included in the schema:
> 
> ```
> Parameter verification failed. (400)
> 
> reported-model: value 'x86-64-v4' does not have a value in the
> enumeration '486, a64fx, athlon, Broadwell, Broadwell-IBRS,
> Broadwell-noTSX, Broadwell-noTSX-IBRS, Cascadelake-Server,
> Cascadelake-Server-noTSX, Cascadelake-Server-v2, Cascadelake-Server-v4,
> Cascadelake-Server-v5, ClearwaterForest, Conroe, Cooperlake,
> Cooperlake-v2, core2duo, coreduo, cortex-a35, cortex-a53, cortex-a55,
> cortex-a57, cortex-a710, cortex-a72, cortex-a76, EPYC, EPYC-Genoa,
> EPYC-Genoa-v2, EPYC-IBPB, EPYC-Milan, EPYC-Milan-v2, EPYC-Milan-v3,
> EPYC-Rome, EPYC-Rome-v2, EPYC-Rome-v3, EPYC-Rome-v4, EPYC-Rome-v5,
> EPYC-Turin, EPYC-v3, EPYC-v4, EPYC-v5, GraniteRapids, GraniteRapids-v2,
> GraniteRapids-v3, Haswell, Haswell-IBRS, Haswell-noTSX,
> Haswell-noTSX-IBRS, host, Icelake-Client, Icelake-Client-noTSX,
> Icelake-Server, Icelake-Server-noTSX, Icelake-Server-v3,
> Icelake-Server-v4, Icelake-Server-v5, Icelake-Server-v6,
> Icelake-Server-v7, IvyBridge, IvyBridge-IBRS, KnightsMill, kvm32, kvm64,
> max, Nehalem, Nehalem-IBRS, neoverse-n1, neoverse-n2, neoverse-v1,
> Opteron_G1, Opteron_G2, Opteron_G3, Opteron_G4, Opteron_G5, Penryn,
> pentium, pentium2, pentium3, phenom, qemu32, qemu64, SandyBridge,
> SandyBridge-IBRS, SapphireRapids, SapphireRapids-v2, SapphireRapids-v3,
> SapphireRapids-v4, SierraForest, SierraForest-v2, SierraForest-v3,
> Skylake-Client, Skylake-Client-IBRS, Skylake-Client-noTSX-IBRS,
> Skylake-Client-v4, Skylake-Server, Skylake-Server-IBRS,
> Skylake-Server-noTSX-IBRS, Skylake-Server-v4, Skylake-Server-v5,
> Westmere, Westmere-IBRS'
> ```
> 
> Choosing a different CPU type made it work.
> 
> To test whether the flags are actually passed on to the VM, I gave my
> custom model the 'nested-virt' flag and checked whether it appears after
> restarting the VM using `lscpu | grep -E '(svm|vmx)'`.
> 
> Indeed it does appear; when setting the CPU model back to
> 'x86-64-v2-AES' again, the flag disappears once rebooted.
> 
> So, the series seems to work; just that there's a schema issue.
> 
> Pretty neat overall!
Thanks for testing :)

The issue is that $cpu_fmt [0], which is used as the schema for the custom
models endpoints, defines valid reported models using
get_all_cpu_models() [1], while the /nodes/.../capabilities/qemu/cpu
endpoint uses get_cpu_models() [2]. 

The former includes only CPU types QEMU will accept as reported models
(see `qemu-system-x86_64 -cpu help`), while the latter also includes
some PVE-builtin models [3] - those cannot be used as reported models 
(QEMU does not know about them) and are rightfully excluded of 
$cpu_fmt, however then they should definitely also not be shown in the
reported model dropdown, so thanks for catching that!

[0]
https://git.proxmox.com/?p=qemu-server.git;a=blob;f=src/PVE/QemuServer/CPUConfig.pm;h=8bc5f895998a26b78dfa826e7b27b812839f6e0b;hb=refs/heads/master#l350
[1]
https://git.proxmox.com/?p=qemu-server.git;a=blob;f=src/PVE/QemuServer/CPUConfig.pm;h=8bc5f895998a26b78dfa826e7b27b812839f6e0b;hb=refs/heads/master#l259
[2]
https://git.proxmox.com/?p=qemu-server.git;a=blob;f=src/PVE/QemuServer/CPUConfig.pm;h=8bc5f895998a26b78dfa826e7b27b812839f6e0b;hb=refs/heads/master#l622
[3]
https://git.proxmox.com/?p=qemu-server.git;a=blob;f=src/PVE/QemuServer/CPUConfig.pm;h=8bc5f895998a26b78dfa826e7b27b812839f6e0b;hb=refs/heads/master#l53




  reply	other threads:[~2026-05-18  5:52 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-15  9:28 [PATCH docs/manager/qemu-server v5 00/21] Add API and UI for custom CPU models Arthur Bied-Charreton
2026-05-15  9:28 ` [PATCH pve-docs v5 01/21] qm: add anchor to "CPU Type" section Arthur Bied-Charreton
2026-05-15  9:28 ` [PATCH qemu-server v5 02/21] cpu config: rename CPU models config path variable Arthur Bied-Charreton
2026-05-15  9:28 ` [PATCH qemu-server v5 03/21] cpu flags: move cpu flags-related utilities to their own module Arthur Bied-Charreton
2026-05-15  9:28 ` [PATCH qemu-server v5 04/21] cpu flags: compare against JSON::true when querying supported flags Arthur Bied-Charreton
2026-05-15  9:28 ` [PATCH qemu-server v5 05/21] cpu flags: normalize CPU flags to QEMU's format Arthur Bied-Charreton
2026-05-15  9:28 ` [PATCH qemu-server v5 06/21] cpu flags: add helper querying CPU flags with nodes supporting them Arthur Bied-Charreton
2026-05-15  9:28 ` [PATCH qemu-server v5 07/21] cpu config: rename custom CPU model config loader Arthur Bied-Charreton
2026-05-15  9:28 ` [PATCH qemu-server v5 08/21] cpu config: add helpers to lock and write config Arthur Bied-Charreton
2026-05-15  9:28 ` [PATCH qemu-server v5 09/21] cpu: register standard option for CPU format Arthur Bied-Charreton
2026-05-15  9:28 ` [PATCH qemu-server v5 10/21] api: cpu flags: improve flags list returned by endpoint Arthur Bied-Charreton
2026-05-15  9:28 ` [PATCH qemu-server v5 11/21] custom cpu models: avoid redundant config load Arthur Bied-Charreton
2026-05-15  9:28 ` [PATCH pve-manager v5 12/21] cluster: reorder imports Arthur Bied-Charreton
2026-05-15  9:28 ` [PATCH pve-manager v5 13/21] cluster: makefile: reorder perl sources and align backslashes Arthur Bied-Charreton
2026-05-15  9:28 ` [PATCH pve-manager v5 14/21] api: add endpoint querying available CPU flags cluster-wide Arthur Bied-Charreton
2026-05-15  9:45   ` Arthur Bied-Charreton
2026-05-15  9:28 ` [PATCH pve-manager v5 15/21] api: add CRUD handlers for custom CPU models Arthur Bied-Charreton
2026-05-15  9:28 ` [PATCH pve-manager v5 16/21] ui: cpu model selector: allow filtering out custom models Arthur Bied-Charreton
2026-05-15  9:28 ` [PATCH pve-manager v5 17/21] ui: add basic custom CPU model editor Arthur Bied-Charreton
2026-05-15  9:28 ` [PATCH pve-manager v5 18/21] ui: cpu flags selector: add CPU flag editor for custom models Arthur Bied-Charreton
2026-05-15  9:28 ` [PATCH pve-manager v5 19/21] ui: cpu flags selector: allow filtering out flags supported on 0 nodes Arthur Bied-Charreton
2026-05-15  9:28 ` [PATCH pve-manager v5 20/21] ui: cpu flags selector: add search bar for large lists of flags Arthur Bied-Charreton
2026-05-15  9:28 ` [PATCH pve-manager v5 21/21] ui: group custom CPU with resource mappings Arthur Bied-Charreton
2026-05-15 17:05 ` [PATCH docs/manager/qemu-server v5 00/21] Add API and UI for custom CPU models Max R. Carrara
2026-05-18  5:51   ` Arthur Bied-Charreton [this message]
2026-05-18  6:47 ` superseded: " Arthur Bied-Charreton
2026-05-18 10:27 ` applied: " Thomas Lamprecht
2026-05-18 11:20   ` 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=uanhrp2eefdvq7rq5cud5xdcwtxqxtcpfy73urcfe72vpkzsef@l5skmg6jxvip \
    --to=a.bied-charreton@proxmox.com \
    --cc=m.carrara@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