diff options
author | Daniel Verkamp <dverkamp@chromium.org> | 2018-10-18 16:45:13 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-10-19 15:07:43 -0700 |
commit | 8eceba31c0d2842d8d7bfaa84253121709b1ee81 (patch) | |
tree | 35de26e27c5e5a9f91bbdad3ee0ca34f6f1f5b99 /x86_64 | |
parent | f02fdd1f663760fc884073ea74fffb39a3f4ea4c (diff) | |
download | crosvm-8eceba31c0d2842d8d7bfaa84253121709b1ee81.tar crosvm-8eceba31c0d2842d8d7bfaa84253121709b1ee81.tar.gz crosvm-8eceba31c0d2842d8d7bfaa84253121709b1ee81.tar.bz2 crosvm-8eceba31c0d2842d8d7bfaa84253121709b1ee81.tar.lz crosvm-8eceba31c0d2842d8d7bfaa84253121709b1ee81.tar.xz crosvm-8eceba31c0d2842d8d7bfaa84253121709b1ee81.tar.zst crosvm-8eceba31c0d2842d8d7bfaa84253121709b1ee81.zip |
devices: make PCI work in --disable-sandbox mode
Make the Minijail part of the PCI device tuple optional so that an empty jail is not created for --disable-sandbox. BUG=None TEST=Boot crosvm in both --multiprocess and --disable-sandbox modes Change-Id: Ibb3f2dbf33ca19910ee7448ea823b2772e09ecc5 Signed-off-by: Daniel Verkamp <dverkamp@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1290289 Reviewed-by: Dylan Reid <dgreid@chromium.org>
Diffstat (limited to 'x86_64')
-rw-r--r-- | x86_64/src/lib.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/x86_64/src/lib.rs b/x86_64/src/lib.rs index ba32022..700ba75 100644 --- a/x86_64/src/lib.rs +++ b/x86_64/src/lib.rs @@ -263,7 +263,8 @@ fn arch_memory_regions(size: u64) -> Vec<(GuestAddress, u64)> { impl arch::LinuxArch for X8664arch { fn build_vm<F>(mut components: VmComponents, virtio_devs: F) -> Result<RunnableLinuxVm> where - F: FnOnce(&GuestMemory, &EventFd) -> Result<Vec<(Box<PciDevice + 'static>, Minijail)>>, + F: FnOnce(&GuestMemory, &EventFd) + -> Result<Vec<(Box<PciDevice + 'static>, Option<Minijail>)>>, { let mut resources = Self::get_resource_allocator(components.memory_mb, components.wayland_dmabuf); |