vhost-vdpa: map virtqueue notification area if possible
commitd0416d487bd561526486c2e43910ea9494855e16
authorJason Wang <jasowang@redhat.com>
Thu, 15 Apr 2021 07:33:56 +0000 (15 15:33 +0800)
committerJason Wang <jasowang@redhat.com>
Fri, 11 Jun 2021 02:30:13 +0000 (11 10:30 +0800)
tree5e5be588c02f5778658c1d6981124cf72c515a4d
parentd60c75d28fe9d49bef28f7fa863481e1d9f6ff96
vhost-vdpa: map virtqueue notification area if possible

This patch implements the vq notification mapping support for
vhost-vDPA. This is simply done by using mmap()/munmap() for the
vhost-vDPA fd during device start/stop. For the device without
notification mapping support, we fall back to eventfd based
notification gracefully.

Reviewed-by: Si-Wei Liu <si-wei.liu@oracle.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
hw/virtio/vhost-vdpa.c
include/hw/virtio/vhost-vdpa.h