VIRTIO_PCI_QUEUE_NOTIFY is 16-bit and iowrite16 is used in
drivers/virtio/virtio_pci.c to notify the other side.

If the size doesn't match notification via mmio write will fail.

Signed-off-by: Andreas Herrmann <andreas.herrm...@caviumnetworks.com>
---
 virtio/pci.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/virtio/pci.c b/virtio/pci.c
index 7556239..aa9bf09 100644
--- a/virtio/pci.c
+++ b/virtio/pci.c
@@ -57,7 +57,7 @@ static int virtio_pci__init_ioeventfd(struct kvm *kvm, struct 
virtio_device *vde
 
        /* mmio */
        ioevent.io_addr = vpci->mmio_addr + VIRTIO_PCI_QUEUE_NOTIFY;
-       ioevent.io_len  = sizeof(u32);
+       ioevent.io_len  = sizeof(u16);
        ioevent.fd      = fds[1] = eventfd(0, 0);
        r = ioeventfd__add_event(&ioevent, flags);
        if (r)
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to