vmm: config: Switch DeviceConfig to use PciDeviceCommonConfig

Switch DeviceConfig over to using the newly extracted struct members as
used by all PCI based devices. The use of #[serde(flatten)] means that
this change has no impact on the JSON format that the data is stored as.

Signed-off-by: Rob Bradford <rbradford@meta.com>
This commit is contained in:
Rob Bradford
2026-04-03 12:08:38 -07:00
parent c9082570b0
commit 47182201f9
3 changed files with 38 additions and 53 deletions
+2 -6
View File
@@ -607,14 +607,10 @@ impl ApplyLandlock for DebugConsoleConfig {
#[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize)]
pub struct DeviceConfig {
#[serde(flatten)]
pub pci_common: PciDeviceCommonConfig,
pub path: PathBuf,
#[serde(default)]
pub iommu: bool,
#[serde(default)]
pub id: Option<String>,
#[serde(default)]
pub pci_segment: u16,
#[serde(default)]
pub x_nv_gpudirect_clique: Option<u8>,
}