mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
virtio-devices: Handle virtio queues interrupts from transport layer
Instead of relying on the virtio-queue crate to store the information about the MSI-X vectors for each queue, we handle this directly from the PCI transport layer. This is the first step in getting closer to the upstream version of virtio-queue so that we can eventually move fully to the upstream version. Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
@@ -17,8 +17,8 @@ use vm_memory::{Address, Bytes, GuestAddress, GuestMemory};
|
||||
use crate::defs::{
|
||||
DEFAULT_AVAIL_RING_ADDR, DEFAULT_DESC_TABLE_ADDR, DEFAULT_USED_RING_ADDR,
|
||||
VIRTQ_AVAIL_ELEMENT_SIZE, VIRTQ_AVAIL_RING_HEADER_SIZE, VIRTQ_AVAIL_RING_META_SIZE,
|
||||
VIRTQ_MSI_NO_VECTOR, VIRTQ_USED_ELEMENT_SIZE, VIRTQ_USED_F_NO_NOTIFY,
|
||||
VIRTQ_USED_RING_HEADER_SIZE, VIRTQ_USED_RING_META_SIZE,
|
||||
VIRTQ_USED_ELEMENT_SIZE, VIRTQ_USED_F_NO_NOTIFY, VIRTQ_USED_RING_HEADER_SIZE,
|
||||
VIRTQ_USED_RING_META_SIZE,
|
||||
};
|
||||
use crate::{
|
||||
error, AccessPlatform, AvailIter, Descriptor, Error, QueueStateGuard, QueueStateT,
|
||||
@@ -58,9 +58,6 @@ pub struct QueueState {
|
||||
/// Guest physical address of the used ring.
|
||||
pub used_ring: GuestAddress,
|
||||
|
||||
/// Interrupt vector
|
||||
pub vector: u16,
|
||||
|
||||
/// Access platform handler
|
||||
pub access_platform: Option<Arc<dyn AccessPlatform>>,
|
||||
}
|
||||
@@ -200,7 +197,6 @@ impl QueueStateT for QueueState {
|
||||
next_used: Wrapping(0),
|
||||
event_idx_enabled: false,
|
||||
signalled_used: None,
|
||||
vector: VIRTQ_MSI_NO_VECTOR,
|
||||
access_platform: None,
|
||||
}
|
||||
}
|
||||
@@ -266,7 +262,6 @@ impl QueueStateT for QueueState {
|
||||
self.next_used = Wrapping(0);
|
||||
self.signalled_used = None;
|
||||
self.event_idx_enabled = false;
|
||||
self.vector = VIRTQ_MSI_NO_VECTOR;
|
||||
}
|
||||
|
||||
fn lock(&mut self) -> <Self as QueueStateGuard>::G {
|
||||
|
||||
Reference in New Issue
Block a user