Commit graph

74 commits

Author SHA1 Message Date
Stefano Garzarella
449b8f58e8 Pin vm-memory to 0.17.1
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>
2026-01-08 13:22:31 +02:00
dependabot[bot]
1d39cf5cbb build(deps): bump the vhost group across 1 directory with 2 updates
Updates the requirements on [virtio-queue](https://github.com/rust-vmm/vm-virtio) and [vm-memory](https://github.com/rust-vmm/vm-memory) to permit the latest version.

Updates `virtio-queue` to 0.17.0
- [Release notes](https://github.com/rust-vmm/vm-virtio/releases)
- [Commits](https://github.com/rust-vmm/vm-virtio/compare/virtio-queue-v0.16.0...virtio-queue-v0.17.0)

Updates `vm-memory` to 0.17.1
- [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.16.2...v0.17.1)

---
updated-dependencies:
- dependency-name: virtio-queue
  dependency-version: 0.17.0
  dependency-type: direct:production
  dependency-group: vhost
- dependency-name: vm-memory
  dependency-version: 0.17.1
  dependency-type: direct:production
  dependency-group: vhost
...

Signed-off-by: dependabot[bot] <support@github.com>
[SG: adapted code to vm-memory changes, mainly related to changes on
 return types (e.g. Option vs Result, etc.)]
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
2025-11-18 08:35:16 +01:00
Wenyu Huang
e869735f3f chore: update the vmm-sys-util version
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>
2025-08-27 10:18:07 +02:00
Jinank Jain
3db761bb85 build: Update virtio-queue and virtio-bindings
Bump virtio-queue from v0.16.0 to v0.16.0

Bump virtio-bindings from v0.2.5 to v0.2.6

Signed-off-by: Jinank Jain <jinankjain@microsoft.com>
2025-07-03 12:42:25 +02:00
Jinank Jain
ad7268f5e7 build: Update virtio-queue and virtio-bindings
Bump virtio-queue from v0.14.0 to v0.15.0

Bump virtio-bindings from v0.2.1 to v0.2.5

Signed-off-by: Jinank Jain <jinankjain@microsoft.com>
2025-06-12 13:55:46 +02:00
Babis Chalios
1e1ec87740 build: bump vmm-sys-util to 0.14.0
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>
2025-06-03 09:08:36 +02:00
dependabot[bot]
290794b445 build(deps): bump the vhost group with 2 updates
Updates the requirements on [virtio-queue](https://github.com/rust-vmm/vm-virtio) and [vm-memory](https://github.com/rust-vmm/vm-memory) to permit the latest version.

Updates `virtio-queue` to 0.13.0
- [Release notes](https://github.com/rust-vmm/vm-virtio/releases)
- [Commits](https://github.com/rust-vmm/vm-virtio/compare/virtio-queue-v0.13.0...virtio-queue-v0.13.0)

Updates `vm-memory` to 0.16.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.15.0...v0.16.0)

---
updated-dependencies:
- dependency-name: virtio-queue
  dependency-type: direct:production
  dependency-group: vhost
- dependency-name: vm-memory
  dependency-type: direct:production
  dependency-group: vhost
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-25 13:56:53 +02:00
Ruoqing He
071216060f build: Centralize rust-vmm crates to workspace
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>
2024-10-21 14:03:27 +02:00
Manos Pitsidianakis
dea7a3a7c1 Move all crates to workspace root
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>
2023-11-23 16:36:57 +01:00
Stefano Garzarella
bd7b9d37d3 workspace: specify workspace.resolver = "2"
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>
2023-10-02 10:46:44 +02:00
Viresh Kumar
40006d0b39 Merge remote-tracking branch 'vhost-user-backend/main' into workspace
This merges vhost-user-backend into this workspace along with its git
history.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2022-10-11 12:27:44 +05:30
Viresh Kumar
d4c021dea3 Convert to a workspace
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>
2022-10-11 11:59:25 +05:30
Sergio Lopez
d6c8008bbd Release v0.7.0
This release includes:

- Started using caret dependencies
- Updated dependency nix 0.24 -> 0.25
- Updated depepdency log 0.4.6 -> 0.4.17
- Updated dependency vhost 0.4 -> 0.5
- Updated dependency virtio-queue 0.5.0 -> 0.6

Signed-off-by: Sergio Lopez <slp@redhat.com>
2022-09-14 10:59:31 +02:00
Sergio Lopez
917e85a3d5 Update dependencies and switch to caret versions
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>
2022-09-09 16:52:02 +02:00
wanglei01
796b9d9dfc release 0.5.0
See CHANGELOG.md file for details.

Signed-off-by: wanglei01 <wllenyj@linux.alibaba.com>
2022-09-07 16:09:23 +08:00
dependabot[bot]
610d4ee95c build(deps): update nix requirement from 0.24 to 0.25
Updates the requirements on [nix](https://github.com/nix-rust/nix) to permit the latest version.
- [Release notes](https://github.com/nix-rust/nix/releases)
- [Changelog](https://github.com/nix-rust/nix/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nix-rust/nix/compare/v0.24.0...v0.25.0)

---
updated-dependencies:
- dependency-name: nix
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-25 10:53:06 +03:00
wanglei01
88b57518c3 update dependency requirements
Use caret requirements for dependencies.

Fixes: rust-vmm/community#131

Signed-off-by: wanglei01 <wllenyj@linux.alibaba.com>
2022-08-25 09:43:33 +03:00
Sebastien Boeuf
b056e0efc7 Release v0.6.0
This release includes:
- Fix vring initialization logic
- Bump to virtio-queue v0.5.0

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2022-07-29 17:38:12 +02:00
Andreea Florescu
8cfe7cec2c integrate virtio-queue
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>
2022-07-27 16:34:17 +02:00
Jiang Liu
9f5a27225b Prepare for releasing v0.5.1
Prepare for releasing v0.5.1 to upgrade vmm-sys-util to 0.10.0

Signed-off-by: Liu Jiang <gerry@linux.alibaba.com>
2022-07-19 22:12:37 +08:00
dependabot[bot]
6749863466 build(deps): update vmm-sys-util requirement from 0.9 to 0.10
Updates the requirements on [vmm-sys-util](https://github.com/rust-vmm/vmm-sys-util) to permit the latest version.
- [Release notes](https://github.com/rust-vmm/vmm-sys-util/releases)
- [Changelog](https://github.com/rust-vmm/vmm-sys-util/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rust-vmm/vmm-sys-util/compare/v0.9.0...v0.10.0)

---
updated-dependencies:
- dependency-name: vmm-sys-util
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-19 01:38:10 +08:00
Sergio Lopez
9ff4acb259 Release v0.5.0
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>
2022-07-05 17:37:48 +02:00
dependabot[bot]
5dc8b56185 build(deps): update virtio-queue requirement from 0.3 to 0.4
Updates the requirements on [virtio-queue](https://github.com/rust-vmm/vm-virtio) to permit the latest version.
- [Release notes](https://github.com/rust-vmm/vm-virtio/releases)
- [Commits](https://github.com/rust-vmm/vm-virtio/compare/virtio-queue-v0.3.0...virtio-queue-v0.4.0)

---
updated-dependencies:
- dependency-name: virtio-queue
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-05 10:01:37 +02:00
Sergio Lopez
ea2e3647f5 Release v0.4.0
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>
2022-06-01 11:22:09 +02:00
Rob Bradford
14f58eda14 build: Bump virtio-queue version to 0.3
Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2022-05-11 11:55:21 +02:00
Rob Bradford
12b37dcb07 build: Relax vm-memory dependency
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>
2022-05-11 11:55:21 +02:00
dependabot[bot]
7545d23e24 Update nix requirement from 0.23 to 0.24
Updates the requirements on [nix](https://github.com/nix-rust/nix) to permit the latest version.
- [Release notes](https://github.com/nix-rust/nix/releases)
- [Changelog](https://github.com/nix-rust/nix/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nix-rust/nix/compare/v0.23.0...v0.24.1)

---
updated-dependencies:
- dependency-name: nix
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-26 10:59:13 +02:00
Sebastien Boeuf
9f1bd2b99e Release v0.3.0
This release includes the latest rust-vmm/vhost crate (v0.4.0).

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2022-03-25 16:45:57 +01:00
dependabot[bot]
4fde808bd8 Update vhost requirement from 0.3 to 0.4
Updates the requirements on [vhost](https://github.com/rust-vmm/vhost) to permit the latest version.
- [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.3.0...v0.4.0)

---
updated-dependencies:
- dependency-name: vhost
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-21 18:22:29 +08:00
Sebastien Boeuf
7772f02e1a Release v0.4.0
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>
2022-03-19 00:05:42 +08:00
Sebastien Boeuf
355a9ce13c Release v0.2.0
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>
2022-03-07 12:39:35 +01:00
dependabot[bot]
ebb6d93fe0 Update virtio-queue requirement from 0.1 to 0.2
Updates the requirements on [virtio-queue](https://github.com/rust-vmm/vm-virtio) to permit the latest version.
- [Release notes](https://github.com/rust-vmm/vm-virtio/releases)
- [Commits](https://github.com/rust-vmm/vm-virtio/compare/virtio-queue-v0.1.0...virtio-queue-v0.2.0)

---
updated-dependencies:
- dependency-name: virtio-queue
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-07 10:12:30 +02:00
dependabot[bot]
c193fa966d Update nix requirement from 0.22 to 0.23
Updates the requirements on [nix](https://github.com/nix-rust/nix) to permit the latest version.
- [Release notes](https://github.com/nix-rust/nix/releases)
- [Changelog](https://github.com/nix-rust/nix/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nix-rust/nix/compare/v0.22.0...v0.23.1)

---
updated-dependencies:
- dependency-name: nix
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-03 17:49:02 +08:00
Liu Jiang
48070ccb7c Add test case to cover VhostUserHandler
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>
2021-12-22 18:58:54 +08:00
Liu Jiang
4e16112122 Refine test case to increase code coverage
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>
2021-12-22 18:58:54 +08:00
Liu Jiang
e5a5f1fe34 Refine VringStateGuard and VringStateMutGuard
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>
2021-12-22 18:58:54 +08:00
Liu Jiang
faa15d988b Prepare for publishing v0.3.0
Update CHANGELOG.md and version number.

Signed-off-by: Liu Jiang <gerry@linux.alibaba.com>
2021-12-20 16:43:35 +08:00
Liu Jiang
c008d26f51 doc: enable all features for doc.rs
Generate documentation for doc.rs with all features enabled.

Signed-off-by: Liu Jiang <gerry@linux.alibaba.com>
2021-12-20 16:43:35 +08:00
Sergio Lopez
264d46d4c7 Update virtio-queue to rev cc1fa35
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>
2021-12-03 23:36:20 +08:00
Wu Zongyong
45f026046b vhost_net: implement vhost_net backend
Signed-off-by: Wu Zongyong <wuzongyong@linux.alibaba.com>
2021-11-29 16:52:57 +08:00
Stefano Garzarella
ec8c220807 Bump virtio-queue from 6013dd9 to 66cda80
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>
2021-10-29 10:29:02 +03:00
dependabot[bot]
fc1ce25e8a Update vm-memory requirement from 0.6 to 0.7
Updates the requirements on [vm-memory](https://github.com/rust-vmm/vm-memory) to permit the latest version.
- [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.6.0...v0.7.0)

---
updated-dependencies:
- dependency-name: vm-memory
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-29 10:29:02 +03:00
Rob Bradford
fca9e51956 build: Relax vm-memory dependency
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>
2021-10-25 08:59:24 +08:00
Liu Jiang
6d5fccefc7 epoll: use epoll wrapper from vmm-sys-util
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>
2021-10-15 21:55:35 +08:00
dependabot[bot]
3242b37d32 Update vmm-sys-util requirement from 0.8 to 0.9
Updates the requirements on [vmm-sys-util](https://github.com/rust-vmm/vmm-sys-util) to permit the latest version.
- [Release notes](https://github.com/rust-vmm/vmm-sys-util/releases)
- [Changelog](https://github.com/rust-vmm/vmm-sys-util/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rust-vmm/vmm-sys-util/compare/v0.8.0...v0.9.0)

---
updated-dependencies:
- dependency-name: vmm-sys-util
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-24 12:01:35 +02:00
Sergio Lopez
f4ee3226c0 Cargo: update vhost dependency to v0.2.0
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>
2021-09-23 19:34:47 +08:00
Sergio Lopez
38fae60d81 Cargo: replace wildcard with 0.5 for serial_test
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>
2021-09-23 08:57:05 +02:00
Sergio Lopez
b4d4ce7cc4 Prepare for release v0.2.0
Update version in Cargo.toml and add info about v0.2.0 to CHANGELOG.md

Signed-off-by: Sergio Lopez <slp@redhat.com>
2021-09-23 06:50:11 +02:00
Stefano Garzarella
866932e6cc vhost_kern: add VhostKernVdpa struct
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>
2021-09-15 15:01:53 +08:00
Stefano Garzarella
8884465b95 Add VhostVdpa trait
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>
2021-09-15 15:01:53 +08:00