As reported in https://github.com/rust-vmm/vm-memory/pull/369,
vm-memory 0.17.2:
breaks the vhost-user-backend crate, whose vring types require some
type `M: GuestAddressSpace` with the expectation that `M::memory()`
will return something that derefs to an `0.17::GuestMemory`"
So let's pin vm-memory to 0.17.1 for now while waiting for 0.17.3 release
that will include that fix.
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Update to v0.15.0 which supports sock_ctrl_msg on POSIX and adds
a cross platform event notification that uses EventFd when available
or pipe().
Because sock_ctrl_msg modifies the recv_with_fds, we need to modify the test
in vhost/src/vhost-user/connection.rs at the same time
Signed-off-by: Wenyu Huang <huangwenyuu@outlook.com>
Update vm-sys-util crate from 0.12.1 to 0.14.0. Also, bump vm-memory to
latest 0.16.2 which uses that vmm-sys-util version.
Signed-off-by: Babis Chalios <bchalios@amazon.es>
By centralizing rust-vmm crates to workspace root, effectively reduce
places to look around when updating dependencies manually.
Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
Having all the workspace crates under the crates/ directory is
unnecessary. Rust documentation itself recommends all crates to be in
the root directory:
https://doc.rust-lang.org/book/ch14-03-cargo-workspaces.html#creating-the-second-package-in-the-workspace
I paste the text content here, in case the online page ever changes or
becomes unavailable:
## Creating the Second Package in the Workspace
Next, let’s create another member package in the workspace and call it add_one. Change the top-level Cargo.toml to specify the add_one path in the members list:
Filename: Cargo.toml
[workspace]
members = [
"adder",
"add_one",
]
Then generate a new library crate named add_one:
$ cargo new add_one --lib
Created library `add_one` package
Your add directory should now have these directories and files:
├── Cargo.lock
├── Cargo.toml
├── add_one
│ ├── Cargo.toml
│ └── src
│ └── lib.rs
├── adder
│ ├── Cargo.toml
│ └── src
│ └── main.rs
└── target
Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
After updating rust edition to 2021, cargo complains about the
resolver:
warning: some crates are on edition 2021 which defaults to
`resolver = "2"`, but virtual workspaces default to
`resolver = "1"`
note: to keep the current resolver, specify
`workspace.resolver = "1"` in the workspace root's manifest
note: to use the edition 2021 resolver, specify
`workspace.resolver = "2"` in the workspace root's manifest
Let's specify to use the edition 2021 resolver.
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Convert the vhost git repository into a crate, which hosts vhost crate
for now. Support for vhost-user-backend and other crates will be added
later on.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Update libc, log, vhost, virtio-queue and vm-memory
dependencies. Also, take this opportunity to specify the dependencies
with caret versions.
Switching to a newer vhost required some small changes to accommodate
the fact that VhostUserError::InvalidOperation now requires an
argument.
Signed-off-by: Sergio Lopez <slp@redhat.com>
The virtio-queue interface is updated to take into consideration error
cases and to export a single Queue.
Signed-off-by: Andreea Florescu <fandree@amazon.com>
This release aligns its dependencies with rust-vmm's vhost
infrastructure by moving to virtio-queue v0.4.0.
Signed-off-by: Sergio Lopez <slp@redhat.com>
This release aligns its dependencies with rust-vmm's vhost
infrastructure by moving to virtio-queue v0.3.0 and relaxing the
vm-memory dependency to require ">=0.7".
Signed-off-by: Sergio Lopez <slp@redhat.com>
This allows the use of newer versions of the vm-memory crate when
combined with other dependencies.
Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This release contains some fixes for the CI as well as the CODEOWNERS
file. It fixes the implementation of get_iova_range() for vDPA, and
finally it implements its own version of the VhostKernBackend::valid()
method for vDPA.
Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This release implements AsRawFd for VringEpollHandler, as well as adds a
way for running the vhost-user daemon as a client.
Both of these are required by Cloud Hypervisor to rely on the
vhost-user-backend crate.
Fixes#62
Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
Previous patch causes dramatic code coverage decrease, it actually
disclose some issue in the code coverage test. Then we add test case
to cover VhostUserHandler, it actually increases the code coverage.
Signed-off-by: Liu Jiang <gerry@linux.alibaba.com>
Try to increase code coverage by adding more test code. But it actually
causes dramatic decreases in code coverage:(
Signed-off-by: Liu Jiang <gerry@linux.alibaba.com>
Previously VringStateGuard and VringStateMutGuard are defined as enum,
which limits the extensibility of the interface. So convert them into
traits by using the High Rank Trait Bound tricky.
Signed-off-by: Liu Jiang <gerry@linux.alibaba.com>
Update virtio-queue dependency to the latest available version, rev
"cc1fa35". This one comes with a number of fixes and new features,
such as QueueGuard and support for big-endian machines.
Signed-off-by: Sergio Lopez <slp@redhat.com>
Commit 66cda80 ("Update vm-memory requirement from 0.6 to 0.7")
is required to build this crate with vm-memory v0.7
There were API changes since commit 6013dd9, so let's update
code and tests.
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
By relaxing the dependency to ">=0.6" this crate can be used in projects
using newer vm-memory without pulling in duplicates of the crate.
Signed-off-by: Rob Bradford <robert.bradford@intel.com>
There's a wrapper for epoll from vmm-sys-util, so use the wrapper
instead of the epoll crate directly. It may help to ease dependency
management.
Signed-off-by: Liu Jiang <gerry@linux.alibaba.com>
In addition to bringing the features from the new vhost crate, this
fixes the breakage caused by rust-vmm/vmm-sys-util#135
Signed-off-by: Sergio Lopez <slp@redhat.com>
crates.io does not allow publishing crates which have wildcards in
their dependencies. We had one for "serial_test", so replace the
wildcard pointing it to the current major/minor ("0.5").
Signed-off-by: Sergio Lopez <slp@redhat.com>
Add a vhost-vdpa in-kernel implementation of VhostVdpa trait.
Tests are serialized since the device supports only a single user
at a time.
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Add new VhostVdpa trait to handle vhost-vdpa devices and a new
vhost-vdpa building feature.
vhost-vdpa devices is based on vhost backend, for this reason
VhostVdpa trait requires VhostBackend.
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>