From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59318) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZEfIa-0008Nw-55 for qemu-devel@nongnu.org; Mon, 13 Jul 2015 11:05:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZEfIU-0006wF-2E for qemu-devel@nongnu.org; Mon, 13 Jul 2015 11:05:40 -0400 Received: from cantor2.suse.de ([195.135.220.15]:43317 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZEfIT-0006uy-Q0 for qemu-devel@nongnu.org; Mon, 13 Jul 2015 11:05:33 -0400 Message-ID: <55A3D3BB.3010508@suse.de> Date: Mon, 13 Jul 2015 17:05:31 +0200 From: =?windows-1252?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1436460692-5142-1-git-send-email-cornelia.huck@de.ibm.com> <1436460692-5142-2-git-send-email-cornelia.huck@de.ibm.com> <55A3AD6D.5010303@de.ibm.com> <20150713161152.3e519fcd.cornelia.huck@de.ibm.com> <55A3C919.1040400@suse.de> <55A3CB76.4070803@de.ibm.com> In-Reply-To: <55A3CB76.4070803@de.ibm.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH for-2.4 1/2] core: reset handler for bus-less devices List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Christian Borntraeger Cc: peter.crosthwaite@xilinx.com, qemu-devel@nongnu.org, agraf@suse.de, jfrei@linux.vnet.ibm.com, Cornelia Huck , gesaint@linux.vnet.ibm.com Am 13.07.2015 um 16:30 schrieb Christian Borntraeger: > Am 13.07.2015 um 16:20 schrieb Andreas F=E4rber: >> Am 13.07.2015 um 16:11 schrieb Cornelia Huck: >>> On Mon, 13 Jul 2015 14:22:05 +0200 >>> Christian Borntraeger wrote: >>> >>>> Am 09.07.2015 um 18:51 schrieb Cornelia Huck: >>>>> Devices that don't live on a bus aren't caught by the normal device >>>>> reset logic. Let's register a reset handler for those devices durin= g >>>>> device realization that calls the reset handler for the associated >>>>> device class. >>>>> >>>>> Suggested-by: Peter Crosthwaite >>>>> Signed-off-by: Cornelia Huck >>>> reboot (from within guest) and external reset (system_reset in monit= or) >>>> now work fine with the s390 watchdog. >>>> >>>> Tested-by: Christian Borntraeger >>>> >>>>> --- >>>>> hw/core/qdev.c | 15 +++++++++++++++ >>>>> 1 file changed, 15 insertions(+) >>> >>> Thanks. >>> >>> Any objections against taking this through s390-next? I'd like to fix >>> diag288 reset (+ that annoying migration regession) for 2.4-rc1 and >>> send a pull request soon. >> >> Which device does this fix (only this diag88?), and is it really not >> possible to register a reset handler where it's being created? >=20 > A sysbus device reset is also not registered or called by its parent. I= t is=20 > resetted by the generic qdev handler walking all children (qdev_reset_a= ll and=20 > qbus_reset_all), no? It seems you're missing my point. Having a SysBusDevice reset by the SysBus is the expected way, rather than having the SysBusDevice register its own handler. Reset propagates along defined paths - buses and composition - and doesn't hit randomly. Therefore resetting random bus-less devices is wrong by design. And a step backwards, too. Which btw is the reason that my recursive realization patches stalled - we were potentially violating these rules. Anyway, here it's not about a SysBusDevice, it's about a pure Device, unless I've misunderstood something. Regards, Andreas --=20 SUSE Linux GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Felix Imend=F6rffer, Jane Smithard, Dilip Upmanyu, Graham Norton; HRB 21284 (AG N=FCrnberg)