From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:56060) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qnt4y-0003x5-Dc for qemu-devel@nongnu.org; Mon, 01 Aug 2011 10:02:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qnt4w-0000IJ-6h for qemu-devel@nongnu.org; Mon, 01 Aug 2011 10:02:48 -0400 Received: from mx1.redhat.com ([209.132.183.28]:16771) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qnt4v-0000IF-Ob for qemu-devel@nongnu.org; Mon, 01 Aug 2011 10:02:46 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p71E2iv4030883 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 1 Aug 2011 10:02:44 -0400 Received: from redhat.com (vpn-203-137.tlv.redhat.com [10.35.203.137]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p71E2gv4020914 for ; Mon, 1 Aug 2011 10:02:43 -0400 Date: Mon, 1 Aug 2011 17:03:18 +0300 From: "Michael S. Tsirkin" Message-ID: <20110801140318.GA12464@redhat.com> References: <1312181462-29889-1-git-send-email-david@gibson.dropbear.id.au> <20110801101038.GE5439@redhat.com> <20110801133337.GD28437@yookeroo.fritz.box> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110801133337.GD28437@yookeroo.fritz.box> Subject: Re: [Qemu-devel] [PATCH] Correctly assign PCI domain numbers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On Mon, Aug 01, 2011 at 11:33:37PM +1000, David Gibson wrote: > On Mon, Aug 01, 2011 at 01:10:38PM +0300, Michael S. Tsirkin wrote: > > On Mon, Aug 01, 2011 at 04:51:02PM +1000, David Gibson wrote: > > > qemu already almost supports PCI domains; that is, several entirely > > > independent PCI host bridges on the same machine. However, a bug in > > > pci_bus_new_inplace() means that every host bridge gets assigned domain > > > number zero and so can't be properly distinguished. This patch fixes the > > > bug, giving each new host bridge a new domain number. > > > > > > Signed-off-by: David Gibson > > > > OK, but I'd like to see the whole picture. > > How does the guest detect multiple domains, > > and how does it access them? > > For the pseries machine, which is what I'm concerned with, each host > bridge is advertised through the device tree passed to the guest. Could you explain please? What generates the device tree and passes it to the guest? > That gives the necessary handles and addresses for accesing config > space and memory and IO windows for each host bridge. I see. I think maybe a global counter in the common code is not exactly the best solution in the general case. > -- > David Gibson | I'll have my music baroque, and my code > david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ > | _way_ _around_! > http://www.ozlabs.org/~dgibson