[PATCH 5/5] kvmtool: Fix length of ioevent for VIRTIO_PCI_QUEUE_NOTIFY

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.herrmann@xxxxxxxxxxxxxxxxxx>
---
 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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux