From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49361) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vr7IQ-0004SX-8J for qemu-devel@nongnu.org; Thu, 12 Dec 2013 09:31:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vr7IL-0001G4-Ci for qemu-devel@nongnu.org; Thu, 12 Dec 2013 09:31:22 -0500 Date: Thu, 12 Dec 2013 16:34:37 +0200 From: "Michael S. Tsirkin" Message-ID: <20131212143437.GE319@redhat.com> References: <1386282785-466-1-git-send-email-mdroth@linux.vnet.ibm.com> <1386282785-466-11-git-send-email-mdroth@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [PATCH v2 10/14] pci: allow 0 address for PCI IO regions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: QEMU Developers , Alexey Kardashevskiy , Alexander Graf , Michael Roth , Mike Day , "qemu-ppc@nongnu.org" , tyreld@linux.vnet.ibm.com, nfont@linux.vnet.ibm.com, Paul Mackerras On Thu, Dec 05, 2013 at 11:33:48PM +0000, Peter Maydell wrote: > On 5 December 2013 22:33, Michael Roth wrote: > > Some kernels program a 0 address for io regions. PCI 3.0 spec > > sectio 6.2.5.1 doesn't seem to disallow this. > > Hmm. The last PCI spec I looked at said 0 wasn't a valid MMIO > address, so the variant of this patch I wrote a while back made it > a per PCI device flag whether a particular device let you get away > with it: > http://patchwork.ozlabs.org/patch/269133/ > > (the device in question for me was the versatile-pci host bridge). > > And presumably whoever put that specific check for 0 into > QEMU had a reason for it. It used to be the case that if you created a conflicting value for the BAR, you corrupted dispatch tables forever. Now that dispatch tables are rebuilt on any change that is less of an issue, but maybe that code is there to handle that, e.g. to avoid conflictig with apic or other non pci devices. > On the other hand I can't now find whatever document it was > that I was reading that claimed 0 wasn't valid :-( > > thanks > -- PMM