public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH qemu-server] cpu models: only include custom models on x86_64
@ 2026-05-19  7:51 Arthur Bied-Charreton
  2026-05-19  8:13 ` Fiona Ebner
  2026-05-19  9:06 ` superseded: " Arthur Bied-Charreton
  0 siblings, 2 replies; 6+ messages in thread
From: Arthur Bied-Charreton @ 2026-05-19  7:51 UTC (permalink / raw)
  To: pve-devel

The custom CPU models config does not currently expose a way to specify
an arch and it defaults to x86_64.

Only include custom models if $arch is set to x86_64 to prevent listing
x86_64-only custom models in the CPU model selector for arm VMs.

Signed-off-by: Arthur Bied-Charreton <a.bied-charreton@proxmox.com>
---
 src/PVE/QemuServer/CPUConfig.pm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/PVE/QemuServer/CPUConfig.pm b/src/PVE/QemuServer/CPUConfig.pm
index 10f7729d..b037a34e 100644
--- a/src/PVE/QemuServer/CPUConfig.pm
+++ b/src/PVE/QemuServer/CPUConfig.pm
@@ -572,6 +572,8 @@ sub add_cpu_json_properties($prop) {
 
 sub get_cpu_models($include_custom, $arch = undef) {
     $arch //= get_host_arch();
+    $include_custom = 0 if $arch ne 'x86_64';
+
     my $cpu_vendor_list = get_cpu_models_by_arch($arch);
 
     my $models = [];
-- 
2.47.3




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

* Re: [PATCH qemu-server] cpu models: only include custom models on x86_64
  2026-05-19  7:51 [PATCH qemu-server] cpu models: only include custom models on x86_64 Arthur Bied-Charreton
@ 2026-05-19  8:13 ` Fiona Ebner
  2026-05-19  8:17   ` Fiona Ebner
  2026-05-19  8:18   ` Arthur Bied-Charreton
  2026-05-19  9:06 ` superseded: " Arthur Bied-Charreton
  1 sibling, 2 replies; 6+ messages in thread
From: Fiona Ebner @ 2026-05-19  8:13 UTC (permalink / raw)
  To: Arthur Bied-Charreton, pve-devel

Am 19.05.26 um 9:51 AM schrieb Arthur Bied-Charreton:
> The custom CPU models config does not currently expose a way to specify
> an arch and it defaults to x86_64.
> 

This is not true? It implicitly defaults to the arch of the base model
(i.e. reported-model) and custom models for aarch64 can be created and
used just fine. Just not created via UI.


> Only include custom models if $arch is set to x86_64 to prevent listing
> x86_64-only custom models in the CPU model selector for arm VMs.
> 
> Signed-off-by: Arthur Bied-Charreton <a.bied-charreton@proxmox.com>

We should rather filter out the models where the base model does not fit
the arch.




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

* Re: [PATCH qemu-server] cpu models: only include custom models on x86_64
  2026-05-19  8:13 ` Fiona Ebner
@ 2026-05-19  8:17   ` Fiona Ebner
  2026-05-19  8:46     ` Arthur Bied-Charreton
  2026-05-19  8:18   ` Arthur Bied-Charreton
  1 sibling, 1 reply; 6+ messages in thread
From: Fiona Ebner @ 2026-05-19  8:17 UTC (permalink / raw)
  To: Arthur Bied-Charreton, pve-devel

Am 19.05.26 um 10:13 AM schrieb Fiona Ebner:
> Am 19.05.26 um 9:51 AM schrieb Arthur Bied-Charreton:
>> The custom CPU models config does not currently expose a way to specify
>> an arch and it defaults to x86_64.
>>
> 
> This is not true? It implicitly defaults to the arch of the base model
> (i.e. reported-model) and custom models for aarch64 can be created and
> used just fine. Just not created via UI.
> 

Also, if the host itself is ARM, then they can also be created via UI,
right?

> 
>> Only include custom models if $arch is set to x86_64 to prevent listing
>> x86_64-only custom models in the CPU model selector for arm VMs.
>>
>> Signed-off-by: Arthur Bied-Charreton <a.bied-charreton@proxmox.com>
> 
> We should rather filter out the models where the base model does not fit
> the arch.
> 
> 
> 
> 





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

* Re: [PATCH qemu-server] cpu models: only include custom models on x86_64
  2026-05-19  8:13 ` Fiona Ebner
  2026-05-19  8:17   ` Fiona Ebner
@ 2026-05-19  8:18   ` Arthur Bied-Charreton
  1 sibling, 0 replies; 6+ messages in thread
From: Arthur Bied-Charreton @ 2026-05-19  8:18 UTC (permalink / raw)
  To: Fiona Ebner; +Cc: pve-devel

On Tue, May 19, 2026 at 10:13:47AM +0200, Fiona Ebner wrote:
> Am 19.05.26 um 9:51 AM schrieb Arthur Bied-Charreton:
> > The custom CPU models config does not currently expose a way to specify
> > an arch and it defaults to x86_64.
> > 
> 
> This is not true? It implicitly defaults to the arch of the base model
> (i.e. reported-model) and custom models for aarch64 can be created and
> used just fine. Just not created via UI.
> 
Argh you're right, I misremembered that
> 
> > Only include custom models if $arch is set to x86_64 to prevent listing
> > x86_64-only custom models in the CPU model selector for arm VMs.
> > 
> > Signed-off-by: Arthur Bied-Charreton <a.bied-charreton@proxmox.com>
> 
> We should rather filter out the models where the base model does not fit
> the arch.
makes sense, will rather do that




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

* Re: [PATCH qemu-server] cpu models: only include custom models on x86_64
  2026-05-19  8:17   ` Fiona Ebner
@ 2026-05-19  8:46     ` Arthur Bied-Charreton
  0 siblings, 0 replies; 6+ messages in thread
From: Arthur Bied-Charreton @ 2026-05-19  8:46 UTC (permalink / raw)
  To: Fiona Ebner; +Cc: pve-devel

On Tue, May 19, 2026 at 10:17:49AM +0200, Fiona Ebner wrote:
> Am 19.05.26 um 10:13 AM schrieb Fiona Ebner:
> > Am 19.05.26 um 9:51 AM schrieb Arthur Bied-Charreton:
> >> The custom CPU models config does not currently expose a way to specify
> >> an arch and it defaults to x86_64.
> >>
> > 
> > This is not true? It implicitly defaults to the arch of the base model
> > (i.e. reported-model) and custom models for aarch64 can be created and
> > used just fine. Just not created via UI.
> > 
> 
> Also, if the host itself is ARM, then they can also be created via UI,
> right?
> 
Yes, we do not pass any arch parameter to the 
nodes/.../capabilities/qemu/cpu endpoint in the custom model editor 
so the list defaults to the host arch. Thanks for correcting this.
> > 
> >> Only include custom models if $arch is set to x86_64 to prevent listing
> >> x86_64-only custom models in the CPU model selector for arm VMs.
> >>
> >> Signed-off-by: Arthur Bied-Charreton <a.bied-charreton@proxmox.com>
> > 
> > We should rather filter out the models where the base model does not fit
> > the arch.
> > 




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

* superseded: [PATCH qemu-server] cpu models: only include custom models on x86_64
  2026-05-19  7:51 [PATCH qemu-server] cpu models: only include custom models on x86_64 Arthur Bied-Charreton
  2026-05-19  8:13 ` Fiona Ebner
@ 2026-05-19  9:06 ` Arthur Bied-Charreton
  1 sibling, 0 replies; 6+ messages in thread
From: Arthur Bied-Charreton @ 2026-05-19  9:06 UTC (permalink / raw)
  To: pve-devel

Superseded-by:
https://lore.proxmox.com/pve-devel/20260519090423.224307-1-a.bied-charreton@proxmox.com/




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

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

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-19  7:51 [PATCH qemu-server] cpu models: only include custom models on x86_64 Arthur Bied-Charreton
2026-05-19  8:13 ` Fiona Ebner
2026-05-19  8:17   ` Fiona Ebner
2026-05-19  8:46     ` Arthur Bied-Charreton
2026-05-19  8:18   ` Arthur Bied-Charreton
2026-05-19  9:06 ` superseded: " Arthur Bied-Charreton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal