From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:46842) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TkWzY-0000Z5-28 for qemu-devel@nongnu.org; Mon, 17 Dec 2012 04:32:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TkWw2-000696-5k for qemu-devel@nongnu.org; Mon, 17 Dec 2012 04:28:07 -0500 Received: from mx1.redhat.com ([209.132.183.28]:57387) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TkWw1-00068w-UC for qemu-devel@nongnu.org; Mon, 17 Dec 2012 04:24:30 -0500 Message-ID: <50CEE4CA.5080408@redhat.com> Date: Mon, 17 Dec 2012 10:24:26 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1355322396-32026-1-git-send-email-pbonzini@redhat.com> <20121212153821.GA17446@redhat.com> <50C8B2FD.5030200@redhat.com> <20121212171847.GC18597@redhat.com> <50C8BF83.4010307@redhat.com> <20121212212720.GC23087@redhat.com> <50C997BF.80200@redhat.com> <20121216170418.GG15790@redhat.com> <50CE2184.9020908@redhat.com> <20121216211500.GB21521@redhat.com> In-Reply-To: <20121216211500.GB21521@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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: "Michael S. Tsirkin" Cc: agraf@suse.de, qemu-devel Il 16/12/2012 22:15, Michael S. Tsirkin ha scritto: >> A PCI bus reset (or FLR) calls pci_device_reset which does this >> >> void pci_device_reset(PCIDevice *dev) >> { >> int r; >> >> qdev_reset_all(&dev->qdev); >> ... >> } >> >> This is exactly how a PCI bus reset clears pending MSIX vectors. >> >> Paolo > > Yes but I mean virtio-pci device is not a bus. > virtio could be a bus. > Our modeling seems incorrect and relying on it for correctness, > looks a bit wrong. If virtio were a bus, everything would work just as well. The bus reset method would not be implemented and qdev_reset_all would proceed past the bus and reset the virtio device. So virtio_reset would not be needed either. Paolo