From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44312) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uld1F-00014v-FV for qemu-devel@nongnu.org; Sun, 09 Jun 2013 06:38:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uld1C-0007av-Nz for qemu-devel@nongnu.org; Sun, 09 Jun 2013 06:38:41 -0400 Received: from mx1.redhat.com ([209.132.183.28]:4780) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uld1C-0007ap-G3 for qemu-devel@nongnu.org; Sun, 09 Jun 2013 06:38:38 -0400 Date: Sun, 9 Jun 2013 13:39:08 +0300 From: "Michael S. Tsirkin" Message-ID: <20130609103908.GF14832@redhat.com> References: <1370629140-30841-1-git-send-email-afaerber@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <1370629140-30841-1-git-send-email-afaerber@suse.de> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH RFT 0/5] QOM realize for virtio List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andreas =?iso-8859-1?Q?F=E4rber?= Cc: Paolo Bonzini , fred.konrad@greensocs.com, qemu-devel@nongnu.org, anthony@codemonkey.ws, jlarrew@linux.vnet.ibm.com On Fri, Jun 07, 2013 at 08:18:55PM +0200, Andreas F=E4rber wrote: > Hello, >=20 > This series converts virtio devices to QOM realize/unrealize. > It is intended as base for fixing virtio-net initialization order issue= s, > as reported by Jesse. Only partially tested though. >=20 > Note that while VirtioDevice was setting a DeviceClass::exit callback > for cleaning up the bus name, this was overwritten by most derived clas= ses. > That is fixed as part of this conversion. >=20 > Similarly, virtio_scsi_common_{init,exit} can be moved to VirtIOSCSICom= mon 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(). >=20 > As a follow-up, VirtIOSerialPort is also converted to QOM realize/unrea= lize. > As a side-effect, virtio-console realization is changed from in-order t= o pre-order. >=20 > Incidentally I stumbled over a minor cleanup issue with virtserialport. >=20 > Available from: > https://github.com/afaerber/qemu-cpu/commits/realize-virtio.v1 > git://github.com/afaerber/qemu-cpu.git realize-virtio.v1 >=20 > Regards, > Andreas I think it's a good idea overall. A bit busy with other things now so only had time to glance over this quickly, I sent some minor comments separately. More review hopefully later this week. > Cc: Anthony Liguori > Cc: Paolo Bonzini > Cc: Michael S. Tsirkin > Cc: Jesse Larrew > Cc: Frederic Konrad >=20 > Andreas F=E4rber (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 >=20 > 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 > --=20 > 1.8.1.4