From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id C0A8C1FF09C for ; Mon, 21 Sep 2026 13:00:39 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 9849B2133C; Mon, 21 Sep 2026 13:00:39 +0200 (CEST) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Mon, 21 Sep 2026 13:00:14 +0200 Message-Id: Subject: Re: [PATCH docs/guest-common/qemu-server v4 0/7] add new pci passthrough specific hookscript phase From: "Elias Huhsovitz" To: "Dominik Csapak" , X-Mailer: aerc 0.20.0 References: <20260825135502.3971930-1-d.csapak@proxmox.com> In-Reply-To: <20260825135502.3971930-1-d.csapak@proxmox.com> X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1789988414584 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.618 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust 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: JQZZ4PC23ZCYNZMHCNUQ2D7NUXMGBMON X-Message-ID-Hash: JQZZ4PC23ZCYNZMHCNUQ2D7NUXMGBMON X-MailFrom: e.huhsovitz@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: It seems like there are no more additional reviews coming, so here is my verdict. I followed similar testing idiology as Jakob in [3] and came to the same conclusion with 2 small notes: 1. disarm the example hookscript [0] by downgrading `die` to `warn`. This avoids current hookscripts dying should a new phase with=20 `stop_on_error=3D1` be introduced. 2. nit regarding redundant comment in [1]. So consider this: Reviewed-by: Elias Huhsovitz Tested-by: Elias Huhsovitz [0] https://git.proxmox.com/?p=3Dpve-docs.git;a=3Dblob;f=3Dexamples/guest-e= xample-hookscript.pl [1] https://lore.proxmox.com/pve-devel/DL5JP1DEST4H.1CK8T93J8T97T@proxmox.c= om/ [3] https://lore.proxmox.com/pve-devel/DL5JZAB7ZY1O.261WNTEKI1S5K@proxmox.c= om/ On Tue Aug 25, 2026 at 3:54 PM CEST, Dominik Csapak wrote: > this series adds a new phase to the guest hookscript that is called for e= ach > passed throug pci device after it's prepared, but before the qemu process= is > started. > > See the last qemu-server commit for why that is interesting. > > changes from v4: > * rebase on current master > * fix `local %ENV` clearing the whole environment instead of > just shadowing it, so the hookscript keeps the inherited environment > * split the uuid handling out of the refactoring commit > * call the hookscript once for both the mdev and the plain passthrough > case instead of duplicating the call in both branches > * add missing `use PVE::GuestHelpers;` > * move the new phase before 'post-start' to match the actual call > order, document that PVE_HOOK_MDEV_UUID is only set for mdevs, and > mention what the phase is useful for > * fix typos > > changes from v3: > * split unrelated logic/refactoring changes out to their own patches > * fix typos > > changes from v2: > * rebase on current master > * prefix hook script env variables with 'PVE_HOOK_' > > > pve-guest-common: > > Dominik Csapak (1): > helpers: exec hookscript: add optional parameters > > src/PVE/GuestHelpers.pm | 12 +++++++++++- > 1 file changed, 11 insertions(+), 1 deletion(-) > > > qemu-server: > > Dominik Csapak (5): > pci: mdev preparation: always generate local uuid first > pci: nvidia vgpu: correct wrong comment about uuid > pci: factor 'prepare_pci_devices' out to PVE::QemuServer::PCI module > pci: preparation: mdev: only generate uuid once > pci: call hookscript for each prepared pci device > > src/PVE/QemuServer.pm | 45 ++++++--------------------------- > src/PVE/QemuServer/PCI.pm | 52 +++++++++++++++++++++++++++++++++++++++ > 2 files changed, 60 insertions(+), 37 deletions(-) > > > pve-docs: > > Dominik Csapak (1): > examples: add new hookscript phase to example hookscript > > examples/guest-example-hookscript.pl | 29 ++++++++++++++++++++++++++++ > 1 file changed, 29 insertions(+) > > > Summary over all repositories: > 4 files changed, 100 insertions(+), 38 deletions(-)