Files
cloud-hypervisor/virtio-devices/src/transport/mod.rs
Wei Liu a1af4238ae virtio-devices: make ioeventfds() return an iterator
MSHV's SEV-SNP implementation calls ioeventfds whenever there is an
event.

This change removes the need frequent allocation and deallocation of a
vector, while at the same time makes sure other call sites are
unaffected.

Signed-off-by: Wei Liu <liuwe@microsoft.com>
2025-01-09 21:28:46 +00:00

14 lines
439 B
Rust

// Copyright © 2019 Intel Corporation
//
// SPDX-License-Identifier: Apache-2.0
use vmm_sys_util::eventfd::EventFd;
mod pci_common_config;
mod pci_device;
pub use pci_common_config::{VirtioPciCommonConfig, VIRTIO_PCI_COMMON_CONFIG_ID};
pub use pci_device::{VirtioPciDevice, VirtioPciDeviceActivator, VirtioPciDeviceError};
pub trait VirtioTransport {
fn ioeventfds(&self, base_addr: u64) -> impl Iterator<Item = (&EventFd, u64)>;
}