all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: nick@nicksherlock.com
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH pve-manager] ui: pci passthrough: editor for pci-id overrides
Date: Tue, 18 Jan 2022 08:43:29 +0000	[thread overview]
Message-ID: <0100017e6c5afcc0-86262f8d-7094-49de-b64b-df97f83dc424-000000@email.amazonses.com> (raw)
In-Reply-To: <20220118084312.67133-1-nick@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..2a8a1a9d 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: 'x-pci-vendor-id',
+		fieldLabel: gettext('Set vendor ID'),
+		vtype: 'PciId',
+		allowBlank: true,
+		emptyText: Proxmox.Utils.defaultText,
+		submitEmpty: false,
+	    },
+	    {
+		xtype: 'textfield',
+		name: 'x-pci-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: 'x-pci-sub-vendor-id',
+		fieldLabel: gettext('Set sub-vendor ID'),
+		vtype: 'PciId',
+		allowBlank: true,
+		emptyText: Proxmox.Utils.defaultText,
+		submitEmpty: false,
+	    },
+	    {
+		xtype: 'textfield',
+		name: 'x-pci-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  8:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <pci-id-override@nicksherlock.com>
2022-01-18  8:43 ` [pve-devel] [PATCH qemu-server 0/1] pci: allow override of PCI vendor/device ids nick
     [not found] ` <20220118084312.67133-1-nick@nicksherlock.com>
2022-01-18  8:43   ` [pve-devel] [PATCH qemu-server] " nick
2022-01-18 11:58     ` Dominik Csapak
2022-01-18  8:43   ` nick [this message]

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=0100017e6c5afcc0-86262f8d-7094-49de-b64b-df97f83dc424-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