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 6ECDA1FF13C for ; Thu, 28 May 2026 17:44:04 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 231F233294; Thu, 28 May 2026 17:44:02 +0200 (CEST) Message-ID: <5a69ae56-3533-45e3-a3ba-7ba2512f0b84@proxmox.com> Date: Thu, 28 May 2026 17:43:26 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH pve-qemu 2/3] build: query Hyper-V enlightenment flags for CPU flags list To: Arthur Bied-Charreton References: <20260522132122.712794-1-a.bied-charreton@proxmox.com> <20260522132122.712794-3-a.bied-charreton@proxmox.com> <9d6b0d73-1a43-4590-84b7-65b7517abac5@proxmox.com> Content-Language: en-US From: Fiona Ebner In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1779982979302 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.009 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: GHL72P732KXIUZGKWCKRYI7QXCZWFUVT X-Message-ID-Hash: GHL72P732KXIUZGKWCKRYI7QXCZWFUVT X-MailFrom: f.ebner@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: Am 28.05.26 um 5:29 PM schrieb Arthur Bied-Charreton: > On Thu, May 28, 2026 at 03:38:43PM +0200, Fiona Ebner wrote: >> I'm also thinking about whether we should go ahead and use just the QOM >> CPU properties rather than relying on the -cpu help output. We would >> then need a hardcoded blacklist of boolean properties that are not to be >> expose as flags (and also the aliases to avoid duplication). It's not >> that long of a list, but going forward, we'll need to be slightly more >> careful not to add anything as a flag that we don't want. In practice, >> after patch 3/3, every new boolean option needs to be looked at anyways >> and then the person doing the rebase needs to check if it is actually a >> flag. I'm not fully sure, but it would avoid the mixing info from >> different sources altogether. What do you think? >> > From a quick diff the only flag present in -cpu help that is not also in > qom-list-properties is kvmclock (on 11.0.0). In the other direction it's > 62 (I guess 58 after resolving QEMU aliases) properties, without > counting the Hyper-V enlightenments, since we want to include those. > > Some thoughts: > > QEMU accepts all flags that would be added with qom-list-properties > (just successfully booted a VM with a custom CPU model that had all of > them set), so on that front we would be okay AFAICT. > > The blocker is query_supported_cpu_flags, it reports a lot of the new > flags I checked as unsupported. There is likely a way to make the > temporary VM we query for flag support advertise those as well, like > there was for the Hyper-V enlightenments, but I think that should be > figured out before we start including those flags. > > I would suggest keeping '-cpu help' as the base set for now and just > moving the qom-list-properties call for hv-* into the script so we stop > mixing STDIN and a passed-in binary. At least until we have a good way > to query support for the new flags. This way we avoid recreating the > Hyper-V enlightenments issue at a larger scale. > > I might still be missing a piece though, will definitely look into the > support-query path with fresh eyes tomorrow. I didn't mean to include all boolean properties of the QOM CPU object as new flags. Many are not proper CPUID flags and I don't think we want to expose them in the same way. That's why I wrote we'd need a hard-coded list to filter out non-flag boolean properties. Those non-flag properties should rather be additional properties in our CPU model schema, if we ever choose to add one of them. That said, I'm fine with keeping -cpu help as the basis too if you prefer.