From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51560) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ul1Fj-0003eF-34 for qemu-devel@nongnu.org; Fri, 07 Jun 2013 14:19:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ul1Fh-0007kb-8V for qemu-devel@nongnu.org; Fri, 07 Jun 2013 14:19:06 -0400 Received: from cantor2.suse.de ([195.135.220.15]:37113 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ul1Fg-0007jo-WF for qemu-devel@nongnu.org; Fri, 07 Jun 2013 14:19:05 -0400 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Fri, 7 Jun 2013 20:18:55 +0200 Message-Id: <1370629140-30841-1-git-send-email-afaerber@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH RFT 0/5] QOM realize for virtio List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , jlarrew@linux.vnet.ibm.com, anthony@codemonkey.ws, Paolo Bonzini , =?UTF-8?q?Andreas=20F=C3=A4rber?= , fred.konrad@greensocs.com Hello, This series converts virtio devices to QOM realize/unrealize. It is intended as base for fixing virtio-net initialization order issues, as reported by Jesse. Only partially tested though. Note that while VirtioDevice was setting a DeviceClass::exit callback for cleaning up the bus name, this was overwritten by most derived classe= s. That is fixed as part of this conversion. Similarly, virtio_scsi_common_{init,exit} can be moved to VirtIOSCSICommo= n now. This has the side-effect that the two SCSI subclasses now perform some initializations after the common SCSI implementation has invoked virtio_bus_plug_device(). As a follow-up, VirtIOSerialPort is also converted to QOM realize/unreali= ze. As a side-effect, virtio-console realization is changed from in-order to = pre-order. Incidentally I stumbled over a minor cleanup issue with virtserialport. Available from: https://github.com/afaerber/qemu-cpu/commits/realize-virtio.v1 git://github.com/afaerber/qemu-cpu.git realize-virtio.v1 Regards, Andreas Cc: Anthony Liguori Cc: Paolo Bonzini Cc: Michael S. Tsirkin Cc: Jesse Larrew Cc: Frederic Konrad Andreas F=C3=A4rber (5): virtio-blk-dataplane: Improve error reporting virtio: Convert VirtioDevice to QOM realize/unrealize virtio-console: QOM'ify VirtConsole virtio-console: Use exitfn for virtserialport, too virtio-serial-port: Convert to QOM realize/unrealize hw/9pfs/virtio-9p-device.c | 67 ++++++++++++++------------ hw/9pfs/virtio-9p.h | 13 +++++ hw/block/dataplane/virtio-blk.c | 25 +++++----- hw/block/dataplane/virtio-blk.h | 5 +- hw/block/virtio-blk.c | 56 +++++++++++++-------- hw/char/virtio-console.c | 99 ++++++++++++++++++++++++++------= ------ hw/char/virtio-serial-bus.c | 94 ++++++++++++++++++--------------= ---- hw/net/virtio-net.c | 48 ++++++++++-------- hw/scsi/vhost-scsi.c | 59 +++++++++++++---------- hw/scsi/virtio-scsi.c | 85 ++++++++++++++++++++------------ hw/virtio/virtio-balloon.c | 50 +++++++++++-------- hw/virtio/virtio-rng.c | 53 +++++++++++--------- hw/virtio/virtio.c | 20 +++----- include/hw/virtio/vhost-scsi.h | 13 +++++ include/hw/virtio/virtio-balloon.h | 13 +++++ include/hw/virtio/virtio-blk.h | 13 +++++ include/hw/virtio/virtio-net.h | 13 +++++ include/hw/virtio/virtio-rng.h | 13 +++++ include/hw/virtio/virtio-scsi.h | 29 +++++++++-- include/hw/virtio/virtio-serial.h | 24 ++++----- include/hw/virtio/virtio.h | 6 ++- 21 files changed, 513 insertions(+), 285 deletions(-) --=20 1.8.1.4