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 9A6971FF133 for ; Mon, 11 May 2026 16:16:27 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 696E31C441; Mon, 11 May 2026 16:16:27 +0200 (CEST) Date: Mon, 11 May 2026 16:16:23 +0200 From: Arthur Bied-Charreton To: Fiona Ebner Subject: Re: [PATCH docs/manager/qemu-server v4 00/17] Add API and UI for custom CPU models Message-ID: <75nywur7tim4s5gkqtpjfpynm7ykhpuv7uld2q5w2v7fvyhthd@y5ggt4qr7hmh> References: <20260430160109.565536-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: 1778508872944 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.768 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 SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: 6UVCVKPKYNIEPQS7XEPK4NPPZI376QQI X-Message-ID-Hash: 6UVCVKPKYNIEPQS7XEPK4NPPZI376QQI 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 Mon, May 11, 2026 at 12:42:02PM +0200, Fiona Ebner wrote: > I found a pre-existing bug in query_supported_cpu_flags() that we should > fix. Namely the following replacement is wrong in general: > > > foreach my $prop (keys %$props) { > > next if $props->{$prop} ne '1'; > > # QEMU returns some flags multiple times, with '_', '.' or '-' > > # (e.g. lahf_lm and lahf-lm; sse4.2, sse4-2 and sse4_2; ...). > > # We only keep those with underscores, to match /proc/cpuinfo > > $prop =~ s/\.|-/_/g; > > $flags->{$prop} = 1; > > } > > In particular, flags like 'virt-ssbd' or 'amd-ssbd' or 'amd-no-ssb' are > not present multiple times, but only in their exact form. Because of the > replacement, we only consider e.g. 'virt_ssbd' and then mistakenly > detect the flags as not supported on any node. > > Let's just make an explicit map of what is actually duplicate and not do > such general replacement here. Thanks for catching that, that is indeed incorrect. I will fix this in a preparatory patch in v5