mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vmm: config: Switch GenericVhostUserConfig to use PciDeviceCommonConfig
Switch GenericVhostUserConfig 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. As generic vhost-user devices do not support being placed behind an IOMMU an error is now raised if iommu is set. This can't happen via the CLI but could via the JSON/API. Signed-off-by: Rob Bradford <rbradford@meta.com>
This commit is contained in:
@@ -498,12 +498,10 @@ impl ApplyLandlock for FsConfig {
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize)]
|
||||
pub struct GenericVhostUserConfig {
|
||||
#[serde(flatten)]
|
||||
pub pci_common: PciDeviceCommonConfig,
|
||||
pub socket: PathBuf,
|
||||
pub queue_sizes: Vec<u16>,
|
||||
#[serde(default)]
|
||||
pub id: Option<String>,
|
||||
#[serde(default)]
|
||||
pub pci_segment: u16,
|
||||
pub device_type: u32,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user