From 6920dfc0f03f191ec12cfc482d78d9a5f05168d5 Mon Sep 17 00:00:00 2001 From: Christian Brauner Date: Wed, 22 Apr 2026 00:18:27 +0200 Subject: [PATCH] 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) --- src/vmspawn/vmspawn-qmp.h | 2 ++ src/vmspawn/vmspawn.c | 3 --- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/vmspawn/vmspawn-qmp.h b/src/vmspawn/vmspawn-qmp.h index 35cc029ea7..0bc73c90ab 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 7ed21af77b..029ae4eacd 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 {