mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2024-11-25 13:23:08 +00:00
9628f61e71
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Ⓜ️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>
45 lines
1.4 KiB
TOML
45 lines
1.4 KiB
TOML
[package]
|
|
name = "devices"
|
|
version = "0.1.0"
|
|
authors = ["The Chromium OS Authors"]
|
|
edition = "2018"
|
|
|
|
[features]
|
|
gpu = ["gpu_buffer", "gpu_display", "gpu_renderer"]
|
|
sandboxed-libusb = ["usb_util/sandboxed-libusb"]
|
|
tpm = ["protos/trunks", "tpm2"]
|
|
wl-dmabuf = []
|
|
x = ["gpu_display/x"]
|
|
|
|
[dependencies]
|
|
audio_streams = "*"
|
|
bit_field = { path = "../bit_field" }
|
|
data_model = { path = "../data_model" }
|
|
disk = { path = "../disk" }
|
|
enumn = { path = "../enumn" }
|
|
gpu_buffer = { path = "../gpu_buffer", optional = true }
|
|
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" }
|
|
net_sys = { path = "../net_sys" }
|
|
net_util = { path = "../net_util" }
|
|
p9 = { path = "../p9" }
|
|
protos = { path = "../protos", optional = true }
|
|
remain = "*"
|
|
resources = { path = "../resources" }
|
|
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" }
|
|
|
|
[dev-dependencies]
|
|
tempfile = { path = "../tempfile" }
|