summary refs log tree commit diff
path: root/arch
diff options
context:
space:
mode:
authorDaniel Verkamp <dverkamp@chromium.org>2018-09-24 15:00:36 -0700
committerchrome-bot <chrome-bot@chromium.org>2018-10-02 09:17:25 -0700
commitd635acbaf348c0863bc05b8f889b2fa5f8156aaa (patch)
tree02319a17d31193be6f28663570cab51ec7be2f9f /arch
parenta158e310380bfcbb63fa5015d01c58fc0f0731da (diff)
downloadcrosvm-d635acbaf348c0863bc05b8f889b2fa5f8156aaa.tar
crosvm-d635acbaf348c0863bc05b8f889b2fa5f8156aaa.tar.gz
crosvm-d635acbaf348c0863bc05b8f889b2fa5f8156aaa.tar.bz2
crosvm-d635acbaf348c0863bc05b8f889b2fa5f8156aaa.tar.lz
crosvm-d635acbaf348c0863bc05b8f889b2fa5f8156aaa.tar.xz
crosvm-d635acbaf348c0863bc05b8f889b2fa5f8156aaa.tar.zst
crosvm-d635acbaf348c0863bc05b8f889b2fa5f8156aaa.zip
linux: Convert all virtio devices to PCI
Change the main create_virtio_devs() function to create virtio devices
using the PCI transport rather than MMIO.

BUG=chromium:854766
TEST=Boot crosvm and verify that all virtio devices still work

Change-Id: I9a6e60b21edea1e5ac2b3ae5c91793d45cf5063a
Signed-off-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1241541
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/src/lib.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/src/lib.rs b/arch/src/lib.rs
index f83e404..08e1ac5 100644
--- a/arch/src/lib.rs
+++ b/arch/src/lib.rs
@@ -29,7 +29,6 @@ pub type Result<T> = result::Result<T, Box<std::error::Error>>;
 /// Holds the pieces needed to build a VM. Passed to `build_vm` in the `LinuxArch` trait below to
 /// create a `RunnableLinuxVm`.
 pub struct VmComponents {
-    pub pci_devices: Vec<(Box<PciDevice + 'static>,  Minijail)>,
     pub memory_mb: u64,
     pub vcpu_count: u32,
     pub kernel_image: File,
@@ -67,7 +66,7 @@ pub trait LinuxArch {
     /// * `virtio_devs` - Function to generate a list of virtio devices.
     fn build_vm<F>(components: VmComponents, virtio_devs: F) -> Result<RunnableLinuxVm>
         where
-            F: FnOnce(&GuestMemory, &EventFd) -> Result<Vec<VirtioDeviceStub>>;
+            F: FnOnce(&GuestMemory, &EventFd) -> Result<Vec<(Box<PciDevice + 'static>, Minijail)>>;
 }
 
 /// Errors for device manager.