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 B46E21FF0BC for ; Thu, 29 Oct 2026 14:39:05 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 65C1921645; Thu, 29 Oct 2026 14:38:33 +0100 (CET) Content-Type: text/plain; charset=UTF-8 Date: Thu, 29 Oct 2026 14:32:08 +0100 Message-Id: Subject: Re: [PATCH qemu-server v2 6/9] pci: use PVE::RS::PCI bindings for addresses and bus devices From: "Elias Huhsovitz" To: "Dominik Csapak" , Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 X-Mailer: aerc 0.20.0 References: <20261015081041.743422-1-d.csapak@proxmox.com> <20261015081041.743422-7-d.csapak@proxmox.com> In-Reply-To: <20261015081041.743422-7-d.csapak@proxmox.com> X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1793280728792 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.485 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: 6IWNQU4W6UOVZXNH5IAUKH6CVLBKINQR X-Message-ID-Hash: 6IWNQU4W6UOVZXNH5IAUKH6CVLBKINQR 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: Needs rebase onto the newest version of the hotplug serires (v4) or master should the hotplug serires get applied. Otherwise it seems like the functionality remains unchanged. On Thu Oct 15, 2026 at 10:10 AM CEST, Dominik Csapak wrote: > Instead of the hardcoded address maps, use the pve-qemu-server-pci crate > via `PVE::RS::PCI::HardwareConfig` for the addresses of all devices, the > pci bridges and the root ports of passed through pcie devices. > > The object contains the relevant parts of the guest config and the > machine version (for hotplug the one of the running instance), so we > construct it once for the commandline or a hotplug operation and pass it > to the functions that need an address, instead of the arch. The > functions that also check the machine version still get it separately. > > The only functional change is that the root ports of the hostpcie > devices are now generated together with the bridges, so they move up on > the commandline. This also fixes hostpcie devices whose root port had no > function 0 in its slot (e.g. with only hostpci5 configured), which the > guest did not see. Adapt the hostpci tests accordingly (see [0] for the > initial bug). Since this is a configuration that is obviously wrong for > the user (so unlikely to occur in the real world), and the fact that pci > live migration is still marked experimental, it should be ok to not > guard that change behind a machine version. > > The checks of run_pci_addr_checks.pl are now covered by the tests of the > rust crate, so remove it. > > 0: https://lore.proxmox.com/all/11ce85d1-eb5d-48d1-a4ba-046424613f29@pult= ar.org/ > > Fixes: c4e16381 (Add support for up to 16 PCI(e) devices) > Signed-off-by: Dominik Csapak > --- [snip]