From e864e35c297e24fabd239dd64d5c5c307f678351 Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Wed, 9 Feb 2022 09:54:42 +0000 Subject: [PATCH] virtio-devices: Print error on notification BAR read/write This should not occur as ioeventfd is used for notification. Such an error message would have made the discovery of the underlying cause of Signed-off-by: Rob Bradford --- virtio-devices/src/transport/pci_device.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/virtio-devices/src/transport/pci_device.rs b/virtio-devices/src/transport/pci_device.rs index f2cbf61a9..1e06772a5 100644 --- a/virtio-devices/src/transport/pci_device.rs +++ b/virtio-devices/src/transport/pci_device.rs @@ -974,6 +974,7 @@ impl PciDevice for VirtioPciDevice { && o < NOTIFICATION_BAR_OFFSET + NOTIFICATION_SIZE => { // Handled with ioeventfds. + error!("Unexpected read from notification BAR: offset = 0x{:x}", o); } o if MSIX_TABLE_BAR_OFFSET <= o && o < MSIX_TABLE_BAR_OFFSET + MSIX_TABLE_SIZE => { if let Some(msix_config) = &self.msix_config { @@ -1019,6 +1020,7 @@ impl PciDevice for VirtioPciDevice { && o < NOTIFICATION_BAR_OFFSET + NOTIFICATION_SIZE => { // Handled with ioeventfds. + error!("Unexpected write to notification BAR: offset = 0x{:x}", o); } o if MSIX_TABLE_BAR_OFFSET <= o && o < MSIX_TABLE_BAR_OFFSET + MSIX_TABLE_SIZE => { if let Some(msix_config) = &self.msix_config {