all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH qemu-server v2] cpu models: only include custom models matching the current arch
@ 2026-05-19  9:04 Arthur Bied-Charreton
  2026-05-19  9:55 ` applied: " Fiona Ebner
  0 siblings, 1 reply; 2+ messages in thread
From: Arthur Bied-Charreton @ 2026-05-19  9:04 UTC (permalink / raw)
  To: pve-devel

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




^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-05-19  9:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-19  9:04 [PATCH qemu-server v2] cpu models: only include custom models matching the current arch Arthur Bied-Charreton
2026-05-19  9:55 ` applied: " Fiona Ebner

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.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal