kvmtool: Fix length of ioevent for VIRTIO_PCI_QUEUE_NOTIFY

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@caviumnetworks.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
This commit is contained in:
Andreas Herrmann
2015-06-16 18:25:33 +01:00
committed by Will Deacon
parent 7f9733c2dd
commit fe50bacba8
+1 -1
View File
@@ -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)