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 584CF1FF0B7 for ; Tue, 25 Aug 2026 15:55:27 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 9DF2F2166B; Tue, 25 Aug 2026 15:55:07 +0200 (CEST) From: Dominik Csapak To: pve-devel@lists.proxmox.com Subject: [PATCH docs/guest-common/qemu-server v4 0/7] add new pci passthrough specific hookscript phase Date: Tue, 25 Aug 2026 15:54:45 +0200 Message-ID: <20260825135502.3971930-1-d.csapak@proxmox.com> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.726 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: 3PLGZZYR4ZB4QC3IOLWDSQYF4GE36NYD X-Message-ID-Hash: 3PLGZZYR4ZB4QC3IOLWDSQYF4GE36NYD 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: 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 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(-) -- Generated by murpp 0.11.0