diff options
author | Xiong Zhang <xiong.y.zhang@intel.corp-partner.google.com> | 2019-04-23 17:14:43 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-09-18 17:23:59 +0000 |
commit | 9628f61e7125bb6ee2ae921756af185d83a9c2aa (patch) | |
tree | b1c859fe8c635dd75ca78ed883da5c9dc9d6a79a /devices/Cargo.toml | |
parent | 36cc5092fc6237ddbd1e63b8d2bc7c1460ea3041 (diff) | |
download | crosvm-9628f61e7125bb6ee2ae921756af185d83a9c2aa.tar crosvm-9628f61e7125bb6ee2ae921756af185d83a9c2aa.tar.gz crosvm-9628f61e7125bb6ee2ae921756af185d83a9c2aa.tar.bz2 crosvm-9628f61e7125bb6ee2ae921756af185d83a9c2aa.tar.lz crosvm-9628f61e7125bb6ee2ae921756af185d83a9c2aa.tar.xz crosvm-9628f61e7125bb6ee2ae921756af185d83a9c2aa.tar.zst crosvm-9628f61e7125bb6ee2ae921756af185d83a9c2aa.zip |
vfio: Implement PciDevice Trait for vfio device
According to kernel Documents/vfio.txt and Documents/vfio-mediated-device.txt,user pass host assigned device or mdev to crosvm through --vfio parameter, vfio module open this device and get this device's information. Implement PciDevice trait on this device, then vfio_pci module could trap guest pci cfg r/w and mmio r/w, and transfer this operation into kernel vfio. Currently the relationship of vfio container:group:device are 1:1:1, in the future it could extend to 1:m:n. BUG=chromium:992270 TEST=none Change-Id: I8006ef65022d56197eaeb464811a59db2ce54b9a Signed-off-by: Xiong Zhang <xiong.y.zhang@intel.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/1580458 Reviewed-by: Zach Reizner <zachr@chromium.org> Reviewed-by: Daniel Verkamp <dverkamp@chromium.org> Tested-by: kokoro <noreply+kokoro@google.com> Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Diffstat (limited to 'devices/Cargo.toml')
-rw-r--r-- | devices/Cargo.toml | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/devices/Cargo.toml b/devices/Cargo.toml index 8a91a4e..2ddfcd0 100644 --- a/devices/Cargo.toml +++ b/devices/Cargo.toml @@ -22,6 +22,7 @@ gpu_display = { path = "../gpu_display", optional = true } gpu_renderer = { path = "../gpu_renderer", optional = true } io_jail = { path = "../io_jail" } kvm = { path = "../kvm" } +kvm_sys = { path = "../kvm_sys" } libc = "*" msg_on_socket_derive = { path = "../msg_socket/msg_on_socket_derive" } msg_socket = { path = "../msg_socket" } @@ -35,6 +36,7 @@ sync = { path = "../sync" } sys_util = { path = "../sys_util" } tpm2 = { path = "../tpm2", optional = true } usb_util = { path = "../usb_util" } +vfio_sys = { path = "../vfio_sys" } vhost = { path = "../vhost" } virtio_sys = { path = "../virtio_sys" } vm_control = { path = "../vm_control" } |