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 BA7F01FF137 for ; Tue, 03 Feb 2026 14:51:00 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 6F6931F3E2; Tue, 3 Feb 2026 14:51:28 +0100 (CET) Message-ID: Date: Tue, 3 Feb 2026 14:51:23 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Beta Subject: Re: [PATCH qemu-server v2 4/8] cpu config: introduce module-wide $host_arch variable To: Fiona Ebner , pve-devel@lists.proxmox.com References: <20260129131021.118199-1-f.ebner@proxmox.com> <20260129131021.118199-5-f.ebner@proxmox.com> Content-Language: en-US From: Thomas Lamprecht In-Reply-To: <20260129131021.118199-5-f.ebner@proxmox.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1770126609117 X-SPAM-LEVEL: Spam detection results: 0 AWL -0.020 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: I2Y66YY43NKKJLI5AME5EQCKBS5AT7XR X-Message-ID-Hash: I2Y66YY43NKKJLI5AME5EQCKBS5AT7XR X-MailFrom: t.lamprecht@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: Am 29.01.26 um 14:09 schrieb Fiona Ebner: > It cannot change while the module is loaded. Also, commit "cpu config: > support aarch64 CPU models" will use the host arch as a hash key, > which is cleaner if no additional function call is required. Note that this is already cached in pve-common, so adding another module variable is not really giving us anything here. I would rather slightly prefer moving the initialization code for the CPU models from the module level into a singleton cache method, that way one only executes that stuff if really needed for the current code path. But that would be mostly a code clean-up that can be done later in any case.