From: Michal Fox <me@dualfroz.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH manager] ui: qemu pci edit: remove the default PCI domain again before saving
Date: Sun, 4 Oct 2026 16:34:19 +0000 [thread overview]
Message-ID: <20261004163419.6-1-me@dualfroz.com> (raw)
The PCI selector shows the IDs of the devices including the domain, so
the default '0000' domain was removed again before saving, as it is
optional in the hostpci option.
Since the refactoring in commit a7ec3666 ("ui: qemu/PCI Edit: code
cleanup/refactoring/modernize"), the result of the replace call is not
assigned anymore, so the domain is kept and a device that was
configured as '01:00.0' gets saved as '0000:01:00.0' on any edit of
the passthrough device.
Assign the result again, so the domain is only kept if it is not the
default one, like before.
Fixes: a7ec3666 ("ui: qemu/PCI Edit: code cleanup/refactoring/modernize")
Signed-off-by: Michal Fox <me@dualfroz.com>
---
Tested in the browser with the PCI edit window and mocked configs:
'hostpci0: 01:00.0' is saved as '01:00.0' again instead of
'0000:01:00.0', while a device in another domain like '0001:02:00.0'
and mapped devices are saved as before.
www/manager6/qemu/PCIEdit.js | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/www/manager6/qemu/PCIEdit.js b/www/manager6/qemu/PCIEdit.js
index 4e8ed744..52f92c27 100644
--- a/www/manager6/qemu/PCIEdit.js
+++ b/www/manager6/qemu/PCIEdit.js
@@ -109,7 +109,9 @@ Ext.define('PVE.qemu.PCIInputPanel', {
// FIXME: what if no confid was found??
}
- values.host?.replace(/^0000:/, ''); // remove optional '0000' domain
+ if (values.host) {
+ values.host = values.host.replace(/^0000:/, ''); // remove optional '0000' domain
+ }
if (values.multifunction && values.host) {
values.host = values.host.substring(0, values.host.indexOf('.')); // skip the '.X'
--
2.43.0
reply other threads:[~2026-10-04 16:34 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20261004163419.6-1-me@dualfroz.com \
--to=me@dualfroz.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox