* [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
* applied: [PATCH qemu-server v2] cpu models: only include custom models matching the current arch
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 ` Fiona Ebner
0 siblings, 0 replies; 2+ messages in thread
From: Fiona Ebner @ 2026-05-19 9:55 UTC (permalink / raw)
To: pve-devel, Arthur Bied-Charreton
On Tue, 19 May 2026 11:04:23 +0200, Arthur Bied-Charreton wrote:
> 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.
Applied, thanks! Avoided the multi-line post-if and also moved looking
up the vendor into the branch where it's actually required.
[1/1] cpu models: only include custom models matching the current arch
commit: aa8e225a79e3c2b8fd30aa6555244fd7fdd37c1c
^ permalink raw reply [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.