mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vm-virtio: Add PCI transport support
Copied from crosvm 107edb3e with one main modification: VirtioPciDevice implements BusDevice. We need this modification because it is the only way for us to be able to add a VirtioPciDevice to the MMIO bus. Bus insertion takes a BusDevice. The fact that VirtioPciDevice implements PciDevice which itself implements BusDevice does not mean that Rust will automatically downcast a VirtioPciDevice into a BusDevice. crosvm works around that issue by having the PCI, virtio and BusDevice implementations in the same crate. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:
@@ -20,20 +20,17 @@ use std::io;
|
||||
mod device;
|
||||
mod queue;
|
||||
|
||||
pub mod transport;
|
||||
|
||||
pub use self::device::*;
|
||||
pub use self::queue::*;
|
||||
|
||||
#[allow(dead_code)]
|
||||
const DEVICE_INIT: u32 = 0x00;
|
||||
#[allow(dead_code)]
|
||||
const DEVICE_ACKNOWLEDGE: u32 = 0x01;
|
||||
#[allow(dead_code)]
|
||||
const DEVICE_DRIVER: u32 = 0x02;
|
||||
#[allow(dead_code)]
|
||||
const DEVICE_DRIVER_OK: u32 = 0x04;
|
||||
#[allow(dead_code)]
|
||||
const DEVICE_FEATURES_OK: u32 = 0x08;
|
||||
#[allow(dead_code)]
|
||||
const DEVICE_FAILED: u32 = 0x80;
|
||||
|
||||
#[allow(dead_code)]
|
||||
|
||||
Reference in New Issue
Block a user