vmm: config: Switch VsockConfig to use PciDeviceCommonConfig

Switch VsockConfig 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:16:49 -07:00
parent ece77c3c52
commit 37b1ed1b84
3 changed files with 29 additions and 55 deletions
+2 -6
View File
@@ -667,14 +667,10 @@ impl ApplyLandlock for VdpaConfig {
#[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize)]
pub struct VsockConfig {
#[serde(flatten)]
pub pci_common: PciDeviceCommonConfig,
pub cid: u32,
pub socket: PathBuf,
#[serde(default)]
pub iommu: bool,
#[serde(default)]
pub id: Option<String>,
#[serde(default)]
pub pci_segment: u16,
}
impl ApplyLandlock for VsockConfig {