Skip to content

Commit

Permalink
fix(virtio): notification location calculation
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Kröning <martin.kroening@eonerc.rwth-aachen.de>
  • Loading branch information
mkroening committed May 29, 2024
1 parent 6d8c840 commit 4d7a3db
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/drivers/virtio/virtqueue/packed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1135,7 +1135,7 @@ impl Virtq for PackedVq {
let mut notif_ctrl = NotifCtrl::new(ptr::with_exposed_provenance_mut(
notif_cfg.base()
+ usize::from(vq_handler.notif_off())
+ usize::try_from(notif_cfg.multiplier()).unwrap(),
* usize::try_from(notif_cfg.multiplier()).unwrap(),
));

if features.contains(virtio_spec::F::NOTIFICATION_DATA) {
Expand Down
2 changes: 1 addition & 1 deletion src/drivers/virtio/virtqueue/split.rs
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ impl Virtq for SplitVq {
let mut notif_ctrl = NotifCtrl::new(ptr::with_exposed_provenance_mut(
notif_cfg.base()
+ usize::from(vq_handler.notif_off())
+ usize::try_from(notif_cfg.multiplier()).unwrap(),
* usize::try_from(notif_cfg.multiplier()).unwrap(),
));

if features.contains(virtio_spec::F::NOTIFICATION_DATA) {
Expand Down

0 comments on commit 4d7a3db

Please sign in to comment.