2019-02-21 16:04:44 +00:00
|
|
|
[package]
|
|
|
|
authors = ["The Cloud Hypervisor Authors"]
|
2020-02-13 05:11:03 +00:00
|
|
|
build = "build.rs"
|
2024-05-08 08:56:31 +00:00
|
|
|
default-run = "cloud-hypervisor"
|
2024-06-05 03:09:05 +00:00
|
|
|
description = "Open source Virtual Machine Monitor (VMM) that runs on top of KVM & MSHV"
|
2024-05-08 08:56:31 +00:00
|
|
|
edition = "2021"
|
2020-08-09 09:39:31 +00:00
|
|
|
homepage = "https://github.com/cloud-hypervisor/cloud-hypervisor"
|
2024-06-25 14:56:50 +00:00
|
|
|
license = "Apache-2.0 AND BSD-3-Clause"
|
2024-05-08 08:56:31 +00:00
|
|
|
name = "cloud-hypervisor"
|
2024-08-15 13:56:22 +00:00
|
|
|
version = "41.0.0"
|
2022-02-23 11:53:19 +00:00
|
|
|
# Minimum buildable version:
|
|
|
|
# Keep in sync with version in .github/workflows/build.yaml
|
2022-11-29 16:04:10 +00:00
|
|
|
# Policy on MSRV (see #4318):
|
|
|
|
# Can only be bumped by:
|
2023-02-23 20:35:29 +00:00
|
|
|
# a.) A dependency requires it,
|
2022-11-29 16:04:10 +00:00
|
|
|
# b.) If we want to use a new feature and that MSRV is at least 6 months old,
|
|
|
|
# c.) There is a security issue that is addressed by the toolchain update.
|
2024-05-07 10:42:51 +00:00
|
|
|
rust-version = "1.77.0"
|
2019-02-21 16:04:44 +00:00
|
|
|
|
2020-06-17 17:15:52 +00:00
|
|
|
[profile.release]
|
2022-08-11 11:35:26 +00:00
|
|
|
codegen-units = 1
|
2024-05-08 08:56:31 +00:00
|
|
|
lto = true
|
2022-08-11 11:35:26 +00:00
|
|
|
opt-level = "s"
|
2022-11-20 11:02:41 +00:00
|
|
|
strip = true
|
2020-06-17 17:15:52 +00:00
|
|
|
|
2023-01-17 12:52:20 +00:00
|
|
|
[profile.profiling]
|
2024-05-08 08:56:31 +00:00
|
|
|
debug = true
|
2023-01-17 12:52:20 +00:00
|
|
|
inherits = "release"
|
|
|
|
strip = false
|
|
|
|
|
2019-02-21 16:04:44 +00:00
|
|
|
[dependencies]
|
2024-09-09 23:21:09 +00:00
|
|
|
anyhow = "1.0.87"
|
2020-10-23 10:20:37 +00:00
|
|
|
api_client = { path = "api_client" }
|
2024-08-19 23:10:10 +00:00
|
|
|
clap = { version = "4.5.13", features = ["string"] }
|
2024-02-12 23:50:24 +00:00
|
|
|
dhat = { version = "0.3.3", optional = true }
|
2023-07-04 23:04:49 +00:00
|
|
|
epoll = "4.3.3"
|
2021-02-17 11:19:39 +00:00
|
|
|
event_monitor = { path = "event_monitor" }
|
2020-06-08 00:50:38 +00:00
|
|
|
hypervisor = { path = "hypervisor" }
|
2024-09-05 23:17:26 +00:00
|
|
|
libc = "0.2.158"
|
2024-07-15 23:26:18 +00:00
|
|
|
log = { version = "0.4.22", features = ["std"] }
|
2020-09-08 14:51:00 +00:00
|
|
|
option_parser = { path = "option_parser" }
|
2024-09-27 02:27:43 +00:00
|
|
|
seccompiler = { workspace = true }
|
2024-07-24 23:42:39 +00:00
|
|
|
serde_json = "1.0.120"
|
2023-08-01 23:45:19 +00:00
|
|
|
signal-hook = "0.3.17"
|
2024-07-16 23:17:07 +00:00
|
|
|
thiserror = "1.0.62"
|
2024-05-08 08:56:31 +00:00
|
|
|
tpm = { path = "tpm" }
|
2022-06-21 14:01:26 +00:00
|
|
|
tracer = { path = "tracer" }
|
2024-09-27 02:27:43 +00:00
|
|
|
vm-memory = { workspace = true }
|
2019-06-03 14:40:09 +00:00
|
|
|
vmm = { path = "vmm" }
|
2024-09-27 02:27:43 +00:00
|
|
|
vmm-sys-util = { workspace = true }
|
2024-10-01 23:26:53 +00:00
|
|
|
zbus = { version = "4.4.0", optional = true }
|
2019-05-23 15:45:13 +00:00
|
|
|
|
|
|
|
[dev-dependencies]
|
2024-04-06 07:47:54 +00:00
|
|
|
dirs = "5.0.1"
|
2020-05-15 09:19:51 +00:00
|
|
|
net_util = { path = "net_util" }
|
2024-10-07 13:21:51 +00:00
|
|
|
once_cell = "1.20.2"
|
2024-07-24 23:42:39 +00:00
|
|
|
serde_json = "1.0.120"
|
2021-03-23 16:15:48 +00:00
|
|
|
test_infra = { path = "test_infra" }
|
2021-02-22 15:48:16 +00:00
|
|
|
wait-timeout = "0.2.0"
|
2019-05-23 15:45:13 +00:00
|
|
|
|
2023-10-04 18:20:34 +00:00
|
|
|
# Please adjust `vmm::feature_list()` accordingly when changing the
|
|
|
|
# feature list below
|
2019-05-23 15:45:13 +00:00
|
|
|
[features]
|
2024-06-18 14:22:36 +00:00
|
|
|
dbus_api = ["vmm/dbus_api", "zbus"]
|
|
|
|
default = ["io_uring", "kvm"]
|
2024-05-08 08:56:31 +00:00
|
|
|
dhat-heap = ["dhat", "vmm/dhat-heap"] # For heap profiling
|
2022-05-10 11:21:02 +00:00
|
|
|
guest_debug = ["vmm/guest_debug"]
|
2024-06-18 14:22:36 +00:00
|
|
|
igvm = ["mshv", "vmm/igvm"]
|
2023-07-10 09:55:55 +00:00
|
|
|
io_uring = ["vmm/io_uring"]
|
2020-07-07 11:06:40 +00:00
|
|
|
kvm = ["vmm/kvm"]
|
2020-12-03 22:14:04 +00:00
|
|
|
mshv = ["vmm/mshv"]
|
devices: Add pvmemcontrol device
Pvmemcontrol provides a way for the guest to control its physical memory
properties, and enables optimizations and security features. For
example, the guest can provide information to the host where parts of a
hugepage may be unbacked, or sensitive data may not be swapped out, etc.
Pvmemcontrol allows guests to manipulate its gPTE entries in the SLAT,
and also some other properties of the memory map the back's host memory.
This is achieved by using the KVM_CAP_SYNC_MMU capability. When this
capability is available, the changes in the backing of the memory region
on the host are automatically reflected into the guest. For example, an
mmap() or madvise() that affects the region will be made visible
immediately.
There are two components of the implementation: the guest Linux driver
and Virtual Machine Monitor (VMM) device. A guest-allocated shared
buffer is negotiated per-cpu through a few PCI MMIO registers, the VMM
device assigns a unique command for each per-cpu buffer. The guest
writes its pvmemcontrol request in the per-cpu buffer, then writes the
corresponding command into the command register, calling into the VMM
device to perform the pvmemcontrol request.
The synchronous per-cpu shared buffer approach avoids the kick and busy
waiting that the guest would have to do with virtio virtqueue transport.
The Cloud Hypervisor component can be enabled with --pvmemcontrol.
Co-developed-by: Stanko Novakovic <stanko@google.com>
Co-developed-by: Pasha Tatashin <tatashin@google.com>
Signed-off-by: Yuanchu Xie <yuanchu@google.com>
2023-10-25 22:46:47 +00:00
|
|
|
pvmemcontrol = ["vmm/pvmemcontrol"]
|
2024-06-18 14:22:36 +00:00
|
|
|
sev_snp = ["igvm", "mshv", "vmm/sev_snp"]
|
2021-02-03 10:02:18 +00:00
|
|
|
tdx = ["vmm/tdx"]
|
2024-06-18 14:22:36 +00:00
|
|
|
tracing = ["tracer/tracing", "vmm/tracing"]
|
2019-05-23 15:45:13 +00:00
|
|
|
|
2019-07-16 09:54:33 +00:00
|
|
|
[workspace]
|
2019-09-26 11:32:24 +00:00
|
|
|
members = [
|
2024-05-08 08:56:31 +00:00
|
|
|
"api_client",
|
|
|
|
"arch",
|
|
|
|
"block",
|
|
|
|
"devices",
|
|
|
|
"event_monitor",
|
|
|
|
"hypervisor",
|
|
|
|
"net_gen",
|
|
|
|
"net_util",
|
|
|
|
"option_parser",
|
|
|
|
"pci",
|
|
|
|
"performance-metrics",
|
|
|
|
"rate_limiter",
|
|
|
|
"serial_buffer",
|
|
|
|
"test_infra",
|
|
|
|
"tracer",
|
|
|
|
"vhost_user_block",
|
|
|
|
"vhost_user_net",
|
|
|
|
"virtio-devices",
|
|
|
|
"vm-allocator",
|
|
|
|
"vm-device",
|
|
|
|
"vm-migration",
|
|
|
|
"vm-virtio",
|
2024-06-18 14:22:36 +00:00
|
|
|
"vmm",
|
2019-09-26 11:32:24 +00:00
|
|
|
]
|
2024-09-27 02:27:43 +00:00
|
|
|
|
|
|
|
[workspace.dependencies]
|
|
|
|
acpi_tables = { git = "https://github.com/rust-vmm/acpi_tables", branch = "main" }
|
|
|
|
kvm-bindings = "0.9.1"
|
|
|
|
kvm-ioctls = "0.18.0"
|
|
|
|
linux-loader = "0.12.0"
|
|
|
|
mshv-bindings = { git = "https://github.com/rust-vmm/mshv", tag = "v0.3.0" }
|
|
|
|
mshv-ioctls = { git = "https://github.com/rust-vmm/mshv", tag = "v0.3.0" }
|
|
|
|
seccompiler = "0.4.0"
|
|
|
|
vfio-bindings = { git = "https://github.com/rust-vmm/vfio", branch = "main" }
|
2024-10-01 03:31:45 +00:00
|
|
|
vfio-ioctls = { git = "https://github.com/rust-vmm/vfio", branch = "main", default-features = false }
|
2024-09-27 02:27:43 +00:00
|
|
|
vfio_user = { git = "https://github.com/rust-vmm/vfio-user", branch = "main" }
|
|
|
|
vhost = "0.12.0"
|
|
|
|
virtio-bindings = "0.2.2"
|
|
|
|
virtio-queue = "0.13.0"
|
|
|
|
vm-fdt = { git = "https://github.com/rust-vmm/vm-fdt", branch = "main" }
|
|
|
|
vm-memory = "0.15.0"
|
|
|
|
vmm-sys-util = "0.12.1"
|