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 01BBC1FF136 for ; Mon, 18 May 2026 07:52:06 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 8AB983EF45; Mon, 18 May 2026 07:52:03 +0200 (CEST) Date: Mon, 18 May 2026 07:51:25 +0200 From: Arthur Bied-Charreton To: "Max R. Carrara" Subject: Re: [PATCH docs/manager/qemu-server v5 00/21] Add API and UI for custom CPU models Message-ID: References: <20260515092839.238064-1-a.bied-charreton@proxmox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1779083475161 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.615 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 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 SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [proxmox.com] Message-ID-Hash: 6SXX7G34U3TPFDXV4P4T7CYNZ4EUM4TV X-Message-ID-Hash: 6SXX7G34U3TPFDXV4P4T7CYNZ4EUM4TV X-MailFrom: a.bied-charreton@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 CC: pve-devel@lists.proxmox.com X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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