From: Waldemar Kozaczuk <[email protected]> Committer: Nadav Har'El <[email protected]> Branch: master
virtio: fix the bug of reading queue msix vector This patch fixes a silly bug caused by wrong placement of closing parentheses which led to reading word value at offset 0x1 instead of intended COMMON_CFG_OFFSET_OF(queue_msix_vector). This bug did not cause real damage but made some hypervisors like Intel's cloud hypervisor show this kind of warning: cloud-hypervisor: 55.151472ms: <vcpu0> WARN:virtio-devices/src/transport/pci_common_config.rs:169 -- invalid virtio register word read: 0x1 Signed-off-by: Waldemar Kozaczuk <[email protected]> Message-Id: <[email protected]> --- diff --git a/drivers/virtio-pci-device.cc b/drivers/virtio-pci-device.cc --- a/drivers/virtio-pci-device.cc +++ b/drivers/virtio-pci-device.cc @@ -185,7 +185,7 @@ void virtio_modern_pci_device::setup_queue(vring *queue) if (_dev->is_msix()) { // Setup queue_id:entry_id 1:1 correlation... _common_cfg->virtio_conf_writew(COMMON_CFG_OFFSET_OF(queue_msix_vector), queue_index); - if (_common_cfg->virtio_conf_readw(COMMON_CFG_OFFSET_OF(queue_msix_vector) != queue_index)) { + if (_common_cfg->virtio_conf_readw(COMMON_CFG_OFFSET_OF(queue_msix_vector)) != queue_index) { virtio_e("Setting MSIx entry for queue %d failed.", queue_index); return; } -- You received this message because you are subscribed to the Google Groups "OSv Development" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/osv-dev/00000000000091c65f05d38559d3%40google.com.
