From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=60782 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OPb2t-0006jO-FP for qemu-devel@nongnu.org; Fri, 18 Jun 2010 08:51:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OPb2r-0001To-HB for qemu-devel@nongnu.org; Fri, 18 Jun 2010 08:51:43 -0400 Received: from mx1.redhat.com ([209.132.183.28]:24774) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OPb2r-0001TX-Ac for qemu-devel@nongnu.org; Fri, 18 Jun 2010 08:51:41 -0400 Date: Fri, 18 Jun 2010 15:46:43 +0300 From: "Michael S. Tsirkin" Message-ID: <20100618124642.GB6397@redhat.com> References: <20100617100243.GF7912@redhat.com> <20100617115716.GA10827@redhat.com> <20100618032610.GD14658@valinux.co.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100618032610.GD14658@valinux.co.jp> Subject: [Qemu-devel] Re: [PATCH 00/10] pci: pci to pci bridge clean up and enhancement List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Isaku Yamahata Cc: stefano.stabellini@eu.citrix.com, jan.kiszka@siemens.com, allen.m.kay@intel.com, qemu-devel@nongnu.org, blauwirbel@gmail.com, kraxel@redhat.com, jean.guyader@gmail.com On Fri, Jun 18, 2010 at 12:26:10PM +0900, Isaku Yamahata wrote: > On Thu, Jun 17, 2010 at 02:57:16PM +0300, Michael S. Tsirkin wrote: > > On Thu, Jun 17, 2010 at 01:02:43PM +0300, Michael S. Tsirkin wrote: > > > For example, forcing all devices to call pci_reset_default > > > in their reset routines does not look like a good cleanup: > > > the less boilerplate, the better IMO. > > > > One thing that we need to address, is devices > > which need to enable memory+master on init. > > They should probably also enable this on reset. > > Isn't it BIOS/firmware that initializes those bits? memory yes, bus master no. > And seabios does so. > The pci spec explicitly says that they are 0 after RST#. Mostly these are bugs in emulation, but could be bugs in devices that we emulate (PBM). > > One approach that was discussed several times > > would be to call cleanup and then init again. > > I expect this would be enough to get rid of reset > > callbacks in most devices. > > Oh, some devices set those bits on init. > So cleanup + init again might be easier than > sorting out initialization/reset of each devices. Exactly. > thanks, > > > > -- > > MST > > > > -- > yamahata