From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:42272) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TvOkf-0007Do-E1 for qemu-devel@nongnu.org; Wed, 16 Jan 2013 03:53:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TvOZn-0004SK-3u for qemu-devel@nongnu.org; Wed, 16 Jan 2013 03:42:28 -0500 Message-ID: <50F667ED.6010302@greensocs.com> Date: Wed, 16 Jan 2013 09:42:21 +0100 From: =?ISO-8859-1?Q?KONRAD_Fr=E9d=E9ric?= MIME-Version: 1.0 References: <1357828825-2414-1-git-send-email-pbonzini@redhat.com> <20130116045229.GA2156@vm> In-Reply-To: <20130116045229.GA2156@vm> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] virtio-s390: add a reset function to virtio-s390 devices List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: mdroth Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org, Mark Burton , qemu-stable@nongnu.org, agraf@suse.de, pbonzini@redhat.com, =?ISO-8859-1?Q?Andreas_F=E4rber?= On 16/01/2013 05:52, mdroth wrote: > On Thu, Jan 10, 2013 at 03:40:25PM +0100, Paolo Bonzini wrote: >> virtio-s390 devices are not being reset when their bus is. To fix >> this, add a reset method that forwards to virtio_reset. This is >> only needed because of the "strange" modeling of virtio devices; >> the ->vdev link is being handled manually rather than through qdev. >> >> Signed-off-by: Paolo Bonzini Isn't this handled by virtio-refactoring ? I mean if we have a virtio bus on this VirtIOS390Device like in this series: http://www.mail-archive.com/qemu-devel@nongnu.org/msg149035.html And make VirtIODevice an abstract device which connects on this bus we can reset it with the normal way ? > Ping. This fix doesn't appear to be upstream yet and I'm also looking to get > this in for 1.3.1. > > (hint: `patches search tag:unapplied to:qemu-stable` :) > >> --- >> hw/s390-virtio-bus.c | 8 ++++++++ >> 1 file changed, 8 insertions(+) >> >> diff --git a/hw/s390-virtio-bus.c b/hw/s390-virtio-bus.c >> index 7e99175..1e3e4f0 100644 >> --- a/hw/s390-virtio-bus.c >> +++ b/hw/s390-virtio-bus.c >> @@ -505,6 +505,13 @@ static int s390_virtio_busdev_init(DeviceState *dev) >> return _info->init(_dev); >> } >> >> +static void s390_virtio_busdev_reset(DeviceState *dev) >> +{ >> + VirtIOS390Device *_dev = (VirtIOS390Device *)dev; >> + >> + virtio_reset(_dev->vdev); >> +} >> + >> static void virtio_s390_device_class_init(ObjectClass *klass, void *data) >> { >> DeviceClass *dc = DEVICE_CLASS(klass); >> @@ -512,6 +519,7 @@ static void virtio_s390_device_class_init(ObjectClass *klass, void *data) >> dc->init = s390_virtio_busdev_init; >> dc->bus_type = TYPE_S390_VIRTIO_BUS; >> dc->unplug = qdev_simple_unplug_cb; >> + dc->reset = s390_virtio_busdev_reset; >> } >> >> static TypeInfo virtio_s390_device_info = { >> -- >> 1.8.1 >> >>