From bd4cd4544a08c0ec066ee04476a9ee511968b757 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 9 May 2022 10:01:59 +0000 Subject: [PATCH 1/2] build(deps): bump vm-memory from 0.7.0 to 0.8.0 Bumps [vm-memory](https://github.com/rust-vmm/vm-memory) from 0.7.0 to 0.8.0. - [Release notes](https://github.com/rust-vmm/vm-memory/releases) - [Changelog](https://github.com/rust-vmm/vm-memory/blob/main/CHANGELOG.md) - [Commits](https://github.com/rust-vmm/vm-memory/compare/v0.7.0...v0.8.0) --- updated-dependencies: - dependency-name: vm-memory dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Cargo.lock | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index fb81979..af8dd2b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -431,7 +431,7 @@ checksum = "53567fd9ab820e4f3cc156f24146882fee3c365194c3e1dea74723265f27fc88" dependencies = [ "bitflags", "libc", - "vm-memory", + "vm-memory 0.8.0", "vmm-sys-util", ] @@ -449,7 +449,7 @@ dependencies = [ "vhost-user-backend", "virtio-bindings", "virtio-queue", - "vm-memory", + "vm-memory 0.8.0", "vmm-sys-util", ] @@ -466,7 +466,7 @@ dependencies = [ "vhost-user-backend", "virtio-bindings", "virtio-queue", - "vm-memory", + "vm-memory 0.8.0", "vmm-sys-util", ] @@ -486,7 +486,7 @@ dependencies = [ "vhost-user-backend", "virtio-bindings", "virtio-queue", - "vm-memory", + "vm-memory 0.8.0", "vmm-sys-util", ] @@ -501,7 +501,7 @@ dependencies = [ "vhost", "virtio-bindings", "virtio-queue", - "vm-memory", + "vm-memory 0.7.0", "vmm-sys-util", ] @@ -518,7 +518,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3785325315e6496fa88673842ee6cd198b9658e88e8b0e1ad48a5dc818b221dc" dependencies = [ "log", - "vm-memory", + "vm-memory 0.7.0", "vmm-sys-util", ] @@ -533,6 +533,17 @@ dependencies = [ "winapi", ] +[[package]] +name = "vm-memory" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "767ed8aaebbff902e02e6d3749dc2baef55e46565f8a6414a065e5baee4b4a81" +dependencies = [ + "arc-swap", + "libc", + "winapi", +] + [[package]] name = "vmm-sys-util" version = "0.9.0" From c037e60442559b7bd47e37a8682eb2491de3850b Mon Sep 17 00:00:00 2001 From: Viresh Kumar Date: Mon, 11 Jul 2022 09:57:19 +0530 Subject: [PATCH 2/2] Update versions of rust-vmm dependency crates Update a number of rust-vmm crates to align to the common version of vm-memory. Also update the tests to fix the build. Signed-off-by: Viresh Kumar --- Cargo.lock | 31 ++++++++++--------------------- gpio/Cargo.toml | 10 +++++----- gpio/src/vhu_gpio.rs | 6 +++--- i2c/Cargo.toml | 10 +++++----- i2c/src/vhu_i2c.rs | 8 ++++---- rng/Cargo.toml | 10 +++++----- rng/src/vhu_rng.rs | 2 +- 7 files changed, 33 insertions(+), 44 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index af8dd2b..0248906 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -431,7 +431,7 @@ checksum = "53567fd9ab820e4f3cc156f24146882fee3c365194c3e1dea74723265f27fc88" dependencies = [ "bitflags", "libc", - "vm-memory 0.8.0", + "vm-memory", "vmm-sys-util", ] @@ -449,7 +449,7 @@ dependencies = [ "vhost-user-backend", "virtio-bindings", "virtio-queue", - "vm-memory 0.8.0", + "vm-memory", "vmm-sys-util", ] @@ -466,7 +466,7 @@ dependencies = [ "vhost-user-backend", "virtio-bindings", "virtio-queue", - "vm-memory 0.8.0", + "vm-memory", "vmm-sys-util", ] @@ -486,22 +486,22 @@ dependencies = [ "vhost-user-backend", "virtio-bindings", "virtio-queue", - "vm-memory 0.8.0", + "vm-memory", "vmm-sys-util", ] [[package]] name = "vhost-user-backend" -version = "0.3.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1490f2028d4f119b2292efe218b5f8cfc6471f039b53b6a6eb5d9513e964facc" +checksum = "3eeb6723bbee20dbc2db95c575941922fb96e77eb41786ecd1c8c03348709c4c" dependencies = [ "libc", "log", "vhost", "virtio-bindings", "virtio-queue", - "vm-memory 0.7.0", + "vm-memory", "vmm-sys-util", ] @@ -513,26 +513,15 @@ checksum = "3ff512178285488516ed85f15b5d0113a7cdb89e9e8a760b269ae4f02b84bd6b" [[package]] name = "virtio-queue" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3785325315e6496fa88673842ee6cd198b9658e88e8b0e1ad48a5dc818b221dc" +checksum = "519c0a333c871650269cba303bc108075d52a0c0d64f9b91fae61829b53725af" dependencies = [ "log", - "vm-memory 0.7.0", + "vm-memory", "vmm-sys-util", ] -[[package]] -name = "vm-memory" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "339d4349c126fdcd87e034631d7274370cf19eb0e87b33166bcd956589fc72c5" -dependencies = [ - "arc-swap", - "libc", - "winapi", -] - [[package]] name = "vm-memory" version = "0.8.0" diff --git a/gpio/Cargo.toml b/gpio/Cargo.toml index 22353ea..9e10332 100644 --- a/gpio/Cargo.toml +++ b/gpio/Cargo.toml @@ -18,15 +18,15 @@ libc = ">=0.2.95" log = ">=0.4.6" thiserror = "1.0" vhost = { version = "0.4", features = ["vhost-user-slave"] } -vhost-user-backend = "0.3" +vhost-user-backend = "0.5" virtio-bindings = ">=0.1" -virtio-queue = "0.2" -vm-memory = ">=0.7" +virtio-queue = "0.4" +vm-memory = ">=0.8" vmm-sys-util = "=0.9.0" [target.'cfg(target_env = "gnu")'.dependencies] libgpiod = { git = "https://github.com/vireshk/libgpiod" } [dev-dependencies] -virtio-queue = { version = "0.2", features = ["test-utils"] } -vm-memory = { version = ">=0.7.0", features = ["backend-mmap", "backend-atomic"] } +virtio-queue = { version = "0.4", features = ["test-utils"] } +vm-memory = { version = ">=0.8.0", features = ["backend-mmap", "backend-atomic"] } diff --git a/gpio/src/vhu_gpio.rs b/gpio/src/vhu_gpio.rs index bbcd492..ee9a40a 100644 --- a/gpio/src/vhu_gpio.rs +++ b/gpio/src/vhu_gpio.rs @@ -518,13 +518,13 @@ mod tests { ); mem.write_obj::(out_hdr, desc_out.addr()).unwrap(); - vq.desc_table().store(index, desc_out); + vq.desc_table().store(index, desc_out).unwrap(); next_addr += desc_out.len() as u64; index += 1; // In response descriptor let desc_in = Descriptor::new(next_addr, response_len, VIRTQ_DESC_F_WRITE, 0); - vq.desc_table().store(index, desc_in); + vq.desc_table().store(index, desc_in).unwrap(); // Put the descriptor index 0 in the first available ring position. mem.write_obj(0u16, vq.avail_addr().unchecked_add(4)) @@ -597,7 +597,7 @@ mod tests { }; let desc = Descriptor::new(offset, len[i], f, (i + 1) as u16); - vq.desc_table().store(i as u16, desc); + vq.desc_table().store(i as u16, desc).unwrap(); } // Put the descriptor index 0 in the first available ring position. diff --git a/i2c/Cargo.toml b/i2c/Cargo.toml index a4c9e6e..8f0209c 100644 --- a/i2c/Cargo.toml +++ b/i2c/Cargo.toml @@ -18,12 +18,12 @@ libc = ">=0.2.95" log = ">=0.4.6" thiserror = "1.0" vhost = { version = "0.4", features = ["vhost-user-slave"] } -vhost-user-backend = "0.3" +vhost-user-backend = "0.5" virtio-bindings = ">=0.1" -virtio-queue = "0.2" -vm-memory = ">=0.7" +virtio-queue = "0.4" +vm-memory = ">=0.8" vmm-sys-util = "=0.9.0" [dev-dependencies] -virtio-queue = { version = "0.2", features = ["test-utils"] } -vm-memory = { version = ">=0.7.0", features = ["backend-mmap", "backend-atomic"] } +virtio-queue = { version = "0.4", features = ["test-utils"] } +vm-memory = { version = ">=0.8.0", features = ["backend-mmap", "backend-atomic"] } diff --git a/i2c/src/vhu_i2c.rs b/i2c/src/vhu_i2c.rs index d697518..f594605 100644 --- a/i2c/src/vhu_i2c.rs +++ b/i2c/src/vhu_i2c.rs @@ -391,7 +391,7 @@ mod tests { mem.write_obj::(out_hdr, desc_out.addr()) .unwrap(); - vq.desc_table().store(index, desc_out); + vq.desc_table().store(index, desc_out).unwrap(); next_addr += desc_out.len() as u64; index += 1; @@ -412,14 +412,14 @@ mod tests { index + 1, ); mem.write(buf, desc_buf.addr()).unwrap(); - vq.desc_table().store(index, desc_buf); + vq.desc_table().store(index, desc_buf).unwrap(); next_addr += desc_buf.len() as u64; index += 1; } // In response descriptor let desc_in = Descriptor::new(next_addr, size_of::() as u32, VIRTQ_DESC_F_WRITE, 0); - vq.desc_table().store(index, desc_in); + vq.desc_table().store(index, desc_in).unwrap(); // Put the descriptor index 0 in the first available ring position. mem.write_obj(0u16, vq.avail_addr().unchecked_add(4)) @@ -492,7 +492,7 @@ mod tests { }; let desc = Descriptor::new(offset, len[i], f, (i + 1) as u16); - vq.desc_table().store(i as u16, desc); + vq.desc_table().store(i as u16, desc).unwrap(); } // Put the descriptor index 0 in the first available ring position. diff --git a/rng/Cargo.toml b/rng/Cargo.toml index c6a0a08..862e264 100644 --- a/rng/Cargo.toml +++ b/rng/Cargo.toml @@ -19,12 +19,12 @@ rand = ">=0.8.5" tempfile = "3.2.0" thiserror = "1.0" vhost = { version = "0.4", features = ["vhost-user-slave"] } -vhost-user-backend = "0.3" +vhost-user-backend = "0.5" virtio-bindings = ">=0.1" -virtio-queue = "0.2" -vm-memory = ">=0.7" +virtio-queue = "0.4" +vm-memory = ">=0.8" vmm-sys-util = ">=0.9.0" [dev-dependencies] -virtio-queue = { version = "0.2", features = ["test-utils"] } -vm-memory = { version = ">=0.7.0", features = ["backend-mmap", "backend-atomic"] } +virtio-queue = { version = "0.4", features = ["test-utils"] } +vm-memory = { version = ">=0.8.0", features = ["backend-mmap", "backend-atomic"] } diff --git a/rng/src/vhu_rng.rs b/rng/src/vhu_rng.rs index de3498b..e5d0ec4 100644 --- a/rng/src/vhu_rng.rs +++ b/rng/src/vhu_rng.rs @@ -349,7 +349,7 @@ mod tests { }; let desc = Descriptor::new((0x100 * (i + 1)) as u64, 0x200, desc_flags, i + 1); - vq.desc_table().store(i, desc); + vq.desc_table().store(i, desc).unwrap(); } // Put the descriptor index 0 in the first available ring position.