vmm: config: Switch PmemConfig to use PciDeviceCommonConfig

Switch PmemConfig 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:05:29 -07:00
parent 0d3080e036
commit c9082570b0
3 changed files with 35 additions and 54 deletions
+2 -6
View File
@@ -514,17 +514,13 @@ impl ApplyLandlock for GenericVhostUserConfig {
#[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize)]
pub struct PmemConfig {
#[serde(flatten)]
pub pci_common: PciDeviceCommonConfig,
pub file: PathBuf,
#[serde(default)]
pub size: Option<u64>,
#[serde(default)]
pub iommu: bool,
#[serde(default)]
pub discard_writes: bool,
#[serde(default)]
pub id: Option<String>,
#[serde(default)]
pub pci_segment: u16,
}
impl ApplyLandlock for PmemConfig {