From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id DC0141FF0E5 for ; Wed, 26 Aug 2026 08:11:08 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 0B1BC20B68; Wed, 26 Aug 2026 08:11:08 +0200 (CEST) Message-ID: <846b412b-eab9-47bf-a742-9d84a628da83@proxmox.com> Date: Wed, 26 Aug 2026 08:10:51 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Beta Subject: Re: [PATCH docs/guest-common/qemu-server v4 0/7] add new pci passthrough specific hookscript phase From: Dominik Csapak To: pve-devel@lists.proxmox.com References: <20260825135502.3971930-1-d.csapak@proxmox.com> Content-Language: en-US In-Reply-To: <20260825135502.3971930-1-d.csapak@proxmox.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1787724629745 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.705 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: ICX6VBQ7T6HHRKDOC6FAKEFYXYZ24F6E X-Message-ID-Hash: ICX6VBQ7T6HHRKDOC6FAKEFYXYZ24F6E X-MailFrom: d.csapak@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: On 8/25/26 3:54 PM, Dominik Csapak wrote: > this series adds a new phase to the guest hookscript that is called for each > 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 > not sure what i was thinking yesterday, of course these two 'changes from v3/v4' are both meant as 'changes from v3' (i guess i started writing, paused, and finished later with mindlessly adding a new section....) > 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(-) >