Compare commits

...

7 Commits
main ... v28.1

Author SHA1 Message Date
Bo Chen
52605cc0e4 build: Release v28.1 (bug fix release)
Signed-off-by: Bo Chen <chen.bo@intel.com>
2022-12-13 13:02:57 -08:00
Rob Bradford
92beda1e32 README: Use consistent path to cloud-hypervisor binary
Signed-off-by: Rob Bradford <robert.bradford@intel.com>
(cherry picked from commit 00becda899)
Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2022-12-13 15:12:40 +00:00
Bo Chen
167fef382a net_util: queue_pair: Avoid integer overflow
This integer overflow was triggered with fuzzing on the virtio-net
device. The integer overflow is from the wrong assumption that the
packets read from or written to the tap device is always larger than the
size of a virtio-net header.

Signed-off-by: Bo Chen <chen.bo@intel.com>
(cherry picked from commit 559faa272a)
Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2022-12-13 15:12:40 +00:00
Yuji Hagiwara
5126e9b26e docs: Fix a typo on the doc for tpm
swtpm accepts --tpmstate option

Signed-off-by: Yuji Hagiwara <yuuzi41@gmail.com>
(cherry picked from commit 47a7ebe434)
Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2022-12-13 15:12:40 +00:00
Bo Chen
59bd682b1f net_util: queue_pair: Avoid panic and handle error properly
This panic was triggered with fuzzing on the virtio-net device. This
commits handles the error explicitly to avoid the panic, which also
makes the fuzzer happy (as panic is treated as bugs).

Signed-off-by: Bo Chen <chen.bo@intel.com>
(cherry picked from commit 4d9a2b17a7)
Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2022-12-13 15:12:40 +00:00
Rob Bradford
8e3b351038 arch: x86_64: Use host cpuid information for L2 cache for older KVM
If the KVM version is too old (pre Linux 5.7) then fetch the CPUID
information from the host and use that in the guest. We prefer the KVM
version over the host version as that would use the CPUID for the
running CPU vs the CPU that runs this code which might be different due
to a hybrid topology.

Fixes: #4918

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
(cherry picked from commit 7c3110e6d5)
Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2022-12-13 15:12:40 +00:00
Rob Bradford
3f8d06b47e build: Update dependencies in v28.x stable branch
Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2022-12-13 14:29:22 +00:00
37 changed files with 361 additions and 361 deletions

245
Cargo.lock generated
View File

