From 50312eadfcb0fabc014ec7dab8f742031cb4277d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 4 Jan 2022 21:37:23 +0000 Subject: [PATCH 1/2] build(deps): bump vhost from 0.2.0 to 0.3.0 Bumps [vhost](https://github.com/rust-vmm/vhost) from 0.2.0 to 0.3.0. - [Release notes](https://github.com/rust-vmm/vhost/releases) - [Changelog](https://github.com/rust-vmm/vhost/blob/main/CHANGELOG.md) - [Commits](https://github.com/rust-vmm/vhost/compare/v0.2.0...v0.3.0) --- updated-dependencies: - dependency-name: vhost dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Cargo.lock | 16 ++++++++++++++-- i2c/Cargo.toml | 2 +- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9e3b664..8a8a0ef 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -276,6 +276,18 @@ dependencies = [ "vmm-sys-util", ] +[[package]] +name = "vhost" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b56bf8f178fc500fe14505fca8b00dec76fc38f2304f461c8d9d7547982311d" +dependencies = [ + "bitflags", + "libc", + "vm-memory 0.7.0", + "vmm-sys-util", +] + [[package]] name = "vhost-device-i2c" version = "0.1.0" @@ -284,7 +296,7 @@ dependencies = [ "libc", "log", "thiserror", - "vhost", + "vhost 0.3.0", "vhost-user-backend", "virtio-bindings", "virtio-queue", @@ -299,7 +311,7 @@ source = "git+https://github.com/rust-vmm/vhost-user-backend?rev=4047c697470cc6c dependencies = [ "libc", "log", - "vhost", + "vhost 0.2.0", "virtio-bindings", "virtio-queue", "vm-memory 0.7.0", diff --git a/i2c/Cargo.toml b/i2c/Cargo.toml index 4340251..ae75883 100644 --- a/i2c/Cargo.toml +++ b/i2c/Cargo.toml @@ -16,7 +16,7 @@ clap = { version = "=3.0.0-beta.2", features = ["yaml"] } libc = ">=0.2.95" log = ">=0.4.6" thiserror = "1.0" -vhost = { version = "0.2", features = ["vhost-user-slave"] } +vhost = { version = "0.3", features = ["vhost-user-slave"] } vhost-user-backend = { git = "https://github.com/rust-vmm/vhost-user-backend", rev = "4047c697470cc6c37e8e1835025b091d2b59c2f7" } virtio-bindings = ">=0.1" virtio-queue = { git = "https://github.com/rust-vmm/vm-virtio", rev = "66cda80" } From 7492b83692717af4ac53b70cb10de5d5ef9b7acc Mon Sep 17 00:00:00 2001 From: Viresh Kumar Date: Wed, 5 Jan 2022 10:52:38 +0530 Subject: [PATCH 2/2] i2c: Fix build issues with vhost update Update version of other dependencies and fix minor build issues. Signed-off-by: Viresh Kumar --- Cargo.lock | 40 ++++++++++------------------------------ i2c/Cargo.toml | 6 +++--- i2c/src/vhu_i2c.rs | 6 ++++-- 3 files changed, 17 insertions(+), 35 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8a8a0ef..2299170 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -264,18 +264,6 @@ version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" -[[package]] -name = "vhost" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d23ddeb452fb4f837526c6298cc8a2f4948e5595b0328a3d61b5eebe51874d7" -dependencies = [ - "bitflags", - "libc", - "vm-memory 0.6.0", - "vmm-sys-util", -] - [[package]] name = "vhost" version = "0.3.0" @@ -284,7 +272,7 @@ checksum = "3b56bf8f178fc500fe14505fca8b00dec76fc38f2304f461c8d9d7547982311d" dependencies = [ "bitflags", "libc", - "vm-memory 0.7.0", + "vm-memory", "vmm-sys-util", ] @@ -296,25 +284,26 @@ dependencies = [ "libc", "log", "thiserror", - "vhost 0.3.0", + "vhost", "vhost-user-backend", "virtio-bindings", "virtio-queue", - "vm-memory 0.7.0", + "vm-memory", "vmm-sys-util", ] [[package]] name = "vhost-user-backend" version = "0.1.0" -source = "git+https://github.com/rust-vmm/vhost-user-backend?rev=4047c697470cc6c37e8e1835025b091d2b59c2f7#4047c697470cc6c37e8e1835025b091d2b59c2f7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8db00e93514caa8987bb8b536fe962c9b66b4068583abc4c531eb97988477cd" dependencies = [ "libc", "log", - "vhost 0.2.0", + "vhost", "virtio-bindings", "virtio-queue", - "vm-memory 0.7.0", + "vm-memory", "vmm-sys-util", ] @@ -327,23 +316,14 @@ checksum = "3ff512178285488516ed85f15b5d0113a7cdb89e9e8a760b269ae4f02b84bd6b" [[package]] name = "virtio-queue" version = "0.1.0" -source = "git+https://github.com/rust-vmm/vm-virtio?rev=66cda80#66cda803e406217945c1f93e6a4fb3b7c2a6983b" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f90da9e627f6aaf667cc7b6548a28be332d3e1f058f4ceeb46ab6bcee5c4b74d" dependencies = [ "log", - "vm-memory 0.7.0", + "vm-memory", "vmm-sys-util", ] -[[package]] -name = "vm-memory" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a8ebcb86ca457f9d6e14cf97009f679952eba42f0113de5db596e514cd0e43b" -dependencies = [ - "libc", - "winapi", -] - [[package]] name = "vm-memory" version = "0.7.0" diff --git a/i2c/Cargo.toml b/i2c/Cargo.toml index ae75883..8632756 100644 --- a/i2c/Cargo.toml +++ b/i2c/Cargo.toml @@ -17,12 +17,12 @@ libc = ">=0.2.95" log = ">=0.4.6" thiserror = "1.0" vhost = { version = "0.3", features = ["vhost-user-slave"] } -vhost-user-backend = { git = "https://github.com/rust-vmm/vhost-user-backend", rev = "4047c697470cc6c37e8e1835025b091d2b59c2f7" } +vhost-user-backend = "0.1" virtio-bindings = ">=0.1" -virtio-queue = { git = "https://github.com/rust-vmm/vm-virtio", rev = "66cda80" } +virtio-queue = "0.1" vm-memory = "0.7" vmm-sys-util = "=0.9.0" [dev-dependencies] -virtio-queue = { git = "https://github.com/rust-vmm/vm-virtio", rev = "66cda80", features = ["test-utils"] } +virtio-queue = { version = "0.1", features = ["test-utils"] } vm-memory = { version = "0.7.0", features = ["backend-mmap", "backend-atomic"] } diff --git a/i2c/src/vhu_i2c.rs b/i2c/src/vhu_i2c.rs index 9582afd..9ee9129 100644 --- a/i2c/src/vhu_i2c.rs +++ b/i2c/src/vhu_i2c.rs @@ -18,7 +18,9 @@ use virtio_bindings::bindings::virtio_ring::{ VIRTIO_RING_F_EVENT_IDX, VIRTIO_RING_F_INDIRECT_DESC, }; use virtio_queue::DescriptorChain; -use vm_memory::{ByteValued, Bytes, GuestMemoryAtomic, GuestMemoryMmap, Le16, Le32}; +use vm_memory::{ + ByteValued, Bytes, GuestMemoryAtomic, GuestMemoryLoadGuard, GuestMemoryMmap, Le16, Le32, +}; use vmm_sys_util::epoll::EventSet; use vmm_sys_util::eventfd::{EventFd, EFD_NONBLOCK}; @@ -97,7 +99,7 @@ pub struct VhostUserI2cBackend { pub exit_event: EventFd, } -type I2cDescriptorChain = DescriptorChain>>; +type I2cDescriptorChain = DescriptorChain>>; impl VhostUserI2cBackend { pub fn new(i2c_map: Arc>) -> Result {