From: Arthur Bied-Charreton <a.bied-charreton@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH qemu-server v2] cpu models: only include custom models matching the current arch
Date: Tue, 19 May 2026 11:04:23 +0200 [thread overview]
Message-ID: <20260519090423.224307-1-a.bied-charreton@proxmox.com> (raw)
The CPU model selector showed all custom models regardless of their
architecture, allowing one to assign an x86_64 host an aarch64 custom
model and vice versa.
Only return custom models whose reported model matches the $arch
parameter in get_cpu_models.
Signed-off-by: Arthur Bied-Charreton <a.bied-charreton@proxmox.com>
---
src/PVE/QemuServer/CPUConfig.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/PVE/QemuServer/CPUConfig.pm b/src/PVE/QemuServer/CPUConfig.pm
index 10f7729d..753acc74 100644
--- a/src/PVE/QemuServer/CPUConfig.pm
+++ b/src/PVE/QemuServer/CPUConfig.pm
@@ -610,7 +610,7 @@ sub get_cpu_models($include_custom, $arch = undef) {
name => "custom-$custom_model",
custom => 1,
vendor => $vendor,
- };
+ } if defined($cpu_models_by_arch->{$arch}->{$reported_model});
}
return $models;
--
2.47.3
next reply other threads:[~2026-05-19 9:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-19 9:04 Arthur Bied-Charreton [this message]
2026-05-19 9:55 ` applied: [PATCH qemu-server v2] cpu models: only include custom models matching the current arch Fiona Ebner
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=20260519090423.224307-1-a.bied-charreton@proxmox.com \
--to=a.bied-charreton@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.