From 4d7a3dbab3ce48a638ba9dd7590506fe925780cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Kr=C3=B6ning?= Date: Wed, 29 May 2024 16:50:59 +0200 Subject: [PATCH] fix(virtio): notification location calculation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin Kröning --- src/drivers/virtio/virtqueue/packed.rs | 2 +- src/drivers/virtio/virtqueue/split.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/drivers/virtio/virtqueue/packed.rs b/src/drivers/virtio/virtqueue/packed.rs index 4273f60e88..c45af254b8 100644 --- a/src/drivers/virtio/virtqueue/packed.rs +++ b/src/drivers/virtio/virtqueue/packed.rs @@ -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) { diff --git a/src/drivers/virtio/virtqueue/split.rs b/src/drivers/virtio/virtqueue/split.rs index 80a0a11648..71df22cdca 100644 --- a/src/drivers/virtio/virtqueue/split.rs +++ b/src/drivers/virtio/virtqueue/split.rs @@ -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) {