From: Christian Brauner Date: Tue, 21 Apr 2026 22:18:27 +0000 (+0200) Subject: vmspawn: move VMSPAWN_PCIE_HOTPLUG_SPARES to vmspawn-qmp.h X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6920dfc0f03f191ec12cfc482d78d9a5f05168d5;p=thirdparty%2Fsystemd.git vmspawn: move VMSPAWN_PCIE_HOTPLUG_SPARES to vmspawn-qmp.h Pure code motion, in preparation for the bridge-side hotplug machinery that needs the same constant to size its hotplug_port_owner[] array. The unsigned-suffix on the literal is dropped: the only consumer that compares against unsigned (vmspawn.c's pcie-port assert) is happy with a plain integer literal. Signed-off-by: Christian Brauner (Amutable) --- diff --git a/src/vmspawn/vmspawn-qmp.h b/src/vmspawn/vmspawn-qmp.h index 35cc029ea76..0bc73c90abc 100644 --- a/src/vmspawn/vmspawn-qmp.h +++ b/src/vmspawn/vmspawn-qmp.h @@ -5,6 +5,8 @@ #include "shared-forward.h" +#define VMSPAWN_PCIE_HOTPLUG_SPARES 10 + /* Pending job continuation — called when a QMP background job reaches "concluded" state. * Used by blockdev-create to chain remaining drive setup after the job completes. */ typedef int (*pending_job_callback_t)(QmpClient *qmp, void *userdata); diff --git a/src/vmspawn/vmspawn.c b/src/vmspawn/vmspawn.c index 7ed21af77b1..029ae4eacd2 100644 --- a/src/vmspawn/vmspawn.c +++ b/src/vmspawn/vmspawn.c @@ -102,9 +102,6 @@ #define DISK_SERIAL_MAX_LEN_NVME 20 #define DISK_SERIAL_MAX_LEN_VIRTIO_BLK 20 -/* Spare pcie-root-ports reserved for future runtime hotplug beyond the pre-wired devices. */ -#define VMSPAWN_PCIE_HOTPLUG_SPARES 10u - /* An enum controlling how auxiliary state for the VM are maintained, i.e. the TPM state and the EFI variable * NVRAM. */ typedef enum StateMode {