Skip to content

Commit

Permalink
Merge pull request #1238 from hermit-os/virtio-notification-location
Browse files Browse the repository at this point in the history
fix(virtio): notification location calculation
  • Loading branch information
mkroening authored May 31, 2024
2 parents b5243ed + 4d7a3db commit e33f479
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 @@ -1132,7 +1132,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 @@ -497,7 +497,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 e33f479

Please sign in to comment.