mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vm-virtio: initialize MSI-X vectors with VIRTIO_MSI_NO_VECTOR
In case of the virtio frontend driver doesn't need interupts for certain queue event, it may explicitly write VIRTIO_MSI_NO_VECTOR to the virtio common configuration, or it may doesn't configure the event type vector at all. This patch initializes both MSI-X configuration vector and queue vector with VIRTIO_MSI_NO_VECTOR, so that the backend drivers won't trigger unexpected interrupts to the guest. Signed-off-by: Zide Chen <zide.chen@intel.com>
This commit is contained in:
committed by
Sebastien Boeuf
parent
40a3c31df4
commit
f685f0e0b2
@@ -23,6 +23,8 @@ pub use queue::*;
|
||||
pub type VirtioIommuRemapping =
|
||||
Box<dyn Fn(u64) -> std::result::Result<u64, std::io::Error> + Send + Sync>;
|
||||
|
||||
pub const VIRTIO_MSI_NO_VECTOR: u16 = 0xffff;
|
||||
|
||||
// Types taken from linux/virtio_ids.h
|
||||
#[derive(Copy, Clone, Debug)]
|
||||
#[allow(dead_code)]
|
||||
|
||||
Reference in New Issue
Block a user