Skip to content
  • Pavel Fedin's avatar
    8c56c1a5
    memory: emulate ioeventfd · 8c56c1a5
    Pavel Fedin authored
    
    
    The ioeventfd mechanism is used by vhost, dataplane, and virtio-pci to
    turn guest MMIO/PIO writes into eventfd file descriptor events.  This
    allows arbitrary threads to be notified when the guest writes to a
    specific MMIO/PIO address.
    
    qtest and TCG do not support ioeventfd because memory writes are not
    checked against registered ioeventfds in QEMU.  This patch implements
    this in memory_region_dispatch_write() so qtest can use ioeventfd.
    
    Also this patch fixes vhost aborting on some misconfigured old kernels
    like 3.18.0 on ARM. It is possible to explicitly enable CONFIG_EVENTFD
    in expert settings, while MMIO binding support in KVM will still be
    missing.
    
    Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
    Signed-off-by: default avatarPavel Fedin <p.fedin@samsung.com>
    Message-Id: <006e01d12377$0b9c2d40$22d487c0$@samsung.com>
    Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    8c56c1a5
    memory: emulate ioeventfd
    Pavel Fedin authored
    
    
    The ioeventfd mechanism is used by vhost, dataplane, and virtio-pci to
    turn guest MMIO/PIO writes into eventfd file descriptor events.  This
    allows arbitrary threads to be notified when the guest writes to a
    specific MMIO/PIO address.
    
    qtest and TCG do not support ioeventfd because memory writes are not
    checked against registered ioeventfds in QEMU.  This patch implements
    this in memory_region_dispatch_write() so qtest can use ioeventfd.
    
    Also this patch fixes vhost aborting on some misconfigured old kernels
    like 3.18.0 on ARM. It is possible to explicitly enable CONFIG_EVENTFD
    in expert settings, while MMIO binding support in KVM will still be
    missing.
    
    Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
    Signed-off-by: default avatarPavel Fedin <p.fedin@samsung.com>
    Message-Id: <006e01d12377$0b9c2d40$22d487c0$@samsung.com>
    Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
Loading