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>
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>
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>
Converting arbitrary bytes into an arbitrary Rust value is unsafe.
For example, it's unsafe to create a String that isn't valid UTF-8.
But the various internal recv* functions didn't restrict their return
types enough to enforce this invariant, making them unsafe without
being properly marked.
To fix this, we tighten up the bounds of the functions to enforce that
their return types are ByteValued, meaning that they can only be used
to create types that are safe to initialize with arbitrary data such
as might be received over a socket.
It's worth asking how these functions could have been unsafe in the
first place, since they don't contain any unsafe blocks themselves.
The answer is that the functions that recv into iovecs are also unsafe
but not correctly marked. I'm preparing further patches to fix that
up, but it's a lot of work so I've separated out this change in the
hope of getting it in first and making the diff for the next one
smaller.
This internal tightening shouldn't result in any public API changes.
Signed-off-by: Alyssa Ross <hi@alyssa.is>
"Apache-2.0 or BSD-3-Clause" is not an valid license statement and is
rejected by cargo. So change it to "Apache-2.0 OR BSD-3-Clause".
Signed-off-by: Liu Jiang <gerry@linux.alibaba.com>
Rename LICENSE-BSD-Chromium as LICENSE-BSD-Google to match the
reference in source file. Also remoce LICENSE-BSD-3-Clause, all code
contributed by Alibaba is licensed under Apache 2.0.
Signed-off-by: Liu Jiang <gerry@linux.alibaba.com>
build(deps): update vm-memory requirement from 0.2.0 to 0.5.0
Updates the requirements on
[vm-memory](https://github.com/rust-vmm/vm-memory) to permit the latest
version.
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
The inflight I/O tracking feature is useful for handling crashes and
disconnections from the backend. It allows the backend to rely on a
buffer that was shared earlier with the VMM to restore to the previous
state it was before the crash.
This feature depends on the availability of the protocol feature
VHOST_USER_PROTOCOL_F_INFLIGHT_SHMFD, and it implements both
VHOST_USER_GET_INFLIGHT_FD and VHOST_USER_SET_INFLIGHT_FD messages.
Fixes#43
Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
Prepare for publishing to crates.io,
1) update README.md
2) update Cargo.toml
3) set code owners
It should be ready for publishing now.
Signed-off-by: Liu Jiang <gerry@linux.alibaba.com>
Upgrade Cargo.toml to rust edition 2018. Also introduce a helper
feature flag "vhost-user" to simplify code.
Signed-off-by: Liu Jiang <gerry@linux.alibaba.com>
Only basic messages are defined, and the vhost-user spec is also under
development. So feel free to add needed messages.
Signed-off-by: Liu Jiang <gerry@linux.alibaba.com>
Signed-off-by: Daniel Prilik <daniel@prilik.com>
The auto-generated vhost binding is small, it would be better
to include it into the vhost crate instead of building another
dedicated crate for it.
Signed-off-by: Liu Jiang <gerry@linux.alibaba.com>
These interfaces are derived from the firecracker and crosvm projects.
They may be extended when enable support of vhost-user protocol.
Signed-off-by: Liu Jiang <gerry@linux.alibaba.com>