build(deps): bump the rust-vmm group across 2 directories with 6 updates
Bumps the rust-vmm group with 6 updates in the / directory: | Package | From | To | | --- | --- | --- | | [vhost](https://github.com/rust-vmm/vhost) | `0.14.0` | `0.15.0` | | [vhost-user-backend](https://github.com/rust-vmm/vhost) | `0.20.0` | `0.21.0` | | [virtio-queue](https://github.com/rust-vmm/vm-virtio) | `0.16.0` | `0.17.0` | | [vm-memory](https://github.com/rust-vmm/vm-memory) | `0.16.2` | `0.17.1` | | [vmm-sys-util](https://github.com/rust-vmm/vmm-sys-util) | `0.14.0` | `0.15.0` | | [virtio-vsock](https://github.com/rust-vmm/vm-virtio) | `0.10.0` | `0.11.0` | Bumps the rust-vmm group with 5 updates in the /staging directory: | Package | From | To | | --- | --- | --- | | [vhost](https://github.com/rust-vmm/vhost) | `0.14.0` | `0.15.0` | | [vhost-user-backend](https://github.com/rust-vmm/vhost) | `0.20.0` | `0.21.0` | | [virtio-queue](https://github.com/rust-vmm/vm-virtio) | `0.16.0` | `0.17.0` | | [vm-memory](https://github.com/rust-vmm/vm-memory) | `0.16.2` | `0.17.1` | | [vmm-sys-util](https://github.com/rust-vmm/vmm-sys-util) | `0.14.0` | `0.15.0` | Updates `vhost` from 0.14.0 to 0.15.0 - [Release notes](https://github.com/rust-vmm/vhost/releases) - [Commits](https://github.com/rust-vmm/vhost/compare/vhost-v0.14.0...vhost-v0.15.0) Updates `vhost-user-backend` from 0.20.0 to 0.21.0 - [Release notes](https://github.com/rust-vmm/vhost/releases) - [Commits](https://github.com/rust-vmm/vhost/compare/vhost-user-backend-v0.20.0...vhost-user-backend-v0.21.0) Updates `virtio-queue` from 0.16.0 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` from 0.16.2 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) Updates `vmm-sys-util` from 0.14.0 to 0.15.0 - [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.14.0...v0.15.0) Updates `virtio-vsock` from 0.10.0 to 0.11.0 - [Release notes](https://github.com/rust-vmm/vm-virtio/releases) - [Commits](https://github.com/rust-vmm/vm-virtio/compare/virtio-vsock-v0.10.0...virtio-vsock-v0.11.0) Updates `vhost` from 0.14.0 to 0.15.0 - [Release notes](https://github.com/rust-vmm/vhost/releases) - [Commits](https://github.com/rust-vmm/vhost/compare/vhost-v0.14.0...vhost-v0.15.0) Updates `vhost-user-backend` from 0.20.0 to 0.21.0 - [Release notes](https://github.com/rust-vmm/vhost/releases) - [Commits](https://github.com/rust-vmm/vhost/compare/vhost-user-backend-v0.20.0...vhost-user-backend-v0.21.0) Updates `virtio-queue` from 0.16.0 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` from 0.16.2 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) Updates `vmm-sys-util` from 0.14.0 to 0.15.0 - [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.14.0...v0.15.0) Updates `vhost` from 0.14.0 to 0.15.0 - [Release notes](https://github.com/rust-vmm/vhost/releases) - [Commits](https://github.com/rust-vmm/vhost/compare/vhost-v0.14.0...vhost-v0.15.0) Updates `vhost-user-backend` from 0.20.0 to 0.21.0 - [Release notes](https://github.com/rust-vmm/vhost/releases) - [Commits](https://github.com/rust-vmm/vhost/compare/vhost-user-backend-v0.20.0...vhost-user-backend-v0.21.0) Updates `virtio-queue` from 0.16.0 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` from 0.16.2 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) Updates `vmm-sys-util` from 0.14.0 to 0.15.0 - [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.14.0...v0.15.0) Updates `vhost` from 0.14.0 to 0.15.0 - [Release notes](https://github.com/rust-vmm/vhost/releases) - [Commits](https://github.com/rust-vmm/vhost/compare/vhost-v0.14.0...vhost-v0.15.0) Updates `vhost-user-backend` from 0.20.0 to 0.21.0 - [Release notes](https://github.com/rust-vmm/vhost/releases) - [Commits](https://github.com/rust-vmm/vhost/compare/vhost-user-backend-v0.20.0...vhost-user-backend-v0.21.0) Updates `virtio-queue` from 0.16.0 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` from 0.16.2 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) Updates `vmm-sys-util` from 0.14.0 to 0.15.0 - [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.14.0...v0.15.0) --- updated-dependencies: - dependency-name: vhost dependency-version: 0.15.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: rust-vmm - dependency-name: vhost-user-backend dependency-version: 0.21.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: rust-vmm - dependency-name: virtio-queue dependency-version: 0.17.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: rust-vmm - dependency-name: vm-memory dependency-version: 0.17.1 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: rust-vmm - dependency-name: vmm-sys-util dependency-version: 0.15.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: rust-vmm - dependency-name: virtio-vsock dependency-version: 0.11.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: rust-vmm - dependency-name: vhost dependency-version: 0.15.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: rust-vmm - dependency-name: vhost-user-backend dependency-version: 0.21.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: rust-vmm - dependency-name: virtio-queue dependency-version: 0.17.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: rust-vmm - dependency-name: vm-memory dependency-version: 0.17.1 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: rust-vmm - dependency-name: vmm-sys-util dependency-version: 0.15.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: rust-vmm - dependency-name: vhost dependency-version: 0.15.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: rust-vmm - dependency-name: vhost-user-backend dependency-version: 0.21.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: rust-vmm - dependency-name: virtio-queue dependency-version: 0.17.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: rust-vmm - dependency-name: vm-memory dependency-version: 0.17.1 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: rust-vmm - dependency-name: vmm-sys-util dependency-version: 0.15.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: rust-vmm - dependency-name: vhost dependency-version: 0.15.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: rust-vmm - dependency-name: vhost-user-backend dependency-version: 0.21.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: rust-vmm - dependency-name: virtio-queue dependency-version: 0.17.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: rust-vmm - dependency-name: vm-memory dependency-version: 0.17.1 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: rust-vmm - dependency-name: vmm-sys-util dependency-version: 0.15.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: rust-vmm ... Signed-off-by: dependabot[bot] <support@github.com> SG: adapted code to the new changes in vhost-user-backend and vm-memory: - used EventConsumer & EventNotifier instead of EventFd for exit_event - removed vm_memory::Error::InvalidGuestRegion - included vm_memory::Bytes needed for read_volatile_from Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
This commit is contained in:
parent
5e83c07f87
commit
9040bcb726
31 changed files with 295 additions and 196 deletions
|
|
@ -20,17 +20,17 @@ env_logger = "0.11"
|
|||
epoll = "4.4"
|
||||
log = "0.4"
|
||||
thiserror = "2.0"
|
||||
vhost = { version = "0.14", features = ["vhost-user-backend"] }
|
||||
vhost-user-backend = "0.20"
|
||||
vhost = { version = "0.15", features = ["vhost-user-backend"] }
|
||||
vhost-user-backend = "0.21"
|
||||
virtio-bindings = "0.2.5"
|
||||
virtio-queue = "0.16"
|
||||
vm-memory = "0.16.1"
|
||||
vmm-sys-util = "0.14"
|
||||
virtio-queue = "0.17"
|
||||
vm-memory = "0.17.1"
|
||||
vmm-sys-util = "0.15"
|
||||
|
||||
[dev-dependencies]
|
||||
assert_matches = "1.5"
|
||||
tempfile = "3.23.0"
|
||||
virtio-queue = { version = "0.16", features = ["test-utils"] }
|
||||
virtio-queue = { version = "0.17", features = ["test-utils"] }
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ use virtio_queue::QueueOwnedT;
|
|||
use vm_memory::{GuestAddressSpace, GuestMemoryAtomic, GuestMemoryLoadGuard, GuestMemoryMmap};
|
||||
use vmm_sys_util::{
|
||||
epoll::EventSet,
|
||||
eventfd::{EventFd, EFD_NONBLOCK},
|
||||
event::{new_event_consumer_and_notifier, EventConsumer, EventFlag, EventNotifier},
|
||||
};
|
||||
|
||||
use crate::{
|
||||
|
|
@ -39,7 +39,8 @@ pub struct VhostUserScsiBackend {
|
|||
event_idx: bool,
|
||||
mem: Option<GuestMemoryAtomic<GuestMemoryMmap>>,
|
||||
targets: Vec<Box<dyn Target>>,
|
||||
pub exit_event: EventFd,
|
||||
pub exit_consumer: EventConsumer,
|
||||
pub exit_notifier: EventNotifier,
|
||||
}
|
||||
|
||||
impl Default for VhostUserScsiBackend {
|
||||
|
|
@ -50,11 +51,15 @@ impl Default for VhostUserScsiBackend {
|
|||
|
||||
impl VhostUserScsiBackend {
|
||||
pub fn new() -> Self {
|
||||
let (exit_consumer, exit_notifier) =
|
||||
new_event_consumer_and_notifier(EventFlag::NONBLOCK).expect("Creating exit event");
|
||||
|
||||
Self {
|
||||
event_idx: false,
|
||||
mem: None,
|
||||
targets: Vec::new(),
|
||||
exit_event: EventFd::new(EFD_NONBLOCK).expect("Creating exit eventfd"),
|
||||
exit_consumer,
|
||||
exit_notifier,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -322,8 +327,10 @@ impl VhostUserBackendMut for VhostUserScsiBackend {
|
|||
panic!("Access to configuration space is not supported.");
|
||||
}
|
||||
|
||||
fn exit_event(&self, _thread_index: usize) -> Option<EventFd> {
|
||||
Some(self.exit_event.try_clone().expect("Cloning exit eventfd"))
|
||||
fn exit_event(&self, _thread_index: usize) -> Option<(EventConsumer, EventNotifier)> {
|
||||
let consumer = self.exit_consumer.try_clone().ok()?;
|
||||
let notifier = self.exit_notifier.try_clone().ok()?;
|
||||
Some((consumer, notifier))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -228,7 +228,7 @@ where
|
|||
.addr()
|
||||
.0
|
||||
.checked_add(u64::from(self.offset))
|
||||
.ok_or(io::Error::other(vm_memory::Error::InvalidGuestRegion))?,
|
||||
.ok_or(io::Error::other("Guest address overflow"))?,
|
||||
),
|
||||
)
|
||||
.map_err(io::Error::other)?;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue