mirror of
https://github.com/clearlinux/kvmtool.git
synced 2026-10-03 23:38:35 +00:00
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:
committed by
Will Deacon
parent
7f9733c2dd
commit
fe50bacba8
+1
-1
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user