From 8bb4faa6629a4d8c10d58ed9397f867b6da5c91f Mon Sep 17 00:00:00 2001 From: Xiong Zhang Date: Tue, 12 Nov 2019 10:06:13 +0800 Subject: Vfio: Multi vfio device support Current one vm could have one vfio device only, this patch let one vm could have multi vfio devices by changing the vfio parameter into vec<>. BUG=chromium:992270 TEST=passthrough two/three devices into guest, these devices are in the same vfio group, then check these devices function in guest. Change-Id: I366d24d750a199d7862fb907fa44f9be429c5944 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2080111 Reviewed-by: Tomasz Jeznach Tested-by: kokoro Commit-Queue: Tomasz Jeznach --- src/crosvm.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/crosvm.rs') diff --git a/src/crosvm.rs b/src/crosvm.rs index 2eead30..b3a9233 100644 --- a/src/crosvm.rs +++ b/src/crosvm.rs @@ -202,7 +202,7 @@ pub struct Config { pub virtio_keyboard: Option, pub virtio_input_evdevs: Vec, pub split_irqchip: bool, - pub vfio: Option, + pub vfio: Vec, } impl Default for Config { @@ -251,7 +251,7 @@ impl Default for Config { virtio_keyboard: None, virtio_input_evdevs: Vec::new(), split_irqchip: false, - vfio: None, + vfio: Vec::new(), } } } -- cgit 1.4.1