diff options
author | Michael S. Tsirkin <mst@redhat.com> | 2012-03-20 14:31:38 +0200 |
---|---|---|
committer | Marcelo Tosatti <mtosatti@redhat.com> | 2012-04-12 19:01:41 -0300 |
commit | 4b8f1c88e9de2ded754b12a967a93d395bed1245 (patch) | |
tree | 1d868d3e0c6027c70b60771b29f50988c0ad1c52 /hw | |
parent | 56b9ead234439317629054fa370c547c652ab09a (diff) | |
download | qemu-4b8f1c88e9de2ded754b12a967a93d395bed1245.tar.gz qemu-4b8f1c88e9de2ded754b12a967a93d395bed1245.tar.bz2 qemu-4b8f1c88e9de2ded754b12a967a93d395bed1245.zip |
kvm: allow arbitrarily sized mmio ioeventfd
We use a 2 byte ioeventfd for virtio memory,
add support for this.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Amos Kong <akong@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/ivshmem.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/hw/ivshmem.c b/hw/ivshmem.c index b80aa8f1de..df4f50a092 100644 --- a/hw/ivshmem.c +++ b/hw/ivshmem.c @@ -354,8 +354,8 @@ static void close_guest_eventfds(IVShmemState *s, int posn) guest_curr_max = s->peers[posn].nb_eventfds; for (i = 0; i < guest_curr_max; i++) { - kvm_set_ioeventfd_mmio_long(s->peers[posn].eventfds[i], - s->mmio_addr + DOORBELL, (posn << 16) | i, 0); + kvm_set_ioeventfd_mmio(s->peers[posn].eventfds[i], + s->mmio_addr + DOORBELL, (posn << 16) | i, 0, 4); close(s->peers[posn].eventfds[i]); } @@ -500,8 +500,8 @@ static void ivshmem_read(void *opaque, const uint8_t * buf, int flags) } if (ivshmem_has_feature(s, IVSHMEM_IOEVENTFD)) { - if (kvm_set_ioeventfd_mmio_long(incoming_fd, s->mmio_addr + DOORBELL, - (incoming_posn << 16) | guest_max_eventfd, 1) < 0) { + if (kvm_set_ioeventfd_mmio(incoming_fd, s->mmio_addr + DOORBELL, + (incoming_posn << 16) | guest_max_eventfd, 1, 4) < 0) { fprintf(stderr, "ivshmem: ioeventfd not available\n"); } } |