@@ -11,9 +11,9 @@ dependencies = [
[[package]] [[package]]
name = "aho-corasick" name = "aho-corasick"
version = "0.7.19" version = "0.7.20"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b4f55bd91a0978cbfd91c457a164bab8b4001c833b7f323132c0a4e1922dd44e" checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac"
dependencies = [ dependencies = [
"memchr", "memchr",
] ]
@@ -59,17 +59,6 @@ dependencies = [
"vmm-sys-util", "vmm-sys-util",
] ]
[[package]]
name = "atty"
version = "0.2.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8"
dependencies = [
"hermit-abi",
"libc",
"winapi",
]
[[package]] [[package]]
name = "autocfg" name = "autocfg"
version = "1.1.0" version = "1.1.0"
@@ -118,9 +107,9 @@ checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610"
[[package]] [[package]]
name = "cc" name = "cc"
version = "1.0.73" version = "1.0.77"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11" checksum = "e9f73505338f7d905b19d18738976aae232eb46b8efc15554ffc56deb5d9ebe4"
[[package]] [[package]]
name = "cfg-if" name = "cfg-if"
@@ -130,13 +119,13 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]] [[package]]
name = "clap" name = "clap"
version = "4.0.18" version = "4.0.29"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "335867764ed2de42325fafe6d18b8af74ba97ee0c590fa016f157535b42ab04b" checksum = "4d63b9e9c07271b9957ad22c173bae2a4d9a81127680962039296abcd2f8251d"
dependencies = [ dependencies = [
"atty",
"bitflags", "bitflags",
"clap_lex", "clap_lex",
"is-terminal",
"once_cell", "once_cell",
"strsim", "strsim",
"termcolor", "termcolor",
@@ -154,7 +143,7 @@ dependencies = [
[[package]] [[package]]
name = "cloud-hypervisor" name = "cloud-hypervisor"
version = "28.0.0" version = "28.1.0"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"api_client", "api_client",
@@ -276,12 +265,12 @@ dependencies = [
[[package]] [[package]]
name = "env_logger" name = "env_logger"
version = "0.9.3" version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a12e6657c4c97ebab115a42dcee77225f7f482cdd841cf7088c657a42e9e00e7" checksum = "85cdab6a89accf66733ad5a1693a4dcced6aeff64602b634530dd73c1f3ee9f0"
dependencies = [ dependencies = [
"atty",
"humantime", "humantime",
"is-terminal",
"log", "log",
"regex", "regex",
"termcolor", "termcolor",
@@ -365,9 +354,9 @@ dependencies = [
[[package]] [[package]]
name = "getrandom" name = "getrandom"
version = "0.2.7" version = "0.2.8"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4eb1a864a501629691edf6c15a593b7a51eebaa1e8468e9ddc623de7c9b58ec6" checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31"
dependencies = [ dependencies = [
"cfg-if", "cfg-if",
"libc", "libc",
@@ -382,9 +371,9 @@ checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574"
[[package]] [[package]]
name = "hermit-abi" name = "hermit-abi"
version = "0.1.20" version = "0.2.6"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c7a30908dbce072eca83216eab939d2290080e00ca71611b96a09e5cdce5f3fa" checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7"
dependencies = [ dependencies = [
"libc", "libc",
] ]
@@ -444,15 +433,19 @@ dependencies = [
[[package]] [[package]]
name = "io-lifetimes" name = "io-lifetimes"
version = "0.7.4" version = "1.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e6e481ccbe3dea62107216d0d1138bb8ad8e5e5c43009a098bd1990272c497b0" checksum = "46112a93252b123d31a119a8d1a1ac19deac4fac6e0e8b0df58f0d4e5870e63c"
dependencies = [
"libc",
"windows-sys",
]
[[package]] [[package]]
name = "io-uring" name = "io-uring"
version = "0.5.8" version = "0.5.9"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "00d78c9f2db2a9800dfd15c69543896dae2135112dde0d1944442e83da8ce23a" checksum = "7ba34abb5175052fc1a2227a10d2275b7386c9990167de9786c0b88d8b062330"
dependencies = [ dependencies = [
"bitflags", "bitflags",
"libc", "libc",
@@ -467,6 +460,18 @@ dependencies = [
"serde", "serde",
] ]
[[package]]
name = "is-terminal"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "927609f78c2913a6f6ac3c27a4fe87f43e2a35367c0c4b0f8265e8f49a104330"
dependencies = [
"hermit-abi",
"io-lifetimes",
"rustix",
"windows-sys",
]
[[package]] [[package]]
name = "itoa" name = "itoa"
version = "1.0.4" version = "1.0.4"
@@ -475,8 +480,8 @@ checksum = "4217ad341ebadf8d8e724e264f13e593e0648f5b3e94b3896a5df283be015ecc"
[[package]] [[package]]
name = "kvm-bindings" name = "kvm-bindings"
version = "0.5.0" version = "0.6.0"
source = "git+https://github.com/cloud-hypervisor/kvm-bindings?branch=ch-v0.5.0-tdx#52e56d0e8ef0f6ea32fc0492e6a175b73617a49f" source = "git+https://github.com/cloud-hypervisor/kvm-bindings?branch=ch-v0.6.0-tdx#7d9ffb47e5b9b1989577258800a0f57c93f1445f"
dependencies = [ dependencies = [
"serde", "serde",
"serde_derive", "serde_derive",
@@ -485,8 +490,9 @@ dependencies = [
[[package]] [[package]]
name = "kvm-ioctls" name = "kvm-ioctls"
version = "0.11.0" version = "0.12.0"
source = "git+https://github.com/rust-vmm/kvm-ioctls?branch=main#e6739aeebcc56dfea62216b2cc4cddd13d0a1182" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c3a321cabd827642499c77e27314f388dd83a717a5ca716b86476fb947f73ae4"
dependencies = [ dependencies = [
"kvm-bindings", "kvm-bindings",
"libc", "libc",
@@ -501,9 +507,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
[[package]] [[package]]
name = "libc" name = "libc"
version = "0.2.137" version = "0.2.138"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fc7fcc620a3bff7cdd7a365be3376c97191aeaccc2a603e600951e452615bf89" checksum = "db6d7e329c562c5dfab7a46a2afabc8b987ab9a4834c9d1ca04dc54c1546cef8"
[[package]] [[package]]
name = "libssh2-sys" name = "libssh2-sys"
@@ -533,18 +539,18 @@ dependencies = [
[[package]] [[package]]
name = "linux-loader" name = "linux-loader"
version = "0.7.0" version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f8242360c7d79a7713a28043c994b815e9820b0e97e44b228ec9bd913c16bdfe" checksum = "b9259ddbfbb52cc918f6bbc60390004ddd0228cf1d85f402009ff2b3d95de83f"
dependencies = [ dependencies = [
"vm-memory", "vm-memory",
] ]
[[package]] [[package]]
name = "linux-raw-sys" name = "linux-raw-sys"
version = "0.0.46" version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d4d2456c373231a208ad294c33dc5bff30051eafd954cd4caae83a712b12854d" checksum = "8f9f08d8963a6c613f4b1a78f4f4a4dbfadf8e6545b2d72861731e4858b8b47f"
[[package]] [[package]]
name = "lock_api" name = "lock_api"
@@ -580,7 +586,7 @@ checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d"
[[package]] [[package]]
name = "micro_http" name = "micro_http"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/firecracker-microvm/micro-http?branch=main#863b0370ba7e57f7df5b908ada9e5b44809ccae9" source = "git+https://github.com/firecracker-microvm/micro-http?branch=main#4b18a043e997da5b5f679e3defc279fec908753e"
dependencies = [ dependencies = [
"libc", "libc",
"vmm-sys-util", "vmm-sys-util",
@@ -589,7 +595,7 @@ dependencies = [
[[package]] [[package]]
name = "mshv-bindings" name = "mshv-bindings"
version = "0.1.1" version = "0.1.1"
source = "git+https://github.com/rust-vmm/mshv?branch=main#1a9ca01801e78f8ddc2630660cbab3bc3300e39e" source = "git+https://github.com/rust-vmm/mshv?branch=main#10d0c5208cc41a3958e0fd31fabf2c88b18a97b5"
dependencies = [ dependencies = [
"libc", "libc",
"serde", "serde",
@@ -601,7 +607,7 @@ dependencies = [
[[package]] [[package]]
name = "mshv-ioctls" name = "mshv-ioctls"
version = "0.1.1" version = "0.1.1"
source = "git+https://github.com/rust-vmm/mshv?branch=main#1a9ca01801e78f8ddc2630660cbab3bc3300e39e" source = "git+https://github.com/rust-vmm/mshv?branch=main#10d0c5208cc41a3958e0fd31fabf2c88b18a97b5"
dependencies = [ dependencies = [
"libc", "libc",
"mshv-bindings", "mshv-bindings",
@@ -672,9 +678,9 @@ dependencies = [
[[package]] [[package]]
name = "openssl-sys" name = "openssl-sys"
version = "0.9.77" version = "0.9.79"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b03b84c3b2d099b81f0953422b4d4ad58761589d0229b5506356afca05a3670a" checksum = "5454462c0eced1e97f2ec09036abc8da362e66802f66fd20f86854d9d8cbcbc4"
dependencies = [ dependencies = [
"autocfg", "autocfg",
"cc", "cc",
@@ -690,9 +696,9 @@ version = "0.1.0"
[[package]] [[package]]
name = "os_str_bytes" name = "os_str_bytes"
version = "6.3.0" version = "6.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9ff7415e9ae3fff1225851df9e0d9e4e5479f947619774677a63572e55e80eff" checksum = "9b7820b9daea5457c9f21c69448905d723fbd21136ccf521748f23fd49e723ee"
[[package]] [[package]]
name = "parking_lot" name = "parking_lot"
@@ -707,9 +713,9 @@ dependencies = [
[[package]] [[package]]
name = "parking_lot_core" name = "parking_lot_core"
version = "0.8.5" version = "0.8.6"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216" checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc"
dependencies = [ dependencies = [
"cfg-if", "cfg-if",
"instant", "instant",
@@ -721,9 +727,9 @@ dependencies = [
[[package]] [[package]]
name = "paste" name = "paste"
version = "1.0.9" version = "1.0.10"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b1de2e551fb905ac83f73f7aedf2f0cb4a0da7e35efa24a202a936269f1f18e1" checksum = "cf1c2c742266c2f1041c914ba65355a83ae8747b05f208319784083583494b4b"
[[package]] [[package]]
name = "pci" name = "pci"
@@ -973,9 +979,9 @@ dependencies = [
[[package]] [[package]]
name = "regex" name = "regex"
version = "1.6.0" version = "1.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4c4eb3267174b8c6c2f654116623910a0fef09c4753f8dd83db29c48a0df988b" checksum = "e076559ef8e241f2ae3479e36f97bd5741c0330689e217ad51ce2c76808b868a"
dependencies = [ dependencies = [
"aho-corasick", "aho-corasick",
"memchr", "memchr",
@@ -984,9 +990,9 @@ dependencies = [
[[package]] [[package]]
name = "regex-syntax" name = "regex-syntax"
version = "0.6.27" version = "0.6.28"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a3f87b73ce11b1619a3c6332f45341e0047173771e8b8b73f87bfeefb7b56244" checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848"
[[package]] [[package]]
name = "remain" name = "remain"
@@ -1010,16 +1016,16 @@ dependencies = [
[[package]] [[package]]
name = "rustix" name = "rustix"
version = "0.35.12" version = "0.36.5"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "985947f9b6423159c4726323f373be0a21bdb514c5af06a849cb3d2dce2d01e8" checksum = "a3807b5d10909833d3e9acd1eb5fb988f79376ff10fce42937de71a449c4c588"
dependencies = [ dependencies = [
"bitflags", "bitflags",
"errno", "errno",
"io-lifetimes", "io-lifetimes",
"libc", "libc",
"linux-raw-sys", "linux-raw-sys",
"windows-sys 0.36.1", "windows-sys",
] ]
[[package]] [[package]]
@@ -1051,18 +1057,18 @@ checksum = "e25dfac463d778e353db5be2449d1cce89bd6fd23c9f1ea21310ce6e5a1b29c4"
[[package]] [[package]]
name = "serde" name = "serde"
version = "1.0.147" version = "1.0.150"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d193d69bae983fc11a79df82342761dfbf28a99fc8d203dca4c3c1b590948965" checksum = "e326c9ec8042f1b5da33252c8a37e9ffbd2c9bef0155215b6e6c80c790e05f91"
dependencies = [ dependencies = [
"serde_derive", "serde_derive",
] ]
[[package]] [[package]]
name = "serde_derive" name = "serde_derive"
version = "1.0.147" version = "1.0.150"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4f1d362ca8fc9c3e3a7484440752472d68a6caa98f1ab81d99b5dfe517cec852" checksum = "42a3df25b0713732468deadad63ab9da1f1fd75a48a15024b50363f128db627e"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@@ -1071,9 +1077,9 @@ dependencies = [
[[package]] [[package]]
name = "serde_json" name = "serde_json"
version = "1.0.87" version = "1.0.89"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6ce777b7b150d76b9cf60d28b55f5847135a003f7d7350c6be7a773508ce7d45" checksum = "020ff22c755c2ed3f8cf162dbb41a7268d934702f3ed3631656ea597e08fc3db"
dependencies = [ dependencies = [
"itoa", "itoa",
"ryu", "ryu",
@@ -1082,9 +1088,9 @@ dependencies = [
[[package]] [[package]]
name = "serde_with" name = "serde_with"
version = "2.0.1" version = "2.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "368f2d60d049ea019a84dcd6687b0d1e0030fe663ae105039bdf967ed5e6a9a7" checksum = "25bf4a5a814902cd1014dbccfa4d4560fb8432c779471e96e035602519f82eef"
dependencies = [ dependencies = [
"serde", "serde",
"serde_with_macros", "serde_with_macros",
@@ -1092,9 +1098,9 @@ dependencies = [
[[package]] [[package]]
name = "serde_with_macros" name = "serde_with_macros"
version = "2.0.1" version = "2.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1ccadfacf6cf10faad22bbadf55986bdd0856edfb5d9210aa1dcf1f516e84e93" checksum = "e3452b4c0f6c1e357f73fdb87cd1efabaa12acf328c7a528e252893baeb3f4aa"
dependencies = [ dependencies = [
"darling", "darling",
"proc-macro2", "proc-macro2",
@@ -1163,9 +1169,9 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
[[package]] [[package]]
name = "syn" name = "syn"
version = "1.0.103" version = "1.0.105"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a864042229133ada95abf3b54fdc62ef5ccabe9515b64717bcb9a1919e59445d" checksum = "60b9b43d45702de4c839cb9b51d9f529c5dd26a4aff255b42b1ebc03e88ee908"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@@ -1183,12 +1189,12 @@ dependencies = [
[[package]] [[package]]
name = "terminal_size" name = "terminal_size"
version = "0.2.2" version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "40ca90c434fd12083d1a6bdcbe9f92a14f96c8a1ba600ba451734ac334521f7a" checksum = "cb20089a8ba2b69debd491f8d2d023761cbf196e999218c591fa1e7e15a21907"
dependencies = [ dependencies = [
"rustix", "rustix",
"windows-sys 0.42.0", "windows-sys",
] ]
[[package]] [[package]]
@@ -1257,9 +1263,9 @@ checksum = "6ceab39d59e4c9499d4e5a8ee0e2735b891bb7308ac83dfb4e80cad195c9f6f3"
[[package]] [[package]]
name = "uuid" name = "uuid"
version = "1.2.1" version = "1.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "feb41e78f93363bb2df8b0e86a2ca30eed7806ea16ea0c790d757cf93f79be83" checksum = "422ee0de9031b5b948b97a8fc04e3aa35230001a722ddd27943e0be31564ce4c"
dependencies = [ dependencies = [
"getrandom", "getrandom",
] ]
@@ -1272,9 +1278,9 @@ checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426"
[[package]] [[package]]
name = "versionize" name = "versionize"
version = "0.1.6" version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7429cf68de8f091b667d27323ed323afd39584a56d533995b12ddd748e5e6ca9" checksum = "d6e2495726cf917e7ba7ec8bf0f0fceab543dd38d0a4195ed6bef331e38a290f"
dependencies = [ dependencies = [
"bincode", "bincode",
"crc64", "crc64",
@@ -1299,17 +1305,16 @@ dependencies = [
[[package]] [[package]]
name = "vfio-bindings" name = "vfio-bindings"
version = "0.3.1" version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "git+https://github.com/rust-vmm/vfio?branch=main#7ef33f6759ae6d37a54cd66f749aa47c1c81509c"
checksum = "43449b404c488f70507dca193debd4bea361fe8089869b947adc19720e464bce"
dependencies = [ dependencies = [
"vmm-sys-util", "vmm-sys-util",
] ]
[[package]] [[package]]
name = "vfio-ioctls" name = "vfio-ioctls"
version = "0.1.0" version = "0.2.0"
source = "git+https://github.com/rust-vmm/vfio?branch=main#ad86d843a22fbf98efa9c02a5689fe2bf17ed54a" source = "git+https://github.com/rust-vmm/vfio?branch=main#7ef33f6759ae6d37a54cd66f749aa47c1c81509c"
dependencies = [ dependencies = [
"byteorder", "byteorder",
"kvm-bindings", "kvm-bindings",
@@ -1354,8 +1359,9 @@ dependencies = [
[[package]] [[package]]
name = "vhost" name = "vhost"
version = "0.5.0" version = "0.6.0"
source = "git+https://github.com/rust-vmm/vhost?branch=main#f87156b77662af63b9fc9f116a213dd69e16007b" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c9b791c5b0717a0558888a4cf7240cea836f39a99cb342e12ce633dcaa078072"
dependencies = [ dependencies = [
"bitflags", "bitflags",
"libc", "libc",
@@ -1365,9 +1371,9 @@ dependencies = [
[[package]] [[package]]
name = "vhost-user-backend" name = "vhost-user-backend"
version = "0.7.0" version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6a0fc7d5f8e2943cd9f2ecd58be3f2078add863a49573d14dd9d64e1ab26544c" checksum = "9f237b91db4ac339d639fb43398b52d785fa51e3c7760ac9425148863c1f4303"
dependencies = [ dependencies = [
"libc", "libc",
"log", "log",
@@ -1459,9 +1465,9 @@ dependencies = [
[[package]] [[package]]
name = "virtio-queue" name = "virtio-queue"
version = "0.6.1" version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "435dd49c7b38419729afd43675850c7b5dc4728f2fabd70c7a9079a331e4f8c6" checksum = "19e927d93d54c365034fd7f31a5f458a1f540de4a37c52e892670dad9692173c"
dependencies = [ dependencies = [
"log", "log",
"virtio-bindings", "virtio-bindings",
@@ -1494,13 +1500,13 @@ dependencies = [
[[package]] [[package]]
name = "vm-fdt" name = "vm-fdt"
version = "0.2.0" version = "0.2.0"
source = "git+https://github.com/rust-vmm/vm-fdt?branch=main#d9425907389e1fbbfb803017d01824a4bb16e6a8" source = "git+https://github.com/rust-vmm/vm-fdt?branch=main#c5a99ab71b130435927d19b50c85fcd5ce904a8c"
[[package]] [[package]]
name = "vm-memory" name = "vm-memory"
version = "0.9.0" version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "583f213899e8a5eea23d9c507252d4bed5bc88f0ecbe0783262f80034630744b" checksum = "688a70366615b45575a424d9c665561c1b5ab2224d494f706b6a6812911a827c"
dependencies = [ dependencies = [
"arc-swap", "arc-swap",
"libc", "libc",
@@ -1580,9 +1586,9 @@ dependencies = [
[[package]] [[package]]
name = "vmm-sys-util" name = "vmm-sys-util"
version = "0.10.0" version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "08604d7be03eb26e33b3cee3ed4aef2bf550b305d1cca60e84da5d28d3790b62" checksum = "cc06a16ee8ebf0d9269aed304030b0d20a866b8b3dd3d4ce532596ac567a0d24"
dependencies = [ dependencies = [
"bitflags", "bitflags",
"libc", "libc",
@@ -1636,19 +1642,6 @@ version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
[[package]]
name = "windows-sys"
version = "0.36.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2"
dependencies = [
"windows_aarch64_msvc 0.36.1",
"windows_i686_gnu 0.36.1",
"windows_i686_msvc 0.36.1",
"windows_x86_64_gnu 0.36.1",
"windows_x86_64_msvc 0.36.1",
]
[[package]] [[package]]
name = "windows-sys" name = "windows-sys"
version = "0.42.0" version = "0.42.0"
@@ -1656,12 +1649,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7"
dependencies = [ dependencies = [
"windows_aarch64_gnullvm", "windows_aarch64_gnullvm",
"windows_aarch64_msvc 0.42.0", "windows_aarch64_msvc",
"windows_i686_gnu 0.42.0", "windows_i686_gnu",
"windows_i686_msvc 0.42.0", "windows_i686_msvc",
"windows_x86_64_gnu 0.42.0", "windows_x86_64_gnu",
"windows_x86_64_gnullvm", "windows_x86_64_gnullvm",
"windows_x86_64_msvc 0.42.0", "windows_x86_64_msvc",
] ]
[[package]] [[package]]
@@ -1670,48 +1663,24 @@ version = "0.42.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "41d2aa71f6f0cbe00ae5167d90ef3cfe66527d6f613ca78ac8024c3ccab9a19e" checksum = "41d2aa71f6f0cbe00ae5167d90ef3cfe66527d6f613ca78ac8024c3ccab9a19e"
[[package]]
name = "windows_aarch64_msvc"
version = "0.36.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47"
[[package]] [[package]]
name = "windows_aarch64_msvc" name = "windows_aarch64_msvc"
version = "0.42.0" version = "0.42.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dd0f252f5a35cac83d6311b2e795981f5ee6e67eb1f9a7f64eb4500fbc4dcdb4" checksum = "dd0f252f5a35cac83d6311b2e795981f5ee6e67eb1f9a7f64eb4500fbc4dcdb4"
[[package]]
name = "windows_i686_gnu"
version = "0.36.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6"
[[package]] [[package]]
name = "windows_i686_gnu" name = "windows_i686_gnu"
version = "0.42.0" version = "0.42.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fbeae19f6716841636c28d695375df17562ca208b2b7d0dc47635a50ae6c5de7" checksum = "fbeae19f6716841636c28d695375df17562ca208b2b7d0dc47635a50ae6c5de7"
[[package]]
name = "windows_i686_msvc"
version = "0.36.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024"
[[package]] [[package]]
name = "windows_i686_msvc" name = "windows_i686_msvc"
version = "0.42.0" version = "0.42.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "84c12f65daa39dd2babe6e442988fc329d6243fdce47d7d2d155b8d874862246" checksum = "84c12f65daa39dd2babe6e442988fc329d6243fdce47d7d2d155b8d874862246"
[[package]]
name = "windows_x86_64_gnu"
version = "0.36.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1"
[[package]] [[package]]
name = "windows_x86_64_gnu" name = "windows_x86_64_gnu"
version = "0.42.0" version = "0.42.0"
@@ -1724,12 +1693,6 @@ version = "0.42.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09d525d2ba30eeb3297665bd434a54297e4170c7f1a44cad4ef58095b4cd2028" checksum = "09d525d2ba30eeb3297665bd434a54297e4170c7f1a44cad4ef58095b4cd2028"
[[package]]
name = "windows_x86_64_msvc"
version = "0.36.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680"
[[package]] [[package]]
name = "windows_x86_64_msvc" name = "windows_x86_64_msvc"
version = "0.42.0" version = "0.42.0"

View File

@@ -1,6 +1,6 @@
[package] [package]
name = "cloud-hypervisor" name = "cloud-hypervisor"
version = "28.0.0" version = "28.1.0"
authors = ["The Cloud Hypervisor Authors"] authors = ["The Cloud Hypervisor Authors"]
edition = "2021" edition = "2021"
default-run = "cloud-hypervisor" default-run = "cloud-hypervisor"
@@ -20,38 +20,36 @@ opt-level = "s"
[dependencies] [dependencies]
anyhow = "1.0.66" anyhow = "1.0.66"
api_client = { path = "api_client" } api_client = { path = "api_client" }
clap = { version = "4.0.18", features = ["wrap_help","cargo","string"] } clap = { version = "4.0.29", features = ["wrap_help","cargo","string"] }
epoll = "4.3.1" epoll = "4.3.1"
event_monitor = { path = "event_monitor" } event_monitor = { path = "event_monitor" }
hypervisor = { path = "hypervisor" } hypervisor = { path = "hypervisor" }
libc = "0.2.137" libc = "0.2.138"
log = { version = "0.4.17", features = ["std"] } log = { version = "0.4.17", features = ["std"] }
option_parser = { path = "option_parser" } option_parser = { path = "option_parser" }
seccompiler = "0.3.0" seccompiler = "0.3.0"
serde_json = "1.0.87" serde_json = "1.0.89"
signal-hook = "0.3.14" signal-hook = "0.3.14"
thiserror = "1.0.37" thiserror = "1.0.37"
tpm = { path = "tpm"} tpm = { path = "tpm"}
tracer = { path = "tracer" } tracer = { path = "tracer" }
vmm = { path = "vmm" } vmm = { path = "vmm" }
vmm-sys-util = "0.10.0" vmm-sys-util = "0.11.0"
vm-memory = "0.9.0" vm-memory = "0.10.0"
[build-dependencies] [build-dependencies]
clap = { version = "4.0.18", features = ["cargo"] } clap = { version = "4.0.29", features = ["cargo"] }
# List of patched crates # List of patched crates
[patch.crates-io] [patch.crates-io]
kvm-bindings = { git = "https://github.com/cloud-hypervisor/kvm-bindings", branch = "ch-v0.5.0-tdx" } kvm-bindings = { git = "https://github.com/cloud-hypervisor/kvm-bindings", branch = "ch-v0.6.0-tdx" }
kvm-ioctls = { git = "https://github.com/rust-vmm/kvm-ioctls", branch = "main" }
versionize_derive = { git = "https://github.com/cloud-hypervisor/versionize_derive", branch = "ch" } versionize_derive = { git = "https://github.com/cloud-hypervisor/versionize_derive", branch = "ch" }
vhost = { git = "https://github.com/rust-vmm/vhost", branch = "main" }
[dev-dependencies] [dev-dependencies]
dirs = "4.0.0" dirs = "4.0.0"
net_util = { path = "net_util" } net_util = { path = "net_util" }
once_cell = "1.16.0" once_cell = "1.16.0"
serde_json = "1.0.87" serde_json = "1.0.89"
test_infra = { path = "test_infra" } test_infra = { path = "test_infra" }
wait-timeout = "0.2.0" wait-timeout = "0.2.0"

View File

@@ -220,7 +220,7 @@ $ ./cloud-hypervisor \
If earlier kernel messages are required the serial console should be used instead of `virtio-console`. If earlier kernel messages are required the serial console should be used instead of `virtio-console`.
```cloud-hypervisor \ ```./cloud-hypervisor \
--kernel ./linux-cloud-hypervisor/arch/x86/boot/compressed/vmlinux.bin \ --kernel ./linux-cloud-hypervisor/arch/x86/boot/compressed/vmlinux.bin \
--console off \ --console off \
--serial tty \ --serial tty \

View File

@@ -5,4 +5,4 @@ authors = ["The Cloud Hypervisor Authors"]
edition = "2021" edition = "2021"
[dependencies] [dependencies]
vm-memory = "0.9.0" vm-memory = "0.10.0"

View File

@@ -5,4 +5,4 @@ authors = ["The Cloud Hypervisor Authors"]
edition = "2021" edition = "2021"
[dependencies] [dependencies]
vmm-sys-util = "0.10.0" vmm-sys-util = "0.11.0"

View File

@@ -12,17 +12,17 @@ tdx = []
anyhow = "1.0.66" anyhow = "1.0.66"
byteorder = "1.4.3" byteorder = "1.4.3"
hypervisor = { path = "../hypervisor" } hypervisor = { path = "../hypervisor" }
libc = "0.2.137" libc = "0.2.138"
linux-loader = { version = "0.7.0", features = ["elf", "bzimage", "pe"] } linux-loader = { version = "0.8.1", features = ["elf", "bzimage", "pe"] }
log = "0.4.17" log = "0.4.17"
serde = { version = "1.0.147", features = ["rc", "derive"] } serde = { version = "1.0.150", features = ["rc", "derive"] }
thiserror = "1.0.37" thiserror = "1.0.37"
uuid = "1.2.1" uuid = "1.2.2"
versionize = "0.1.6" versionize = "0.1.9"
versionize_derive = "0.1.4" versionize_derive = "0.1.4"
vm-memory = { version = "0.9.0", features = ["backend-mmap", "backend-bitmap"] } vm-memory = { version = "0.10.0", features = ["backend-mmap", "backend-bitmap"] }
vm-migration = { path = "../vm-migration" } vm-migration = { path = "../vm-migration" }
vmm-sys-util = { version = "0.10.0", features = ["with-serde"] } vmm-sys-util = { version = "0.11.0", features = ["with-serde"] }
[target.'cfg(target_arch = "aarch64")'.dependencies] [target.'cfg(target_arch = "aarch64")'.dependencies]
fdt_parser = { version = "0.1.4", package = "fdt" } fdt_parser = { version = "0.1.4", package = "fdt" }

View File

@@ -631,6 +631,20 @@ pub fn generate_common_cpuid(
} }
} }
} }
// Copy host L2 cache details if not populated by KVM
0x8000_0006 => {
if entry.eax == 0 && entry.ebx == 0 && entry.ecx == 0 && entry.edx == 0 {
// SAFETY: cpuid called with valid leaves
if unsafe { std::arch::x86_64::__cpuid(0x8000_0000).eax } >= 0x8000_0006 {
// SAFETY: cpuid called with valid leaves
let leaf = unsafe { std::arch::x86_64::__cpuid(0x8000_0006) };
entry.eax = leaf.eax;
entry.ebx = leaf.ebx;
entry.ecx = leaf.ecx;
entry.edx = leaf.edx;
}
}
}
// Set CPU physical bits // Set CPU physical bits
0x8000_0008 => { 0x8000_0008 => {
entry.eax = (entry.eax & 0xffff_ff00) | (phys_bits as u32 & 0xff); entry.eax = (entry.eax & 0xffff_ff00) | (phys_bits as u32 & 0xff);

View File

@@ -8,17 +8,17 @@ edition = "2021"
default = [] default = []
[dependencies] [dependencies]
io-uring = "0.5.8" io-uring = "0.5.9"
libc = "0.2.137" libc = "0.2.138"
log = "0.4.17" log = "0.4.17"
qcow = { path = "../qcow" } qcow = { path = "../qcow" }
thiserror = "1.0.37" thiserror = "1.0.37"
versionize = "0.1.6" versionize = "0.1.9"
versionize_derive = "0.1.4" versionize_derive = "0.1.4"
vhdx = { path = "../vhdx" } vhdx = { path = "../vhdx" }
virtio-bindings = { version = "0.1.0", features = ["virtio-v5_0_0"] } virtio-bindings = { version = "0.1.0", features = ["virtio-v5_0_0"] }
virtio-queue = "0.6.1" virtio-queue = "0.7.0"
vm-memory = { version = "0.9.0", features = ["backend-mmap", "backend-atomic", "backend-bitmap"] } vm-memory = { version = "0.10.0", features = ["backend-mmap", "backend-atomic", "backend-bitmap"] }
vm-virtio = { path = "../vm-virtio" } vm-virtio = { path = "../vm-virtio" }
vmm-sys-util = "0.10.0" vmm-sys-util = "0.11.0"

View File

@@ -11,17 +11,17 @@ arch = { path = "../arch" }
bitflags = "1.3.2" bitflags = "1.3.2"
byteorder = "1.4.3" byteorder = "1.4.3"
hypervisor = { path = "../hypervisor" } hypervisor = { path = "../hypervisor" }
libc = "0.2.137" libc = "0.2.138"
log = "0.4.17" log = "0.4.17"
phf = { version = "0.11", features = ["macros"] } phf = { version = "0.11.1", features = ["macros"] }
thiserror = "1.0.30" thiserror = "1.0.37"
tpm = { path = "../tpm" } tpm = { path = "../tpm" }
versionize = "0.1.6" versionize = "0.1.9"
versionize_derive = "0.1.4" versionize_derive = "0.1.4"
vm-device = { path = "../vm-device" } vm-device = { path = "../vm-device" }
vm-memory = "0.9.0" vm-memory = "0.10.0"
vm-migration = { path = "../vm-migration" } vm-migration = { path = "../vm-migration" }
vmm-sys-util = "0.10.0" vmm-sys-util = "0.11.0"
[target.'cfg(target_arch = "aarch64")'.dependencies] [target.'cfg(target_arch = "aarch64")'.dependencies]
arch = { path = "../arch" } arch = { path = "../arch" }

View File

@@ -30,7 +30,7 @@ process should be started to listen at the input socket. Below is an
example invocation of swtpm process. example invocation of swtpm process.
``` ```
swtpm socket --tmpstate dir=/var/run/swtpm \ swtpm socket --tpmstate dir=/var/run/swtpm \
--ctrl type=unixio,path="/var/run/swtpm.socket" \ --ctrl type=unixio,path="/var/run/swtpm.socket" \
--flags startup-clear \ --flags startup-clear \
--tpm2 --tpm2

View File

@@ -5,6 +5,6 @@ authors = ["The Cloud Hypervisor Authors"]
edition = "2021" edition = "2021"
[dependencies] [dependencies]
libc = "0.2.137" libc = "0.2.138"
serde = { version = "1.0.147", features = ["rc", "derive"] } serde = { version = "1.0.150", features = ["rc", "derive"] }
serde_json = "1.0.87" serde_json = "1.0.89"

140
fuzz/Cargo.lock generated
View File

@@ -56,17 +56,6 @@ dependencies = [
"vmm-sys-util", "vmm-sys-util",
] ]
[[package]]
name = "atty"
version = "0.2.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8"
dependencies = [
"hermit-abi",
"libc",
"winapi",
]
[[package]] [[package]]
name = "bincode" name = "bincode"
version = "1.3.3" version = "1.3.3"
@@ -109,9 +98,9 @@ checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610"
[[package]] [[package]]
name = "cc" name = "cc"
version = "1.0.73" version = "1.0.77"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11" checksum = "e9f73505338f7d905b19d18738976aae232eb46b8efc15554ffc56deb5d9ebe4"
dependencies = [ dependencies = [
"jobserver", "jobserver",
] ]
@@ -124,13 +113,13 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]] [[package]]
name = "clap" name = "clap"
version = "4.0.18" version = "4.0.29"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "335867764ed2de42325fafe6d18b8af74ba97ee0c590fa016f157535b42ab04b" checksum = "4d63b9e9c07271b9957ad22c173bae2a4d9a81127680962039296abcd2f8251d"
dependencies = [ dependencies = [
"atty",
"bitflags", "bitflags",
"clap_lex", "clap_lex",
"is-terminal",
"once_cell", "once_cell",
"strsim", "strsim",
"termcolor", "termcolor",
@@ -148,7 +137,7 @@ dependencies = [
[[package]] [[package]]
name = "cloud-hypervisor" name = "cloud-hypervisor"
version = "27.0.0" version = "28.0.0"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"api_client", "api_client",
@@ -332,9 +321,9 @@ dependencies = [
[[package]] [[package]]
name = "hermit-abi" name = "hermit-abi"
version = "0.1.20" version = "0.2.6"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c7a30908dbce072eca83216eab939d2290080e00ca71611b96a09e5cdce5f3fa" checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7"
dependencies = [ dependencies = [
"libc", "libc",
] ]
@@ -376,9 +365,13 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39"
[[package]] [[package]]
name = "io-lifetimes" name = "io-lifetimes"
version = "0.7.5" version = "1.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "59ce5ef949d49ee85593fc4d3f3f95ad61657076395cbbce23e2121fc5542074" checksum = "46112a93252b123d31a119a8d1a1ac19deac4fac6e0e8b0df58f0d4e5870e63c"
dependencies = [
"libc",
"windows-sys",
]
[[package]] [[package]]
name = "io-uring" name = "io-uring"
@@ -390,6 +383,18 @@ dependencies = [
"libc", "libc",
] ]
[[package]]
name = "is-terminal"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "927609f78c2913a6f6ac3c27a4fe87f43e2a35367c0c4b0f8265e8f49a104330"
dependencies = [
"hermit-abi",
"io-lifetimes",
"rustix",
"windows-sys",
]
[[package]] [[package]]
name = "itoa" name = "itoa"
version = "1.0.4" version = "1.0.4"
@@ -407,8 +412,8 @@ dependencies = [
[[package]] [[package]]
name = "kvm-bindings" name = "kvm-bindings"
version = "0.5.0" version = "0.6.0"
source = "git+https://github.com/cloud-hypervisor/kvm-bindings?branch=ch-v0.5.0-tdx#52e56d0e8ef0f6ea32fc0492e6a175b73617a49f" source = "git+https://github.com/cloud-hypervisor/kvm-bindings?branch=ch-v0.6.0-tdx#7d9ffb47e5b9b1989577258800a0f57c93f1445f"
dependencies = [ dependencies = [
"serde", "serde",
"serde_derive", "serde_derive",
@@ -417,8 +422,9 @@ dependencies = [
[[package]] [[package]]
name = "kvm-ioctls" name = "kvm-ioctls"
version = "0.11.0" version = "0.12.0"
source = "git+https://github.com/rust-vmm/kvm-ioctls?branch=main#1e03e29cdfbb0cb108a98de7a78045a5a517f18e" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c3a321cabd827642499c77e27314f388dd83a717a5ca716b86476fb947f73ae4"
dependencies = [ dependencies = [
"kvm-bindings", "kvm-bindings",
"libc", "libc",
@@ -433,9 +439,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
[[package]] [[package]]
name = "libc" name = "libc"
version = "0.2.137" version = "0.2.138"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fc7fcc620a3bff7cdd7a365be3376c97191aeaccc2a603e600951e452615bf89" checksum = "db6d7e329c562c5dfab7a46a2afabc8b987ab9a4834c9d1ca04dc54c1546cef8"
[[package]] [[package]]
name = "libfuzzer-sys" name = "libfuzzer-sys"
@@ -450,18 +456,18 @@ dependencies = [
[[package]] [[package]]
name = "linux-loader" name = "linux-loader"
version = "0.7.0" version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f8242360c7d79a7713a28043c994b815e9820b0e97e44b228ec9bd913c16bdfe" checksum = "b9259ddbfbb52cc918f6bbc60390004ddd0228cf1d85f402009ff2b3d95de83f"
dependencies = [ dependencies = [
"vm-memory", "vm-memory",
] ]
[[package]] [[package]]
name = "linux-raw-sys" name = "linux-raw-sys"
version = "0.0.46" version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d4d2456c373231a208ad294c33dc5bff30051eafd954cd4caae83a712b12854d" checksum = "8f9f08d8963a6c613f4b1a78f4f4a4dbfadf8e6545b2d72861731e4858b8b47f"
[[package]] [[package]]
name = "log" name = "log"
@@ -475,7 +481,7 @@ dependencies = [
[[package]] [[package]]
name = "micro_http" name = "micro_http"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/firecracker-microvm/micro-http?branch=main#863b0370ba7e57f7df5b908ada9e5b44809ccae9" source = "git+https://github.com/firecracker-microvm/micro-http?branch=main#4b18a043e997da5b5f679e3defc279fec908753e"
dependencies = [ dependencies = [
"libc", "libc",
"vmm-sys-util", "vmm-sys-util",
@@ -521,9 +527,9 @@ version = "0.1.0"
[[package]] [[package]]
name = "os_str_bytes" name = "os_str_bytes"
version = "6.4.0" version = "6.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7b5bf27447411e9ee3ff51186bf7a08e16c341efdde93f4d823e8844429bed7e" checksum = "9b7820b9daea5457c9f21c69448905d723fbd21136ccf521748f23fd49e723ee"
[[package]] [[package]]
name = "pci" name = "pci"
@@ -665,9 +671,9 @@ dependencies = [
[[package]] [[package]]
name = "rustix" name = "rustix"
version = "0.35.13" version = "0.36.5"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "727a1a6d65f786ec22df8a81ca3121107f235970dc1705ed681d3e6e8b9cd5f9" checksum = "a3807b5d10909833d3e9acd1eb5fb988f79376ff10fce42937de71a449c4c588"
dependencies = [ dependencies = [
"bitflags", "bitflags",
"errno", "errno",
@@ -700,18 +706,18 @@ checksum = "e25dfac463d778e353db5be2449d1cce89bd6fd23c9f1ea21310ce6e5a1b29c4"
[[package]] [[package]]
name = "serde" name = "serde"
version = "1.0.147" version = "1.0.150"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d193d69bae983fc11a79df82342761dfbf28a99fc8d203dca4c3c1b590948965" checksum = "e326c9ec8042f1b5da33252c8a37e9ffbd2c9bef0155215b6e6c80c790e05f91"
dependencies = [ dependencies = [
"serde_derive", "serde_derive",
] ]
[[package]] [[package]]
name = "serde_derive" name = "serde_derive"
version = "1.0.147" version = "1.0.150"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4f1d362ca8fc9c3e3a7484440752472d68a6caa98f1ab81d99b5dfe517cec852" checksum = "42a3df25b0713732468deadad63ab9da1f1fd75a48a15024b50363f128db627e"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@@ -720,9 +726,9 @@ dependencies = [
[[package]] [[package]]
name = "serde_json" name = "serde_json"
version = "1.0.87" version = "1.0.89"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6ce777b7b150d76b9cf60d28b55f5847135a003f7d7350c6be7a773508ce7d45" checksum = "020ff22c755c2ed3f8cf162dbb41a7268d934702f3ed3631656ea597e08fc3db"
dependencies = [ dependencies = [
"itoa", "itoa",
"ryu", "ryu",
@@ -731,9 +737,9 @@ dependencies = [
[[package]] [[package]]
name = "serde_with" name = "serde_with"
version = "2.0.1" version = "2.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "368f2d60d049ea019a84dcd6687b0d1e0030fe663ae105039bdf967ed5e6a9a7" checksum = "25bf4a5a814902cd1014dbccfa4d4560fb8432c779471e96e035602519f82eef"
dependencies = [ dependencies = [
"serde", "serde",
"serde_with_macros", "serde_with_macros",
@@ -741,9 +747,9 @@ dependencies = [
[[package]] [[package]]
name = "serde_with_macros" name = "serde_with_macros"
version = "2.0.1" version = "2.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1ccadfacf6cf10faad22bbadf55986bdd0856edfb5d9210aa1dcf1f516e84e93" checksum = "e3452b4c0f6c1e357f73fdb87cd1efabaa12acf328c7a528e252893baeb3f4aa"
dependencies = [ dependencies = [
"darling", "darling",
"proc-macro2", "proc-macro2",
@@ -794,9 +800,9 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
[[package]] [[package]]
name = "syn" name = "syn"
version = "1.0.103" version = "1.0.105"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a864042229133ada95abf3b54fdc62ef5ccabe9515b64717bcb9a1919e59445d" checksum = "60b9b43d45702de4c839cb9b51d9f529c5dd26a4aff255b42b1ebc03e88ee908"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@@ -814,9 +820,9 @@ dependencies = [
[[package]] [[package]]
name = "terminal_size" name = "terminal_size"
version = "0.2.2" version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "40ca90c434fd12083d1a6bdcbe9f92a14f96c8a1ba600ba451734ac334521f7a" checksum = "cb20089a8ba2b69debd491f8d2d023761cbf196e999218c591fa1e7e15a21907"
dependencies = [ dependencies = [
"rustix", "rustix",
"windows-sys", "windows-sys",
@@ -882,9 +888,9 @@ dependencies = [
[[package]] [[package]]
name = "versionize" name = "versionize"
version = "0.1.6" version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7429cf68de8f091b667d27323ed323afd39584a56d533995b12ddd748e5e6ca9" checksum = "d6e2495726cf917e7ba7ec8bf0f0fceab543dd38d0a4195ed6bef331e38a290f"
dependencies = [ dependencies = [
"bincode", "bincode",
"crc64", "crc64",
@@ -909,17 +915,16 @@ dependencies = [
[[package]] [[package]]
name = "vfio-bindings" name = "vfio-bindings"
version = "0.3.1" version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "git+https://github.com/rust-vmm/vfio?branch=main#7ef33f6759ae6d37a54cd66f749aa47c1c81509c"
checksum = "43449b404c488f70507dca193debd4bea361fe8089869b947adc19720e464bce"
dependencies = [ dependencies = [
"vmm-sys-util", "vmm-sys-util",
] ]
[[package]] [[package]]
name = "vfio-ioctls" name = "vfio-ioctls"
version = "0.1.0" version = "0.2.0"
source = "git+https://github.com/rust-vmm/vfio?branch=main#bf7c9b997b4ad0ca1ab4bfe96dc1b10d4bc5be24" source = "git+https://github.com/rust-vmm/vfio?branch=main#7ef33f6759ae6d37a54cd66f749aa47c1c81509c"
dependencies = [ dependencies = [
"byteorder", "byteorder",
"kvm-bindings", "kvm-bindings",
@@ -962,8 +967,9 @@ dependencies = [
[[package]] [[package]]
name = "vhost" name = "vhost"
version = "0.5.0" version = "0.6.0"
source = "git+https://github.com/rust-vmm/vhost?branch=main#f87156b77662af63b9fc9f116a213dd69e16007b" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c9b791c5b0717a0558888a4cf7240cea836f39a99cb342e12ce633dcaa078072"
dependencies = [ dependencies = [
"bitflags", "bitflags",
"libc", "libc",
@@ -1014,9 +1020,9 @@ dependencies = [
[[package]] [[package]]
name = "virtio-queue" name = "virtio-queue"
version = "0.6.1" version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "435dd49c7b38419729afd43675850c7b5dc4728f2fabd70c7a9079a331e4f8c6" checksum = "19e927d93d54c365034fd7f31a5f458a1f540de4a37c52e892670dad9692173c"
dependencies = [ dependencies = [
"log", "log",
"virtio-bindings", "virtio-bindings",
@@ -1048,14 +1054,14 @@ dependencies = [
[[package]] [[package]]
name = "vm-fdt" name = "vm-fdt"
version = "0.1.0" version = "0.2.0"
source = "git+https://github.com/rust-vmm/vm-fdt?branch=main#720e48e435b791ec6cbe8d2b229448b71dcb1ab9" source = "git+https://github.com/rust-vmm/vm-fdt?branch=main#c5a99ab71b130435927d19b50c85fcd5ce904a8c"
[[package]] [[package]]
name = "vm-memory" name = "vm-memory"
version = "0.9.0" version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "583f213899e8a5eea23d9c507252d4bed5bc88f0ecbe0783262f80034630744b" checksum = "688a70366615b45575a424d9c665561c1b5ab2224d494f706b6a6812911a827c"
dependencies = [ dependencies = [
"arc-swap", "arc-swap",
"libc", "libc",
@@ -1133,9 +1139,9 @@ dependencies = [
[[package]] [[package]]
name = "vmm-sys-util" name = "vmm-sys-util"
version = "0.10.0" version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "08604d7be03eb26e33b3cee3ed4aef2bf550b305d1cca60e84da5d28d3790b62" checksum = "cc06a16ee8ebf0d9269aed304030b0d20a866b8b3dd3d4ce532596ac567a0d24"
dependencies = [ dependencies = [
"bitflags", "bitflags",
"libc", "libc",

View File

@@ -20,10 +20,10 @@ qcow = { path = "../qcow" }
seccompiler = "0.3.0" seccompiler = "0.3.0"
vhdx = { path = "../vhdx" } vhdx = { path = "../vhdx" }
virtio-devices = { path = "../virtio-devices" } virtio-devices = { path = "../virtio-devices" }
virtio-queue = "0.6.1" virtio-queue = "0.7.0"
vmm = { path = "../vmm" } vmm = { path = "../vmm" }
vmm-sys-util = "0.10.0" vmm-sys-util = "0.11.0"
vm-memory = "0.9.0" vm-memory = "0.10.0"
vm-device = { path = "../vm-device" } vm-device = { path = "../vm-device" }
vm-virtio = { path = "../vm-virtio" } vm-virtio = { path = "../vm-virtio" }
@@ -31,10 +31,8 @@ vm-virtio = { path = "../vm-virtio" }
path = ".." path = ".."
[patch.crates-io] [patch.crates-io]
kvm-bindings = { git = "https://github.com/cloud-hypervisor/kvm-bindings", branch = "ch-v0.5.0-tdx" } kvm-bindings = { git = "https://github.com/cloud-hypervisor/kvm-bindings", branch = "ch-v0.6.0-tdx" }
kvm-ioctls = { git = "https://github.com/rust-vmm/kvm-ioctls", branch = "main" }
versionize_derive = { git = "https://github.com/cloud-hypervisor/versionize_derive", branch = "ch" } versionize_derive = { git = "https://github.com/cloud-hypervisor/versionize_derive", branch = "ch" }
vhost = { git = "https://github.com/rust-vmm/vhost", branch = "main" }
# Prevent this from interfering with workspaces # Prevent this from interfering with workspaces
[workspace] [workspace]

View File

@@ -14,17 +14,17 @@ tdx = []
anyhow = "1.0.66" anyhow = "1.0.66"
byteorder = "1.4.3" byteorder = "1.4.3"
thiserror = "1.0.37" thiserror = "1.0.37"
libc = "0.2.137" libc = "0.2.138"
log = "0.4.17" log = "0.4.17"
kvm-ioctls = { version = "0.11.0", optional = true } kvm-ioctls = { version = "0.12.0", optional = true }
kvm-bindings = { git = "https://github.com/cloud-hypervisor/kvm-bindings", branch = "ch-v0.5.0-tdx", features = ["with-serde", "fam-wrappers"], optional = true } kvm-bindings = { git = "https://github.com/cloud-hypervisor/kvm-bindings", branch = "ch-v0.6.0-tdx", features = ["with-serde", "fam-wrappers"], optional = true }
mshv-bindings = { git = "https://github.com/rust-vmm/mshv", branch = "main", features = ["with-serde", "fam-wrappers"], optional = true } mshv-bindings = { git = "https://github.com/rust-vmm/mshv", branch = "main", features = ["with-serde", "fam-wrappers"], optional = true }
mshv-ioctls = { git = "https://github.com/rust-vmm/mshv", branch = "main", optional = true} mshv-ioctls = { git = "https://github.com/rust-vmm/mshv", branch = "main", optional = true}
serde = { version = "1.0.147", features = ["rc", "derive"] } serde = { version = "1.0.150", features = ["rc", "derive"] }
serde_with = { version = "2.0.1", default-features = false, features = ["macros"] } serde_with = { version = "2.1.0", default-features = false, features = ["macros"] }
vfio-ioctls = { git = "https://github.com/rust-vmm/vfio", branch = "main", default-features = false } vfio-ioctls = { git = "https://github.com/rust-vmm/vfio", branch = "main", default-features = false }
vm-memory = { version = "0.9.0", features = ["backend-mmap", "backend-atomic"] } vm-memory = { version = "0.10.0", features = ["backend-mmap", "backend-atomic"] }
vmm-sys-util = { version = "0.10.0", features = ["with-serde"] } vmm-sys-util = { version = "0.11.0", features = ["with-serde"] }
[target.'cfg(target_arch = "x86_64")'.dependencies.iced-x86] [target.'cfg(target_arch = "x86_64")'.dependencies.iced-x86]
version = "1.17.0" version = "1.17.0"
@@ -32,4 +32,4 @@ default-features = false
features = ["std", "decoder", "op_code_info", "instr_info", "fast_fmt"] features = ["std", "decoder", "op_code_info", "instr_info", "fast_fmt"]
[dev-dependencies] [dev-dependencies]
env_logger = "0.9.3" env_logger = "0.10.0"

View File

@@ -5,4 +5,4 @@ authors = ["The Chromium OS Authors"]
edition = "2021" edition = "2021"
[dependencies] [dependencies]
vmm-sys-util = "0.10.0" vmm-sys-util = "0.11.0"

View File

@@ -6,23 +6,23 @@ edition = "2021"
[dependencies] [dependencies]
epoll = "4.3.1" epoll = "4.3.1"
getrandom = "0.2.7" getrandom = "0.2.8"
libc = "0.2.137" libc = "0.2.138"
log = "0.4.17" log = "0.4.17"
net_gen = { path = "../net_gen" } net_gen = { path = "../net_gen" }
rate_limiter = { path = "../rate_limiter" } rate_limiter = { path = "../rate_limiter" }
serde = "1.0.147" serde = "1.0.150"
thiserror = "1.0.37" thiserror = "1.0.37"
versionize = "0.1.6" versionize = "0.1.9"
versionize_derive = "0.1.4" versionize_derive = "0.1.4"
virtio-bindings = "0.1.0" virtio-bindings = "0.1.0"
virtio-queue = "0.6.1" virtio-queue = "0.7.0"
vm-memory = { version = "0.9.0", features = ["backend-mmap", "backend-atomic", "backend-bitmap"] } vm-memory = { version = "0.10.0", features = ["backend-mmap", "backend-atomic", "backend-bitmap"] }
vm-virtio = { path = "../vm-virtio" } vm-virtio = { path = "../vm-virtio" }
vmm-sys-util = "0.10.0" vmm-sys-util = "0.11.0"
[dev-dependencies] [dev-dependencies]
once_cell = "1.16.0" once_cell = "1.16.0"
pnet = "0.31.0" pnet = "0.31.0"
pnet_datalink = "0.31.0" pnet_datalink = "0.31.0"
serde_json = "1.0.87" serde_json = "1.0.89"

View File

@@ -104,6 +104,10 @@ impl TxVirtio {
return Err(NetQueuePairError::WriteTap(e)); return Err(NetQueuePairError::WriteTap(e));
} }
if (result as usize) < vnet_hdr_len() {
return Err(NetQueuePairError::InvalidVirtioNetHeader);
}
self.counter_bytes += Wrapping(result as u64 - vnet_hdr_len() as u64); self.counter_bytes += Wrapping(result as u64 - vnet_hdr_len() as u64);
self.counter_frames += Wrapping(1); self.counter_frames += Wrapping(1);
@@ -185,7 +189,7 @@ impl RxVirtio {
.translate_gva(access_platform, desc.len() as usize), .translate_gva(access_platform, desc.len() as usize),
10, 10,
) )
.unwrap(); .ok_or(NetQueuePairError::DescriptorInvalidHeader)?;
let mut next_desc = Some(desc); let mut next_desc = Some(desc);
let mut iovecs = Vec::new(); let mut iovecs = Vec::new();
@@ -238,6 +242,10 @@ impl RxVirtio {
return Err(NetQueuePairError::ReadTap(e)); return Err(NetQueuePairError::ReadTap(e));
} }
if (result as usize) < vnet_hdr_len() {
return Err(NetQueuePairError::InvalidVirtioNetHeader);
}
// Write num_buffers to guest memory. We simply write 1 as we // Write num_buffers to guest memory. We simply write 1 as we
// never spread the frame over more than one descriptor chain. // never spread the frame over more than one descriptor chain.
desc_chain desc_chain
@@ -312,6 +320,10 @@ pub enum NetQueuePairError {
QueueEnableNotification(virtio_queue::Error), QueueEnableNotification(virtio_queue::Error),
#[error("Failed to add used index to the queue: {0}")] #[error("Failed to add used index to the queue: {0}")]
QueueAddUsed(virtio_queue::Error), QueueAddUsed(virtio_queue::Error),
#[error("Descriptor with invalid virtio-net header")]
DescriptorInvalidHeader,
#[error("Invalid virtio-net header")]
InvalidVirtioNetHeader,
} }
pub struct NetQueuePair { pub struct NetQueuePair {

View File

@@ -13,20 +13,17 @@ mshv = ["vfio-ioctls/mshv"]
anyhow = "1.0.66" anyhow = "1.0.66"
byteorder = "1.4.3" byteorder = "1.4.3"
hypervisor = { path = "../hypervisor" } hypervisor = { path = "../hypervisor" }
vfio-bindings = { git = "https://github.com/rust-vmm/vfio", branch = "main", features = ["fam-wrappers"] }
vfio-ioctls = { git = "https://github.com/rust-vmm/vfio", branch = "main", default-features = false } vfio-ioctls = { git = "https://github.com/rust-vmm/vfio", branch = "main", default-features = false }
vfio_user = { path = "../vfio_user" } vfio_user = { path = "../vfio_user" }
vmm-sys-util = "0.10.0" vmm-sys-util = "0.11.0"
libc = "0.2.137" libc = "0.2.138"
log = "0.4.17" log = "0.4.17"
serde = { version = "1.0.147", features = ["derive"] } serde = { version = "1.0.150", features = ["derive"] }
thiserror = "1.0.37" thiserror = "1.0.37"
versionize = "0.1.6" versionize = "0.1.9"
versionize_derive = "0.1.4" versionize_derive = "0.1.4"
vm-allocator = { path = "../vm-allocator" } vm-allocator = { path = "../vm-allocator" }
vm-device = { path = "../vm-device" } vm-device = { path = "../vm-device" }
vm-memory = "0.9.0" vm-memory = "0.10.0"
vm-migration = { path = "../vm-migration" } vm-migration = { path = "../vm-migration" }
[dependencies.vfio-bindings]
version = "0.3.1"
features = ["fam-wrappers"]

View File

@@ -6,13 +6,13 @@ edition = "2021"
build = "build.rs" build = "build.rs"
[dependencies] [dependencies]
clap = { version = "4.0.18", features = ["wrap_help","cargo"] } clap = { version = "4.0.29", features = ["wrap_help","cargo"] }
dirs = "4.0.0" dirs = "4.0.0"
serde = { version = "1.0.147", features = ["rc", "derive"] } serde = { version = "1.0.150", features = ["rc", "derive"] }
serde_json = "1.0.87" serde_json = "1.0.89"
test_infra = { path = "../test_infra" } test_infra = { path = "../test_infra" }
thiserror = "1.0.37" thiserror = "1.0.37"
wait-timeout = "0.2.0" wait-timeout = "0.2.0"
[build-dependencies] [build-dependencies]
clap = { version = "4.0.18", features = ["cargo"] } clap = { version = "4.0.29", features = ["cargo"] }

View File

@@ -10,7 +10,7 @@ path = "src/qcow.rs"
[dependencies] [dependencies]
byteorder = "1.4.3" byteorder = "1.4.3"
libc = "0.2.137" libc = "0.2.138"
log = "0.4.17" log = "0.4.17"
remain = "0.2.5" remain = "0.2.5"
vmm-sys-util = "0.10.0" vmm-sys-util = "0.11.0"

View File

@@ -4,6 +4,6 @@ version = "0.1.0"
edition = "2021" edition = "2021"
[dependencies] [dependencies]
libc = "0.2.137" libc = "0.2.138"
log = "0.4.17" log = "0.4.17"
vmm-sys-util = "0.10.0" vmm-sys-util = "0.11.0"

View File

@@ -1,3 +1,4 @@
- [v28.1](#v281)
- [v28.0](#v280) - [v28.0](#v280)
- [Community Engagement (Reminder)](#community-engagement-reminder) - [Community Engagement (Reminder)](#community-engagement-reminder)
- [Long Term Support (LTS) Release](#long-term-support-lts-release) - [Long Term Support (LTS) Release](#long-term-support-lts-release)
@@ -247,6 +248,16 @@
- [Unit testing](#unit-testing) - [Unit testing](#unit-testing)
- [Integration tests parallelization](#integration-tests-parallelization) - [Integration tests parallelization](#integration-tests-parallelization)
# v28.1
This is a bug fix release. The following issues have been addressed:
* Update dependencies including a version of `linux-loader` that
addresses an infinite loop issue ([details](https://github.com/rust-vmm/linux-loader/security/advisories/GHSA-52h2-m2cf-9jh6))
* Fix bugs related to `virtio-net` including an integer overflow issue
(#4924, #4949)
* Use host `cpuid` information for L2 cache for older KVM on x86 (#4920)
* Improve README and documentation
# v28.0 # v28.0
This release has been tracked in our new [roadmap This release has been tracked in our new [roadmap

View File

@@ -7,10 +7,10 @@ edition = "2021"
[dependencies] [dependencies]
dirs = "4.0.0" dirs = "4.0.0"
epoll = "4.3.1" epoll = "4.3.1"
libc = "0.2.137" libc = "0.2.138"
once_cell = "1.16.0" once_cell = "1.16.0"
serde = { version = "1.0.147", features = ["rc", "derive"] } serde = { version = "1.0.150", features = ["rc", "derive"] }
serde_json = "1.0.87" serde_json = "1.0.89"
ssh2 = { version = "0.9.3", features = ["vendored-openssl"] } ssh2 = { version = "0.9.3", features = ["vendored-openssl"] }
vmm-sys-util = "0.10.0" vmm-sys-util = "0.11.0"
wait-timeout = "0.2.0" wait-timeout = "0.2.0"

View File

@@ -6,9 +6,9 @@ license = "Apache-2.0"
version = "0.1.0" version = "0.1.0"
[dependencies] [dependencies]
anyhow = "1.0.56" anyhow = "1.0.66"
byteorder = "1.4.3" byteorder = "1.4.3"
libc = "0.2.133" libc = "0.2.138"
log = "0.4.14" log = "0.4.17"
thiserror = "1.0.30" thiserror = "1.0.37"
vmm-sys-util = "0.10.0" vmm-sys-util = "0.11.0"

View File

@@ -5,11 +5,11 @@ authors = ["The Cloud Hypervisor Authors"]
edition = "2021" edition = "2021"
[dependencies] [dependencies]
libc = "0.2.137" libc = "0.2.138"
log = "0.4.17" log = "0.4.17"
once_cell = "1.16.0" once_cell = "1.16.0"
serde = { version = "1.0.147", features = ["rc", "derive"] } serde = { version = "1.0.150", features = ["rc", "derive"] }
serde_json = "1.0.87" serde_json = "1.0.89"
[features] [features]
tracing = [] tracing = []

View File

@@ -5,15 +5,13 @@ authors = ["The Cloud Hypervisor Authors"]
edition = "2021" edition = "2021"
[dependencies] [dependencies]
libc = "0.2.137" libc = "0.2.138"
log = "0.4.17" log = "0.4.17"
serde = { version = "1.0.147", features = ["rc"] } serde = { version = "1.0.150", features = ["rc"] }
serde_derive = "1.0.142" serde_derive = "1.0.150"
serde_json = "1.0.87" serde_json = "1.0.89"
thiserror = "1.0.37" thiserror = "1.0.37"
vm-memory = { version = "0.9.0", features = ["backend-mmap", "backend-atomic"] } vfio-bindings = { git = "https://github.com/rust-vmm/vfio", branch = "main", features = ["fam-wrappers"] }
vmm-sys-util = "0.10.0" vm-memory = { version = "0.10.0", features = ["backend-mmap", "backend-atomic"] }
vmm-sys-util = "0.11.0"
[dependencies.vfio-bindings]
version = "0.3.1"
features = ["fam-wrappers"]

View File

@@ -8,8 +8,8 @@ license = "Apache-2.0"
[dependencies] [dependencies]
byteorder = "1.4.3" byteorder = "1.4.3"
crc32c = "0.6.3" crc32c = "0.6.3"
libc = "0.2.137" libc = "0.2.138"
log = "0.4.17" log = "0.4.17"
remain = "0.2.5" remain = "0.2.5"
thiserror = "1.0.37" thiserror = "1.0.37"
uuid = { version = "1.2.1", features = ["v4"] } uuid = { version = "1.2.2", features = ["v4"] }

View File

@@ -6,19 +6,19 @@ edition = "2021"
[dependencies] [dependencies]
block_util = { path = "../block_util" } block_util = { path = "../block_util" }
clap = { version = "4.0.18", features = ["wrap_help","cargo"] } clap = { version = "4.0.29", features = ["wrap_help","cargo"] }
env_logger = "0.9.3" env_logger = "0.10.0"
epoll = "4.3.1" epoll = "4.3.1"
libc = "0.2.137" libc = "0.2.138"
log = "0.4.17" log = "0.4.17"
option_parser = { path = "../option_parser" } option_parser = { path = "../option_parser" }
qcow = { path = "../qcow" } qcow = { path = "../qcow" }
vhost = { version = "0.5.0", features = ["vhost-user-slave"] } vhost = { version = "0.6.0", features = ["vhost-user-slave"] }
vhost-user-backend = "0.7.0" vhost-user-backend = "0.8.0"
virtio-bindings = "0.1.0" virtio-bindings = "0.1.0"
virtio-queue = "0.6.1" virtio-queue = "0.7.0"
vm-memory = "0.9.0" vm-memory = "0.10.0"
vmm-sys-util = "0.10.0" vmm-sys-util = "0.11.0"
[build-dependencies] [build-dependencies]
clap = { version = "4.0.18", features = ["cargo"] } clap = { version = "4.0.29", features = ["cargo"] }

View File

@@ -5,18 +5,18 @@ authors = ["The Cloud Hypervisor Authors"]
edition = "2021" edition = "2021"
[dependencies] [dependencies]
clap = { version = "4.0.18", features = ["wrap_help","cargo"] } clap = { version = "4.0.29", features = ["wrap_help","cargo"] }
env_logger = "0.9.3" env_logger = "0.10.0"
epoll = "4.3.1" epoll = "4.3.1"
libc = "0.2.137" libc = "0.2.138"
log = "0.4.17" log = "0.4.17"
net_util = { path = "../net_util" } net_util = { path = "../net_util" }
option_parser = { path = "../option_parser" } option_parser = { path = "../option_parser" }
vhost = { version = "0.5.0", features = ["vhost-user-slave"] } vhost = { version = "0.6.0", features = ["vhost-user-slave"] }
vhost-user-backend = "0.7.0" vhost-user-backend = "0.8.0"
virtio-bindings = "0.1.0" virtio-bindings = "0.1.0"
vm-memory = "0.9.0" vm-memory = "0.10.0"
vmm-sys-util = "0.10.0" vmm-sys-util = "0.11.0"
[build-dependencies] [build-dependencies]
clap = { version = "4.0.18", features = ["cargo"] } clap = { version = "4.0.29", features = ["cargo"] }

View File

@@ -14,26 +14,26 @@ block_util = { path = "../block_util" }
byteorder = "1.4.3" byteorder = "1.4.3"
epoll = "4.3.1" epoll = "4.3.1"
event_monitor = { path = "../event_monitor" } event_monitor = { path = "../event_monitor" }
io-uring = "0.5.8" io-uring = "0.5.9"
libc = "0.2.137" libc = "0.2.138"
log = "0.4.17" log = "0.4.17"
net_gen = { path = "../net_gen" } net_gen = { path = "../net_gen" }
net_util = { path = "../net_util" } net_util = { path = "../net_util" }
pci = { path = "../pci" } pci = { path = "../pci" }
rate_limiter = { path = "../rate_limiter" } rate_limiter = { path = "../rate_limiter" }
seccompiler = "0.3.0" seccompiler = "0.3.0"
serde = { version = "1.0.147", features = ["derive"] } serde = { version = "1.0.150", features = ["derive"] }
serde_json = "1.0.87" serde_json = "1.0.89"
serial_buffer = { path = "../serial_buffer" } serial_buffer = { path = "../serial_buffer" }
thiserror = "1.0.37" thiserror = "1.0.37"
versionize = "0.1.6" versionize = "0.1.9"
versionize_derive = "0.1.4" versionize_derive = "0.1.4"
vhost = { version = "0.5.0", features = ["vhost-user-master", "vhost-user-slave", "vhost-kern", "vhost-vdpa"] } vhost = { version = "0.6.0", features = ["vhost-user-master", "vhost-user-slave", "vhost-kern", "vhost-vdpa"] }
virtio-bindings = { version = "0.1.0", features = ["virtio-v5_0_0"] } virtio-bindings = { version = "0.1.0", features = ["virtio-v5_0_0"] }
virtio-queue = "0.6.1" virtio-queue = "0.7.0"
vm-allocator = { path = "../vm-allocator" } vm-allocator = { path = "../vm-allocator" }
vm-device = { path = "../vm-device" } vm-device = { path = "../vm-device" }
vm-memory = { version = "0.9.0", features = ["backend-mmap", "backend-atomic", "backend-bitmap"] } vm-memory = { version = "0.10.0", features = ["backend-mmap", "backend-atomic", "backend-bitmap"] }
vm-migration = { path = "../vm-migration" } vm-migration = { path = "../vm-migration" }
vm-virtio = { path = "../vm-virtio" } vm-virtio = { path = "../vm-virtio" }
vmm-sys-util = "0.10.0" vmm-sys-util = "0.11.0"

View File

@@ -5,8 +5,8 @@ authors = ["The Chromium OS Authors"]
edition = "2021" edition = "2021"
[dependencies] [dependencies]
libc = "0.2.137" libc = "0.2.138"
vm-memory = "0.9.0" vm-memory = "0.10.0"
[target.'cfg(target_arch = "aarch64")'.dependencies] [target.'cfg(target_arch = "aarch64")'.dependencies]
arch = { path = "../arch" } arch = { path = "../arch" }

View File

@@ -13,8 +13,8 @@ mshv = ["vfio-ioctls/mshv"]
anyhow = "1.0.66" anyhow = "1.0.66"
hypervisor = { path = "../hypervisor" } hypervisor = { path = "../hypervisor" }
thiserror = "1.0.37" thiserror = "1.0.37"
serde = { version = "1.0.147", features = ["rc", "derive"] } serde = { version = "1.0.150", features = ["rc", "derive"] }
vfio-ioctls = { git = "https://github.com/rust-vmm/vfio", branch = "main", default-features = false } vfio-ioctls = { git = "https://github.com/rust-vmm/vfio", branch = "main", default-features = false }
vm-memory = { version = "0.9.0", features = ["backend-mmap"] } vm-memory = { version = "0.10.0", features = ["backend-mmap"] }
vmm-sys-util = "0.10.0" vmm-sys-util = "0.11.0"

View File

@@ -7,8 +7,8 @@ edition = "2021"
[dependencies] [dependencies]
anyhow = "1.0.66" anyhow = "1.0.66"
thiserror = "1.0.37" thiserror = "1.0.37"
serde = { version = "1.0.147", features = ["rc", "derive"] } serde = { version = "1.0.150", features = ["rc", "derive"] }
serde_json = "1.0.87" serde_json = "1.0.89"
versionize = "0.1.6" versionize = "0.1.9"
versionize_derive = "0.1.4" versionize_derive = "0.1.4"
vm-memory = { version = "0.9.0", features = ["backend-mmap", "backend-atomic"] } vm-memory = { version = "0.10.0", features = ["backend-mmap", "backend-atomic"] }

View File

@@ -13,7 +13,7 @@ pub mod protocol;
/// Global VMM version for versioning /// Global VMM version for versioning
const MAJOR_VERSION: u16 = 28; const MAJOR_VERSION: u16 = 28;
const MINOR_VERSION: u16 = 0; const MINOR_VERSION: u16 = 1;
const VMM_VERSION: u16 = MAJOR_VERSION << 12 | MINOR_VERSION & 0b1111; const VMM_VERSION: u16 = MAJOR_VERSION << 12 | MINOR_VERSION & 0b1111;
pub trait VersionMapped { pub trait VersionMapped {

View File

@@ -9,5 +9,5 @@ default = []
[dependencies] [dependencies]
log = "0.4.17" log = "0.4.17"
virtio-queue = "0.6.1" virtio-queue = "0.7.0"
vm-memory = { version = "0.9.0", features = ["backend-mmap", "backend-atomic", "backend-bitmap"] } vm-memory = { version = "0.10.0", features = ["backend-mmap", "backend-atomic", "backend-bitmap"] }

View File

@@ -19,15 +19,15 @@ arc-swap = "1.5.1"
arch = { path = "../arch" } arch = { path = "../arch" }
bitflags = "1.3.2" bitflags = "1.3.2"
block_util = { path = "../block_util" } block_util = { path = "../block_util" }
clap = "4.0.18" clap = "4.0.29"
devices = { path = "../devices" } devices = { path = "../devices" }
epoll = "4.3.1" epoll = "4.3.1"
event_monitor = { path = "../event_monitor" } event_monitor = { path = "../event_monitor" }
gdbstub = { version = "0.6.3", optional = true } gdbstub = { version = "0.6.3", optional = true }
gdbstub_arch = { version = "0.2.4", optional = true } gdbstub_arch = { version = "0.2.4", optional = true }
hypervisor = { path = "../hypervisor" } hypervisor = { path = "../hypervisor" }
libc = "0.2.137" libc = "0.2.138"
linux-loader = { version = "0.7.0", features = ["elf", "bzimage", "pe"] } linux-loader = { version = "0.8.1", features = ["elf", "bzimage", "pe"] }
log = "0.4.17" log = "0.4.17"
micro_http = { git = "https://github.com/firecracker-microvm/micro-http", branch = "main" } micro_http = { git = "https://github.com/firecracker-microvm/micro-http", branch = "main" }
net_util = { path = "../net_util" } net_util = { path = "../net_util" }
@@ -36,23 +36,23 @@ option_parser = { path = "../option_parser" }
pci = { path = "../pci" } pci = { path = "../pci" }
qcow = { path = "../qcow" } qcow = { path = "../qcow" }
seccompiler = "0.3.0" seccompiler = "0.3.0"
serde = { version = "1.0.147", features = ["rc", "derive"] } serde = { version = "1.0.150", features = ["rc", "derive"] }
serde_json = "1.0.87" serde_json = "1.0.89"
serial_buffer = { path = "../serial_buffer" } serial_buffer = { path = "../serial_buffer" }
signal-hook = "0.3.14" signal-hook = "0.3.14"
thiserror = "1.0.37" thiserror = "1.0.37"
tracer = { path = "../tracer" } tracer = { path = "../tracer" }
uuid = "1.2.1" uuid = "1.2.2"
versionize = "0.1.6" versionize = "0.1.9"
versionize_derive = "0.1.4" versionize_derive = "0.1.4"
vfio-ioctls = { git = "https://github.com/rust-vmm/vfio", branch = "main", default-features = false } vfio-ioctls = { git = "https://github.com/rust-vmm/vfio", branch = "main", default-features = false }
vfio_user = { path = "../vfio_user" } vfio_user = { path = "../vfio_user" }
vhdx = { path = "../vhdx" } vhdx = { path = "../vhdx" }
virtio-devices = { path = "../virtio-devices" } virtio-devices = { path = "../virtio-devices" }
virtio-queue = "0.6.1" virtio-queue = "0.7.0"
vm-allocator = { path = "../vm-allocator" } vm-allocator = { path = "../vm-allocator" }
vm-device = { path = "../vm-device" } vm-device = { path = "../vm-device" }
vm-memory = { version = "0.9.0", features = ["backend-mmap", "backend-atomic", "backend-bitmap"] } vm-memory = { version = "0.10.0", features = ["backend-mmap", "backend-atomic", "backend-bitmap"] }
vm-migration = { path = "../vm-migration" } vm-migration = { path = "../vm-migration" }
vm-virtio = { path = "../vm-virtio" } vm-virtio = { path = "../vm-virtio" }
vmm-sys-util = { version = "0.10.0", features = ["with-serde"] } vmm-sys-util = { version = "0.11.0", features = ["with-serde"] }

View File

@@ -342,8 +342,10 @@ pub fn start_http_path_thread(
) -> Result<thread::JoinHandle<Result<()>>> { ) -> Result<thread::JoinHandle<Result<()>>> {
let socket_path = PathBuf::from(path); let socket_path = PathBuf::from(path);
let socket_fd = UnixListener::bind(socket_path).map_err(VmmError::CreateApiServerSocket)?; let socket_fd = UnixListener::bind(socket_path).map_err(VmmError::CreateApiServerSocket)?;
let server = // SAFETY: Valid FD just opened
HttpServer::new_from_fd(socket_fd.into_raw_fd()).map_err(VmmError::CreateApiServer)?; let server = unsafe {
HttpServer::new_from_fd(socket_fd.into_raw_fd()).map_err(VmmError::CreateApiServer)?
};
start_http_thread( start_http_thread(
server, server,
api_notifier, api_notifier,
@@ -362,7 +364,8 @@ pub fn start_http_fd_thread(
exit_evt: EventFd, exit_evt: EventFd,
hypervisor_type: HypervisorType, hypervisor_type: HypervisorType,
) -> Result<thread::JoinHandle<Result<()>>> { ) -> Result<thread::JoinHandle<Result<()>>> {
let server = HttpServer::new_from_fd(fd).map_err(VmmError::CreateApiServer)?; // SAFETY: Valid FD
let server = unsafe { HttpServer::new_from_fd(fd).map_err(VmmError::CreateApiServer)? };
start_http_thread( start_http_thread(
server, server,
api_notifier, api_notifier,