All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Markus Armbruster <armbru@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>
Cc: Juan Quintela <quintela@redhat.com>,
	Alexey Kardashevskiy <aik@ozlabs.ru>,
	Marcel Apfelbaum <marcel.a@redhat.com>,
	Knut Omang <knut.omang@oracle.com>,
	qemu-devel@nongnu.org, Gonglei <arei.gonglei@huawei.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	Igor Mammedov <imammedo@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 2/3] ioh3420: Provide a unique bus name and an interrupt mapping function
Date: Wed, 20 Aug 2014 12:32:57 -0600	[thread overview]
Message-ID: <53F4E9D9.2050102@redhat.com> (raw)
In-Reply-To: <87sikrus2w.fsf@blackfin.pond.sub.org>

[-- Attachment #1: Type: text/plain, Size: 1731 bytes --]

On 08/20/2014 08:57 AM, Markus Armbruster wrote:
> Paolo Bonzini <pbonzini@redhat.com> writes:
> 
>> 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
>>>      * <id>.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 = dev->qdev.id;
>>>     }
>>
>> Is libvirt using this rule?  If not, I'd rather slash it since the
>> <id>.0 name is shared with all other buses and not PCI-bridge-specific.
> 
> 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.
> 
> 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 far
> as I can tell from its source.

Libvirt has had to deal with shenanigans like this before:

http://libvirt.org/git/?p=libvirt.git;a=blob;f=src/qemu/qemu_capabilities.c;h=b758b5a0d4;hb=HEAD#l1982

> 
> 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 :(

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 539 bytes --]

  reply	other threads:[~2014-08-20 18:33 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-20  6:53 [Qemu-devel] [PATCH 2/3] ioh3420: Provide a unique bus name and an interrupt mapping function Knut Omang
2014-08-20  8:52 ` Paolo Bonzini
2014-08-20  9:30   ` Knut Omang
2014-08-20 11:36     ` Michael S. Tsirkin
2014-08-20 13:08       ` Knut Omang
2014-08-20 13:20       ` Paolo Bonzini
2014-08-20 14:57         ` Markus Armbruster
2014-08-20 18:32           ` Eric Blake [this message]
2014-08-21 11:49             ` Paolo Bonzini
2014-08-20 12:06     ` Markus Armbruster
2014-08-20 12:33       ` Michael S. Tsirkin
2014-08-20 13:03         ` Markus Armbruster
2014-08-20 13:18           ` Paolo Bonzini
2014-08-20 14:28             ` Markus Armbruster
2014-08-20 11:49 ` Andreas Färber

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53F4E9D9.2050102@redhat.com \
    --to=eblake@redhat.com \
    --cc=aik@ozlabs.ru \
    --cc=arei.gonglei@huawei.com \
    --cc=armbru@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=knut.omang@oracle.com \
    --cc=marcel.a@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.