Received: from eggs.gnu.org ([2001:4830:134:3::10]:57530) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1agUu2-0004V4-VW for qemu-devel@nongnu.org; Thu, 17 Mar 2016 06:11:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1agUtx-0006QX-7b for qemu-devel@nongnu.org; Thu, 17 Mar 2016 06:11:38 -0400 Received: from e06smtp08.uk.ibm.com ([195.75.94.104]:42739) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1agUtw-0006QN-Tk for qemu-devel@nongnu.org; Thu, 17 Mar 2016 06:11:33 -0400 Received: from localhost by e06smtp08.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 17 Mar 2016 10:11:31 -0000 Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by d06dlp01.portsmouth.uk.ibm.com (Postfix) with ESMTP id A4BFF17D834A for ; Thu, 17 Mar 2016 10:02:09 +0000 (GMT) Received: from d06av07.portsmouth.uk.ibm.com (d06av07.portsmouth.uk.ibm.com [9.149.37.248]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u2HA1bWX64553008 for ; Thu, 17 Mar 2016 10:01:37 GMT Received: from d06av07.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av07.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id u2HA1aiD032708 for ; Thu, 17 Mar 2016 06:01:37 -0400 From: Cornelia Huck Date: Thu, 17 Mar 2016 11:01:27 +0100 Message-Id: <1458208893-15949-1-git-send-email-cornelia.huck@de.ibm.com> Subject: [Qemu-devel] [PATCH RFC 0/6] virtio: refactor host notifiers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: famz@redhat.com, mst@redhat.com, borntraeger@de.ibm.com, stefanha@redhat.com, Cornelia Huck , pbonzini@redhat.com As discussed in the virtio-blk dataplane start/stop thread, the various transports contain a lot of similar/identical boilerplate code for setting up ioeventfds. This makes the code hard to follow. Let's drag all of the common handling into the virtio-bus layer, hopefully reducing both the boilerplate code and the number of indirections. This RFC patchset is the result of hacking this up quickly, and I was rather surprised that it did not die immediately on my s390 system (which is all I 'tested'). So be warned :) Feedback about the approach and the interface would be good. Cornelia Huck (6): virtio-bus: common ioeventfd infrastructure virtio-bus: have callers tolerate new host notifier api virtio-ccw: convert to ioeventfd callbacks virtio-pci: convert to ioeventfd callbacks virtio-mmio: convert to ioeventfd callbacks virtio-bus: remove old set_host_notifier callback hw/block/dataplane/virtio-blk.c | 6 +- hw/s390x/virtio-ccw.c | 133 ++++++++++++++-------------------------- hw/scsi/virtio-scsi-dataplane.c | 9 ++- hw/virtio/vhost.c | 13 ++-- hw/virtio/virtio-bus.c | 108 ++++++++++++++++++++++++++++++++ hw/virtio/virtio-mmio.c | 128 +++++++++++++------------------------- hw/virtio/virtio-pci.c | 124 +++++++++++++------------------------ include/hw/virtio/virtio-bus.h | 15 ++++- 8 files changed, 263 insertions(+), 273 deletions(-) -- 2.6.5