mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2024-11-25 05:03:05 +00:00
dea7dbb082
One vm may have one vfio kvm file only, it could be created at vm setup or runtime through vfio-pci hotplug, make it as global to satisfy these two cases. When vfio pci device is removed throgh hotplug out, the vfio group will be removed frome vfio kvm file also, so move it into vfio.rs, so it is could be referenced at vfio group's destroy. And vfio group's destroy is called from vcpu thread, while vfio kvm file is created in main thread, so use OnceCall instead of thread_local. BUG=b:185084350 TEST=Boot a vm with or without passthrough device Change-Id: I780c43a0ac0265f1e6f62578e134d09cbefc3e2f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3062741 Reviewed-by: Daniel Verkamp <dverkamp@chromium.org> Tested-by: kokoro <noreply+kokoro@google.com> Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
68 lines
1.9 KiB
TOML
68 lines
1.9 KiB
TOML
[package]
|
|
name = "devices"
|
|
version = "0.1.0"
|
|
authors = ["The Chromium OS Authors"]
|
|
edition = "2018"
|
|
|
|
[features]
|
|
audio = []
|
|
audio_cras = ["libcras"]
|
|
direct = []
|
|
gpu = ["gpu_display","rutabaga_gfx"]
|
|
tpm = ["tpm2"]
|
|
usb = []
|
|
video-decoder = ["libvda"]
|
|
video-encoder = ["libvda"]
|
|
minigbm = ["rutabaga_gfx/minigbm"]
|
|
x = ["gpu_display/x"]
|
|
virgl_renderer = ["gpu", "rutabaga_gfx/virgl_renderer"]
|
|
gfxstream = ["gpu", "rutabaga_gfx/gfxstream"]
|
|
|
|
[dependencies]
|
|
acpi_tables = {path = "../acpi_tables" }
|
|
audio_streams = "*"
|
|
base = { path = "../base" }
|
|
bit_field = { path = "../bit_field" }
|
|
cros_async = { path = "../cros_async" }
|
|
data_model = { path = "../data_model" }
|
|
disk = { path = "../disk" }
|
|
enumn = { path = "../enumn" }
|
|
fuse = {path = "../fuse" }
|
|
gpu_display = { path = "../gpu_display", optional = true }
|
|
rutabaga_gfx = { path = "../rutabaga_gfx", optional = true }
|
|
hypervisor = { path = "../hypervisor" }
|
|
kvm_sys = { path = "../kvm_sys" }
|
|
libc = "*"
|
|
libcras = { version = "*", optional = true }
|
|
libvda = { path = "../libvda", optional = true }
|
|
linux_input_sys = { path = "../linux_input_sys" }
|
|
minijail = "*"
|
|
net_sys = { path = "../net_sys" }
|
|
net_util = { path = "../net_util" }
|
|
once_cell = "1.7.2"
|
|
p9 = "*"
|
|
power_monitor = { path = "../power_monitor" }
|
|
protos = { path = "../protos", optional = true }
|
|
remain = "*"
|
|
resources = { path = "../resources" }
|
|
serde = { version = "1", features = [ "derive" ] }
|
|
smallvec = "1.6.1"
|
|
sync = { path = "../sync" }
|
|
sys_util = { path = "../sys_util" }
|
|
thiserror = "1.0.20"
|
|
tpm2 = { path = "../tpm2", optional = true }
|
|
usb_util = { path = "../usb_util" }
|
|
vfio_sys = { path = "../vfio_sys" }
|
|
vhost = { path = "../vhost" }
|
|
vmm_vhost = { version = "*", features = ["vhost-user-master"] }
|
|
virtio_sys = { path = "../virtio_sys" }
|
|
vm_control = { path = "../vm_control" }
|
|
vm_memory = { path = "../vm_memory" }
|
|
|
|
[dependencies.futures]
|
|
version = "*"
|
|
features = ["std"]
|
|
default-features = false
|
|
|
|
[dev-dependencies]
|
|
tempfile = { path = "../tempfile" }
|