From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45529) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XKAh7-0000hm-4c for qemu-devel@nongnu.org; Wed, 20 Aug 2014 14:33:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XKAh2-0005Zu-F5 for qemu-devel@nongnu.org; Wed, 20 Aug 2014 14:33:13 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34012) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XKAh2-0005Zo-7V for qemu-devel@nongnu.org; Wed, 20 Aug 2014 14:33:08 -0400 Message-ID: <53F4E9D9.2050102@redhat.com> Date: Wed, 20 Aug 2014 12:32:57 -0600 From: Eric Blake MIME-Version: 1.0 References: <1408517593.25437.102.camel@ori.omang.mine.nu> <53F461E6.5020506@redhat.com> <1408527055.14053.107.camel@abi.no.oracle.com> <20140820113627.GG17371@redhat.com> <53F4A082.7090103@redhat.com> <87sikrus2w.fsf@blackfin.pond.sub.org> In-Reply-To: <87sikrus2w.fsf@blackfin.pond.sub.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ELw5WmibwJLwcmDsXoOiHMcSon987neL8" Subject: Re: [Qemu-devel] [PATCH 2/3] ioh3420: Provide a unique bus name and an interrupt mapping function List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster , Paolo Bonzini Cc: Juan Quintela , Alexey Kardashevskiy , Marcel Apfelbaum , Knut Omang , qemu-devel@nongnu.org, Gonglei , "Michael S. Tsirkin" , Igor Mammedov This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --ELw5WmibwJLwcmDsXoOiHMcSon987neL8 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 08/20/2014 08:57 AM, Markus Armbruster wrote: > Paolo Bonzini writes: >=20 >> Il 20/08/2014 13:36, Michael S. Tsirkin ha scritto: >>> >>> For pci bridges, unless you set bus_name, bus name will >>> match device itself. See this code: >>> >>> * If we don't specify the name, the bus will be addressed as >>> * .0, where id is the device id. >>> * Since PCI Bridge devices have a single bus each, we don't need= >>> * the index: >>> * let users address the bus using the device name. >>> */ >>> if (!br->bus_name && dev->qdev.id && *dev->qdev.id) { >>> br->bus_name =3D dev->qdev.id; >>> } >> >> Is libvirt using this rule? If not, I'd rather slash it since the >> .0 name is shared with all other buses and not PCI-bridge-specific= =2E >=20 > br->bus_name is null unless pci_bridge_map_irq() set it. Only caller > for ioh3420 is ioh3420_init(), and that's dead code. Therefore, > br->bus_name is null here. >=20 > Libvirt always sets a device ID. Slashing this this special case would= > change the bus name from ID.0 to just ID. That'll break libvirt, as fa= r > as I can tell from its source. Libvirt has had to deal with shenanigans like this before: http://libvirt.org/git/?p=3Dlibvirt.git;a=3Dblob;f=3Dsrc/qemu/qemu_capabi= lities.c;h=3Db758b5a0d4;hb=3DHEAD#l1982 >=20 > Sad. Although libvirt could deal with the fallout (especially if it is made introspectible, instead of just randomly changing with no witness that can be probed via QMP), you are correct that it would be nicer to not break existing clients :( --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --ELw5WmibwJLwcmDsXoOiHMcSon987neL8 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg iQEcBAEBCAAGBQJT9OnZAAoJEKeha0olJ0NqnVoH/Rd7d9E6JGE1C0UPL7YLg4iw UESCvD9B566I7AMRYVsoTKfPdD8qiwZyYLwrSderFxXcgMjpxDU2Z86yJMqCiFXW gDvMWveuuQScxR1U7ULHhKRkw0U5/lx+fBidmfXpHapiNCbccgqY8ZzXtwLLaoPd eAEVVjWzKRt0Wt0G/Gc5tO5YGBvE9etgDAqAUkMuYuCBiCR4A+bbLYyML5t2fd68 9+fPeNkUeH7DhDjuuXvMkR0YRbs9ITjCqvnFMTfu5NH8CEq/G847WXK7sgPPu+nm 1Q8SgaQo1fiorLggz3glHOzW/CERDd2ZgaSZR8qzqrxReB8F++zyhtvOdRzNmsM= =8pwf -----END PGP SIGNATURE----- --ELw5WmibwJLwcmDsXoOiHMcSon987neL8--