From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:41056) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TipuP-0005ox-5o for qemu-devel@nongnu.org; Wed, 12 Dec 2012 12:15:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TipuE-0002SU-7a for qemu-devel@nongnu.org; Wed, 12 Dec 2012 12:15:49 -0500 Received: from mx1.redhat.com ([209.132.183.28]:60035) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TipuE-0002SN-01 for qemu-devel@nongnu.org; Wed, 12 Dec 2012 12:15:38 -0500 Date: Wed, 12 Dec 2012 19:18:47 +0200 From: "Michael S. Tsirkin" Message-ID: <20121212171847.GC18597@redhat.com> References: <1355322396-32026-1-git-send-email-pbonzini@redhat.com> <20121212153821.GA17446@redhat.com> <50C8B2FD.5030200@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <50C8B2FD.5030200@redhat.com> Subject: Re: [Qemu-devel] [PATCH 0/2] virtio: reset all qbuses too when writing to the status field List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org, agraf@suse.de On Wed, Dec 12, 2012 at 05:38:21PM +0100, Paolo Bonzini wrote: > Il 12/12/2012 16:38, Michael S. Tsirkin ha scritto: > >> > These patches fix this problem by calling qdev_reset_all when zero > >> > is written to the status field. > > Looks like this is a virtio-scsi thing - others don't have a hierarchy. > > virtio-serial does, and is doing the same walk manually. So just do the same. > > Let's just stick this code in virtio_scsi_reset then? > > No. > > > It likely can access the scsi bus without going through virtio-pci > > and s390 right? > > Yes, it can, but it's not a good reason to do it there. > > Paolo Maybe it's obvious to you that qdev_reset_all(x) does a soft reset and what soft reset means for each bus type, but it is not for me, it is in particular not well defined for classical PCI, and you said youself the hierarchy is wrong, disks should be under virtio-scsi. So until we have better qdev interfaces and modeling in virtio I think it's better to avoid relying on it in common virtio code. You maintain and understand virtio scsi better maybe it makes sense there. -- MST