Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ and this project adheres to
Terminating a connection now also discards its TX buffer, so the device stops
advertising `EPOLLOUT` for a host stream it will never write to again, which
could otherwise busy-spin the event thread indefinitely.
- [#6083](https://github.com/firecracker-microvm/firecracker/pull/6083): Fixed a
vhost-user-block device backed by a readonly backend not being treated as
readonly. The `VIRTIO_BLK_F_RO` check read the acked feature set after it had
been narrowed to the vhost-user protocol bit, so it never matched, and a
readonly vhost-user root device was given `rw` on the guest kernel cmdline.
- [#6086](https://github.com/firecracker-microvm/firecracker/pull/6086),
[#6143](https://github.com/firecracker-microvm/firecracker/pull/6143): Fixed a
deadlock in the logger: a signal handler that logs while the interrupted
Expand Down
14 changes: 7 additions & 7 deletions src/vmm/src/devices/virtio/block/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,42 +129,42 @@ impl VirtioDevice for Block {
fn avail_features(&self) -> u64 {
match self {
Self::Virtio(b) => b.avail_features,
Self::VhostUser(b) => b.avail_features,
Self::VhostUser(b) => b.avail_features(),
}
}

fn acked_features(&self) -> u64 {
match self {
Self::Virtio(b) => b.acked_features,
Self::VhostUser(b) => b.acked_features,
Self::VhostUser(b) => b.acked_features(),
}
}

fn set_acked_features(&mut self, acked_features: u64) {
match self {
Self::Virtio(b) => b.acked_features = acked_features,
Self::VhostUser(b) => b.acked_features = acked_features,
Self::VhostUser(b) => b.set_acked_features(acked_features),
}
}

fn queues(&self) -> &[Queue] {
match self {
Self::Virtio(b) => &b.queues,
Self::VhostUser(b) => &b.queues,
Self::VhostUser(b) => b.queues(),
}
}

fn queues_mut(&mut self) -> &mut [Queue] {
match self {
Self::Virtio(b) => &mut b.queues,
Self::VhostUser(b) => &mut b.queues,
Self::VhostUser(b) => b.queues_mut(),
}
}

fn queue_events(&self) -> &[EventFd] {
match self {
Self::Virtio(b) => &b.queue_evts,
Self::VhostUser(b) => &b.queue_evts,
Self::VhostUser(b) => b.queue_events(),
}
}

Expand Down Expand Up @@ -203,7 +203,7 @@ impl VirtioDevice for Block {
fn is_activated(&self) -> bool {
match self {
Self::Virtio(b) => b.device_state.is_activated(),
Self::VhostUser(b) => b.device_state.is_activated(),
Self::VhostUser(b) => b.is_activated(),
}
}

Expand Down
Loading