all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Nicholas Sherlock <nick@nicksherlock.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH v2 pve-manager] ui: pci passthrough: editor for pci-id overrides
Date: Tue, 18 Jan 2022 21:38:40 +0000	[thread overview]
Message-ID: <0100017e6f20b0f4-8e2dc40b-0274-4e06-97bc-a57c6e5da0d2-000000@email.amazonses.com> (raw)
In-Reply-To: <pci-id-override2@nicksherlock.com>

From: Nicholas Sherlock <n.sherlock@gmail.com>

Signed-off-by: Nicholas Sherlock <n.sherlock@gmail.com>
---
 www/manager6/Toolkit.js      |  2 ++
 www/manager6/qemu/PCIEdit.js | 36 ++++++++++++++++++++++++++++++++++++
 2 files changed, 38 insertions(+)

diff --git a/www/manager6/Toolkit.js b/www/manager6/Toolkit.js
index 1b6085a4..f69c376a 100644
--- a/www/manager6/Toolkit.js
+++ b/www/manager6/Toolkit.js
@@ -13,6 +13,8 @@ Ext.apply(Ext.form.field.VTypes, {
     IP64AddressWithSuffixList: v => PVE.Utils.verify_ip64_address_list(v, true),
     IP64AddressListText: gettext('Example') + ': 192.168.1.1,192.168.1.2',
     IP64AddressListMask: /[A-Fa-f0-9,:.; ]/,
+    PciIdText: gettext('Example') + ': 0x8086',
+    PciId: v => /^0x[0-9a-fA-F]{4}$/.test(v),
 });
 
 Ext.define('PVE.form.field.Display', {
diff --git a/www/manager6/qemu/PCIEdit.js b/www/manager6/qemu/PCIEdit.js
index f505e34f..ec22a89c 100644
--- a/www/manager6/qemu/PCIEdit.js
+++ b/www/manager6/qemu/PCIEdit.js
@@ -190,6 +190,24 @@ Ext.define('PVE.qemu.PCIInputPanel', {
 		fieldLabel: 'ROM-File',
 		name: 'romfile',
 	    },
+	    {
+		xtype: 'textfield',
+		name: 'vendor-id',
+		fieldLabel: gettext('Set vendor ID'),
+		vtype: 'PciId',
+		allowBlank: true,
+		emptyText: Proxmox.Utils.defaultText,
+		submitEmpty: false,
+	    },
+	    {
+		xtype: 'textfield',
+		name: 'device-id',
+		fieldLabel: gettext('Set device ID'),
+		vtype: 'PciId',
+		allowBlank: true,
+		emptyText: Proxmox.Utils.defaultText,
+		submitEmpty: false,
+	    },
 	];
 
 	me.advancedColumn2 = [
@@ -198,6 +216,24 @@ Ext.define('PVE.qemu.PCIInputPanel', {
 		fieldLabel: 'PCI-Express',
 		name: 'pcie',
 	    },
+	    {
+		xtype: 'textfield',
+		name: 'sub-vendor-id',
+		fieldLabel: gettext('Set sub-vendor ID'),
+		vtype: 'PciId',
+		allowBlank: true,
+		emptyText: Proxmox.Utils.defaultText,
+		submitEmpty: false,
+	    },
+	    {
+		xtype: 'textfield',
+		name: 'sub-device-id',
+		fieldLabel: gettext('Set sub-device ID'),
+		vtype: 'PciId',
+		allowBlank: true,
+		emptyText: Proxmox.Utils.defaultText,
+		submitEmpty: false,
+	    },
 	];
 
 	me.callParent();
-- 
2.34.1




  parent reply	other threads:[~2022-01-18 21:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <pci-id-override2@nicksherlock.com>
2022-01-18 21:38 ` [pve-devel] [PATCH v2 qemu-server 0/1] pci: allow override of PCI vendor/device ids Nicholas Sherlock
2022-01-20 15:48   ` Dominik Csapak
2022-01-20 21:21     ` Nicholas Sherlock
2022-01-18 21:38 ` [pve-devel] [PATCH v2 qemu-server] " Nicholas Sherlock
2022-01-25 10:02   ` [pve-devel] applied: " Thomas Lamprecht
2022-01-18 21:38 ` Nicholas Sherlock [this message]
2022-01-27 14:21   ` [pve-devel] applied: [PATCH v2 pve-manager] ui: pci passthrough: editor for pci-id overrides Thomas Lamprecht
     [not found]   ` <0100017e9be9fa51-bfe8d998-0793-4d1a-8403-26d7b78478ac-000000@email.amazonses.com>
2022-01-28  9:38     ` Nicholas Sherlock

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=0100017e6f20b0f4-8e2dc40b-0274-4e06-97bc-a57c6e5da0d2-000000@email.amazonses.com \
    --to=nick@nicksherlock.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 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