From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:47358) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UfVC1-0000Qa-BX for qemu-devel@nongnu.org; Thu, 23 May 2013 09:04:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UfVBu-0003LT-MC for qemu-devel@nongnu.org; Thu, 23 May 2013 09:04:29 -0400 Received: from ozlabs.org ([2402:b800:7003:1:1::1]:38147) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UfVBu-0003KH-89 for qemu-devel@nongnu.org; Thu, 23 May 2013 09:04:22 -0400 Date: Thu, 23 May 2013 22:21:09 +1000 From: David Gibson Message-ID: <20130523122109.GD26259@boomeroo.fritz.box> References: <1368059472-25071-1-git-send-email-david@gibson.dropbear.id.au> <1368059472-25071-6-git-send-email-david@gibson.dropbear.id.au> <20130523110407.GB17480@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="UfEAyuTBtIjiZzX6" Content-Disposition: inline In-Reply-To: <20130523110407.GB17480@redhat.com> Subject: Re: [Qemu-devel] [PATCH 5/8] pci: Replace pci_find_domain() with more general pci_root_bus_path() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org --UfEAyuTBtIjiZzX6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, May 23, 2013 at 02:04:08PM +0300, Michael S. Tsirkin wrote: > On Thu, May 09, 2013 at 10:31:09AM +1000, David Gibson wrote: > > pci_find_domain() is used in a number of places where we want an id for= a > > whole PCI domain (i.e. the subtree under a PCI root bus). The trouble = is > > that many platforms may support multiple independent host bridges with = no > > hardware supplied notion of domain number. > >=20 > > This patch, therefore, replaces calls to pci_find_domain() with calls to > > a new pci_root_bus_path() returning a string. The new call is implemen= ted > > in terms of a new callback in the host bridge class, so it can be defin= ed > > in some way that's well defined for the platform. When no callback is > > available we fall back on the qbus name. > >=20 > > Most current uses of pci_find_domain() are for error or informational > > messages, so the change in identifiers should be harmless. The excepti= on > > is pci_get_dev_path(), whose results form part of migration streams. To > > maintain compatibility with old migration streams, the PIIX PCI host is > > altered to always supply "0000" for this path, which matches the old do= main > > number (since the code didn't actually support domains other than 0). > >=20 > > For the pseries (spapr) PCI bridge we use a different platform-unique > > identifier (pseries machines can routinely have dozens of PCI host > > bridges). Theoretically that breaks migration streams, but given that = we > > don't yet have migration support for pseries, it doesn't matter. > >=20 > > Any other machines that have working migration support including PCI > > devices will need to be updated to maintain migration stream compatibil= ity. > >=20 > > Signed-off-by: David Gibson >=20 > AFAIK PC is the only one with working migration, yes, but > we have Q35 as well which can be migrated. Good point, I'll add a similar hook to q35. --=20 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 --UfEAyuTBtIjiZzX6 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAlGeCbUACgkQaILKxv3ab8alKQCfcnc1nJqefcIIGSaS3CFVQ1bS It0Anjh9Zn3IVLUQ+zmzu5coYx7VEYW9 =3HRw -----END PGP SIGNATURE----- --UfEAyuTBtIjiZzX6--