From: Dominik Csapak <d.csapak@proxmox.com>
To: Kaiyang Wu <wukaiyang2003@gmail.com>, pve-devel@lists.proxmox.com
Cc: Kaiyang Wu <wukaiyang@loongfans.cn>
Subject: Re: [PATCH manager 3/3] ui: qemu: add pvpanic device support
Date: Fri, 4 Sep 2026 10:30:04 +0200 [thread overview]
Message-ID: <9477b7a3-ab60-4c92-83dc-84292ef119ab@proxmox.com> (raw)
In-Reply-To: <20260827103529.393388-4-wukaiyang@loongfans.cn>
aside from this code being much simpler when we would only
have one option (with only PCI, there wouldn't be a need
for an edit window at all, the menu would just add the device,
or it would be just a checkbox on the machine edit window)
Also as long as our backend/code doesn't do anything with the
panics, we probably shouldn't expose the device at all?
This would only confuse users what do to with it.
other than that some comment inline
On 8/27/26 12:36 PM, Kaiyang Wu wrote:
> Add basic structure for adding and editing a pvpanic device, allowing to
> monitor guest system panics through the pvpanic device. Add an
> architecture-aware pvpanic device type option since arm64 does not
> support pvpanic ISA device.
>
> Signed-off-by: Kaiyang Wu <wukaiyang@loongfans.cn>
> ---
> www/manager6/Makefile | 2 ++
> www/manager6/Utils.js | 1 +
> www/manager6/form/PvpanicSelector.js | 12 +++++++++
> www/manager6/qemu/Architecture.js | 5 ++++
> www/manager6/qemu/HardwareView.js | 15 +++++++++++
> www/manager6/qemu/PvpanicEdit.js | 39 ++++++++++++++++++++++++++++
> 6 files changed, 74 insertions(+)
> create mode 100644 www/manager6/form/PvpanicSelector.js
> create mode 100644 www/manager6/qemu/PvpanicEdit.js
>
> diff --git a/www/manager6/Makefile b/www/manager6/Makefile
> index d2ea786b..c8bebf9c 100644
> --- a/www/manager6/Makefile
> +++ b/www/manager6/Makefile
> @@ -65,6 +65,7 @@ JSSRC= \
> form/PoolSelector.js \
> form/PreallocationSelector.js \
> form/PrivilegesSelector.js \
> + form/PvpanicSelector.js \
> form/QemuBiosSelector.js \
> form/QemuMachineSelector.js \
> form/RecordSearchField.js \
> @@ -282,6 +283,7 @@ JSSRC= \
> qemu/Options.js \
> qemu/PCIEdit.js \
> qemu/ProcessorEdit.js \
> + qemu/PvpanicEdit.js \
> qemu/QemuBiosEdit.js \
> qemu/RNGEdit.js \
> qemu/SSHKey.js \
> diff --git a/www/manager6/Utils.js b/www/manager6/Utils.js
> index c86a00c5..9bc4cda6 100644
> --- a/www/manager6/Utils.js
> +++ b/www/manager6/Utils.js
> @@ -1776,6 +1776,7 @@ Ext.define('PVE.Utils', {
> rng: 1,
> tpmstate: 1,
> virtiofs: 10,
> + pvpanic: 1,
> },
>
> // we can have usb6 and up only for specific machine/ostypes
> diff --git a/www/manager6/form/PvpanicSelector.js b/www/manager6/form/PvpanicSelector.js
> new file mode 100644
> index 00000000..63456c96
> --- /dev/null
> +++ b/www/manager6/form/PvpanicSelector.js
> @@ -0,0 +1,12 @@
> +Ext.define('PVE.form.PvpanicSelector', {
> + extend: 'PVE.form.FilteredKVComboBox',
> + alias: ['widget.pvePvpanicSelector'],
> + comboItems: [
> + ['pvpanic', 'pvpanic'],
> + ['pvpanic-pci', 'pvpanic (PCI)'],
> + ],
> +
> + allowBlank: false,
> +
> + allowedValuesPerCategory: PVE.qemu.Architecture.allowedPvpanic,
> +});
> diff --git a/www/manager6/qemu/Architecture.js b/www/manager6/qemu/Architecture.js
> index 7b6ef402..d58b4429 100644
> --- a/www/manager6/qemu/Architecture.js
> +++ b/www/manager6/qemu/Architecture.js
> @@ -52,6 +52,11 @@ Ext.define('PVE.qemu.Architecture', {
> aarch64: ['virtio-scsi-pci', 'virtio-scsi-single'],
> },
>
> + allowedPvpanic: {
> + x86_64: ['pvpanic', 'pvpanic-pci'],
> + aarch64: ['pvpanic-pci'],
> + },
> +> allowedMachines: {
> x86_64: ['__default__', 'q35'], // __default__ is i440fx
> aarch64: ['__default__'], // __default__ is virt
> diff --git a/www/manager6/qemu/HardwareView.js b/www/manager6/qemu/HardwareView.js
> index e6c02299..9bea67a0 100644
> --- a/www/manager6/qemu/HardwareView.js
> +++ b/www/manager6/qemu/HardwareView.js
> @@ -375,6 +375,13 @@ Ext.define('PVE.qemu.HardwareView', {
> header: gettext('Virtiofs') + ' (' + confid + ')',
> };
> }
> + rows.pvpanic0 = {
> + group: 55,
> + iconCls: 'exclamation-triangle',
> + editor: caps.vms['VM.Config.HWType'] ? 'PVE.qemu.PvpanicEdit' : undefined,
> + never_delete: !caps.vms['VM.Config.HWType'],
> + header: gettext('Panic Monitor (pvpanic)'),
we normally don't write the qemu name in this menu, so
just 'Panic Montior' should be enough
> + };
>
> var sorterFn = function (rec1, rec2) {
> var v1 = rec1.data.key;
> @@ -738,6 +745,7 @@ Ext.define('PVE.qemu.HardwareView', {
> efidisk_menuitem.setDisabled(noVMConfigDiskPerm || isAtLimit('efidisk'));
> me.down('#addTpmState').setDisabled(noVMConfigDiskPerm || isAtLimit('tpmstate'));
> me.down('#addVirtiofs').setDisabled(noVMConfigOptionsPerm || isAtLimit('virtiofs'));
> + me.down('#addPvpanic').setDisabled(noVMConfigHWTypePerm || isAtLimit('pvpanic'));
> me.down('#addCloudinitDrive').setDisabled(
> noVMConfigCDROMPerm || noVMConfigCloudinitPerm || hasCloudInit,
> );
> @@ -918,6 +926,13 @@ Ext.define('PVE.qemu.HardwareView', {
> disabled: !caps.nodes['Sys.Console'],
> handler: editorFactory('VirtiofsEdit'),
> },
> + {
> + text: gettext('Panic Monitor (pvpanic)'),
> + itemId: 'addPvpanic',
> + iconCls: 'fa fa-exclamation-triangle',
> + disabled: !caps.vms['VM.Config.HWType'],
> + handler: editorFactory('PvpanicEdit'),
> + },
> ],
not your issue here, I just mention it for completeness sake:
we should probably start to categorize the hardware
in the add menu, the number of entries is getting too large
and it takes too long to find something
> }),
> },
> diff --git a/www/manager6/qemu/PvpanicEdit.js b/www/manager6/qemu/PvpanicEdit.js
> new file mode 100644
> index 00000000..871ebefa
> --- /dev/null
> +++ b/www/manager6/qemu/PvpanicEdit.js
> @@ -0,0 +1,39 @@
> +Ext.define('PVE.qemu.PvpanicEdit', {
> + extend: 'Proxmox.window.Edit',
> +
> + subject: gettext('Panic Monitor (pvpanic)'),
> +
> + onlineHelp: 'qm_pvpanic',
> +
> + items: [
> + {
> + xtype: 'pvePvpanicSelector',
> + name: 'pvpanic0',
> + fieldLabel: gettext('Type'),
> + },
> + ],
> +
> + initComponent: function () {
> + var me = this;
> +
> + me.nodename = me.pveSelNode?.data.node;
> +
> + if (!me.nodename) {
> + throw 'no nodename given';
> + }
> +
> + me.callParent();
> +
> + me.load({
> + success: function ({ result }) {
> + let values = result.data;
> + let arch = PVE.qemu.Architecture.getGuestArchitecture(values.arch, me.nodename);
> + let pvpanic0 = values.pvpanic0;
> + if (pvpanic0) {
> + me.down('pvePvpanicSelector').setValue(pvpanic0);
> + }
> + me.down('pvePvpanicSelector').setCategory(arch);
> + },
> + });
> + },
> +});
next prev parent reply other threads:[~2026-09-04 8:30 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-27 10:35 [PATCH qemu-server/docs/manager 0/3] add pvpanic device support Kaiyang Wu
2026-08-27 10:35 ` [PATCH qemu-server 1/3] qemuserver: add pvpanic device Kaiyang Wu
2026-09-04 8:30 ` Dominik Csapak
2026-08-27 10:35 ` [PATCH docs 2/3] qm: add document section for the " Kaiyang Wu
2026-08-27 10:35 ` [PATCH manager 3/3] ui: qemu: add pvpanic device support Kaiyang Wu
2026-09-04 8:30 ` Dominik Csapak [this message]
2026-09-03 8:42 ` [PATCH qemu-server/docs/manager 0/3] " Kaiyang Wu
2026-09-04 8:30 ` Dominik Csapak
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=9477b7a3-ab60-4c92-83dc-84292ef119ab@proxmox.com \
--to=d.csapak@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
--cc=wukaiyang2003@gmail.com \
--cc=wukaiyang@loongfans.cn \
/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.