aboutsummaryrefslogtreecommitdiffstats
path: root/hw
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2012-02-08 16:39:06 +0200
committerAvi Kivity <avi@redhat.com>2012-02-29 13:44:41 +0200
commit80a1ea3748203b840d8bad488ada4d6f5bb66c9d (patch)
treeb29184d33c61b7cba42f44c3f6e03ff8f9640b61 /hw
parent0e0d36b446bbe913edcf5a7af24590360845f824 (diff)
memory: move ioeventfd ops to MemoryListener
This way the accelerator (kvm) can handle them directly. Signed-off-by: Avi Kivity <avi@redhat.com> Reviewed-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'hw')
-rw-r--r--hw/vhost.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/hw/vhost.c b/hw/vhost.c
index 47371454f..e1e7e0158 100644
--- a/hw/vhost.c
+++ b/hw/vhost.c
@@ -720,6 +720,18 @@ static void vhost_virtqueue_cleanup(struct vhost_dev *dev,
0, virtio_queue_get_desc_size(vdev, idx));
}
+static void vhost_eventfd_add(MemoryListener *listener,
+ MemoryRegionSection *section,
+ bool match_data, uint64_t data, int fd)
+{
+}
+
+static void vhost_eventfd_del(MemoryListener *listener,
+ MemoryRegionSection *section,
+ bool match_data, uint64_t data, int fd)
+{
+}
+
int vhost_dev_init(struct vhost_dev *hdev, int devfd, bool force)
{
uint64_t features;
@@ -751,6 +763,8 @@ int vhost_dev_init(struct vhost_dev *hdev, int devfd, bool force)
.log_sync = vhost_log_sync,
.log_global_start = vhost_log_global_start,
.log_global_stop = vhost_log_global_stop,
+ .eventfd_add = vhost_eventfd_add,
+ .eventfd_del = vhost_eventfd_del,
.priority = 10
};
hdev->mem = g_malloc0(offsetof(struct vhost_memory, regions));