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 90D911FF137 for ; Tue, 03 Feb 2026 11:21:46 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id E0A6019228; Tue, 3 Feb 2026 11:21:57 +0100 (CET) From: Dominik Csapak To: pve-devel@lists.proxmox.com Subject: [PATCH manager v2 16/17] ui: qemu: make processor edit architecture aware Date: Tue, 3 Feb 2026 11:00:21 +0100 Message-ID: <20260203102118.1430545-17-d.csapak@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260203102118.1430545-1-d.csapak@proxmox.com> References: <20260203102118.1430545-1-d.csapak@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.032 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: NASMFLQJQQ6GJLTZP4LTDOJD54LGFEEQ X-Message-ID-Hash: NASMFLQJQQ6GJLTZP4LTDOJD54LGFEEQ X-MailFrom: d.csapak@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: The cpu and flags list we get from the backend got an architecture parameter that we now use to filter the correct cpu models. For the flags grid, we add an emptyText to show when there are no flags available (e.g. currently this is the case for aarch64). Signed-off-by: Dominik Csapak --- www/manager6/form/CPUModelSelector.js | 13 +++++++++++++ www/manager6/form/VMCPUFlagSelector.js | 13 +++++++++++++ www/manager6/qemu/CreateWizard.js | 3 +++ www/manager6/qemu/ProcessorEdit.js | 19 +++++++++++++++++++ 4 files changed, 48 insertions(+) diff --git a/www/manager6/form/CPUModelSelector.js b/www/manager6/form/CPUModelSelector.js index 2ebd08eb..602706e7 100644 --- a/www/manager6/form/CPUModelSelector.js +++ b/www/manager6/form/CPUModelSelector.js @@ -40,6 +40,19 @@ Ext.define('PVE.form.CPUModelSelector', { width: 360, }, + arch: undefined, + + setArch: function (arch) { + let me = this; + me.arch = arch; + let params = {}; + if (arch) { + params.arch = arch; + } + me.store.getProxy().setExtraParams(params); + me.store.reload(); + }, + store: { autoLoad: true, model: 'PVE.data.CPUModel', diff --git a/www/manager6/form/VMCPUFlagSelector.js b/www/manager6/form/VMCPUFlagSelector.js index 922fcfa6..6e49ea45 100644 --- a/www/manager6/form/VMCPUFlagSelector.js +++ b/www/manager6/form/VMCPUFlagSelector.js @@ -16,6 +16,8 @@ Ext.define('PVE.form.VMCPUFlagSelector', { unkownFlags: [], + emptyText: gettext('No CPU flags available'), + store: { type: 'store', fields: ['name', { name: 'state', defaultValue: '=' }, 'description'], @@ -67,6 +69,17 @@ Ext.define('PVE.form.VMCPUFlagSelector', { return flags; }, + setArch: function (arch) { + let me = this; + me.arch = arch; + let params = {}; + if (arch) { + params.arch = arch; + } + me.store.getProxy().setExtraParams(params); + me.store.reload(); + }, + // Adjusts the store for the current value and determines the unkown flags based on what the // store does not know. adjustStoreForValue: function () { diff --git a/www/manager6/qemu/CreateWizard.js b/www/manager6/qemu/CreateWizard.js index 1302d9dc..4bf9e00f 100644 --- a/www/manager6/qemu/CreateWizard.js +++ b/www/manager6/qemu/CreateWizard.js @@ -246,6 +246,9 @@ Ext.define('PVE.qemu.CreateWizard', { xtype: 'pveQemuProcessorPanel', insideWizard: true, title: gettext('CPU'), + bind: { + arch: '{current.architecture}', + }, }, { xtype: 'pveQemuMemoryPanel', diff --git a/www/manager6/qemu/ProcessorEdit.js b/www/manager6/qemu/ProcessorEdit.js index ffaf014e..e1383c3f 100644 --- a/www/manager6/qemu/ProcessorEdit.js +++ b/www/manager6/qemu/ProcessorEdit.js @@ -108,6 +108,15 @@ Ext.define('PVE.qemu.ProcessorInputPanel', { cpu: {}, + arch: undefined, + + setArch: function (arch) { + let me = this; + me.arch = arch; + me.lookup('cputype').setArch(arch); + me.lookup('cpuFlags').setArch(arch); + }, + column1: [ { xtype: 'proxmoxintegerfield', @@ -236,10 +245,12 @@ Ext.define('PVE.qemu.ProcessorInputPanel', { advancedColumnB: [ { xtype: 'label', + reference: 'cpuFlagsLabel', text: 'Extra CPU Flags:', }, { xtype: 'vmcpuflagselector', + reference: 'cpuFlags', name: 'flags', }, ], @@ -259,6 +270,12 @@ Ext.define('PVE.qemu.ProcessorEdit', { initComponent: function () { let me = this; + + me.nodename = me.pveSelNode?.data.node; + if (!me.nodename) { + throw 'no nodename given'; + } + me.getViewModel().set('cgroupMode', me.cgroupMode); var ipanel = Ext.create('PVE.qemu.ProcessorInputPanel'); @@ -289,6 +306,8 @@ Ext.define('PVE.qemu.ProcessorEdit', { } } me.setValues(data); + let arch = PVE.qemu.Architecture.getNodeArchitecture(data.arch, me.nodename); + ipanel.setArch(arch); }, }); }, -- 2.47.3