mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-10-05 21:15:45 +00:00
virtio-devices: iommu: Specify minimum number of queues to avoid OOB
In this way, the virtio-iommu code can properly report an error when a wrong number of queues is provided, instead of triggering an out-of-bound error. Signed-off-by: Bo Chen <chen.bo@intel.com>
This commit is contained in:
parent
71b4aad3f1
commit
83f22ac779
@ -905,6 +905,7 @@ impl Iommu {
|
|||||||
| 1u64 << VIRTIO_IOMMU_F_PROBE
|
| 1u64 << VIRTIO_IOMMU_F_PROBE
|
||||||
| 1u64 << VIRTIO_IOMMU_F_BYPASS_CONFIG,
|
| 1u64 << VIRTIO_IOMMU_F_BYPASS_CONFIG,
|
||||||
paused_sync: Some(Arc::new(Barrier::new(2))),
|
paused_sync: Some(Arc::new(Barrier::new(2))),
|
||||||
|
min_queues: NUM_QUEUES as u16,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
},
|
},
|
||||||
config,
|
config,
|
||||||
|
Loading…
Reference in New Issue
Block a user