vmm, main: make PCI BDF configurable for ConsoleConfig

Add common PCI device configuration to the virtio-console device
configuration. This allows setting the device ID (the name), ID, the
PCI segment, and the PCI device ID (BDF), which were previously not
configurable for the virtio-console device.

This gives management software, such as libvirt, more control over PCI
resource assignment and aligns virtio-console with other devices that
already support this functionality [0].

[0] https://github.com/cloud-hypervisor/cloud-hypervisor/issues/8175

On-behalf-of: Philipp Schuster <philipp.schuster@sap.com>
Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de>
This commit is contained in:
Philipp Schuster
2026-05-11 16:11:48 +02:00
committed by Rob Bradford
parent 36a3369802
commit e793353bfb
6 changed files with 70 additions and 33 deletions

View File

@@ -184,7 +184,7 @@ impl RequestHandler for StubApiRequestHandler {
mode: ConsoleOutputMode::Tty,
socket: None,
},
iommu: false,
pci_common: PciDeviceCommonConfig::default(),
},
#[cfg(target_arch = "x86_64")]
debug_console: DebugConsoleConfig::default(),