From: Jan Kiszka <jan.kiszka@web.de>
To: Markus Armbruster <armbru@redhat.com>
Cc: Anthony Liguori <aliguori@us.ibm.com>,
Juan Quintela <quintela@redhat.com>,
Jan Kiszka <jan.kiszka@siemens.com>,
qemu-devel@nongnu.org, Luiz Capitulino <lcapitulino@redhat.com>,
Avi Kivity <avi@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v2 03/15] qdev: Allow device addressing via 'driver.instance'
Date: Sat, 29 May 2010 10:09:34 +0200 [thread overview]
Message-ID: <4C00CBBE.7030402@web.de> (raw)
In-Reply-To: <m3mxvjjgel.fsf@blackfin.pond.sub.org>
[-- Attachment #1: Type: text/plain, Size: 2582 bytes --]
Markus Armbruster wrote:
> Jan Kiszka <jan.kiszka@web.de> writes:
>
>> From: Jan Kiszka <jan.kiszka@siemens.com>
>>
>> Extend qbus_find_dev to allow addressing of devices without an unique id
>> via an optional per-bus instance number. The new formats are
>> 'driver.instance' and 'alias.instance'.
>>
>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>> ---
>> docs/qdev-device-use.txt | 12 +++++++++++-
>> hw/qdev.c | 23 ++++++++++++++++++-----
>> 2 files changed, 29 insertions(+), 6 deletions(-)
>>
>> diff --git a/docs/qdev-device-use.txt b/docs/qdev-device-use.txt
>> index 9ac1fa1..5939481 100644
>> --- a/docs/qdev-device-use.txt
>> +++ b/docs/qdev-device-use.txt
>> @@ -1,6 +1,6 @@
>> = How to convert to -device & friends =
>>
>> -=== Specifying Bus and Address on Bus ===
>> +=== Specifying Bus, Address on Bus, and Devices ===
>>
>> In qdev, each device has a parent bus. Some devices provide one or
>> more buses for children. You can specify a device's parent bus with
>> @@ -24,6 +24,16 @@ Furthermore, if a device only hosts a single bus, the bus name can be
>> omitted in the path. Example: /i440FX-pcihost/PIIX3 abbreviates
>> /i440FX-pcihost/pci.0/PIIX3/isa.0 as none of the buses has siblings.
>>
>> +Existing devices can be addressed either via a unique ID if it was
>> +assigned during creation or via the device tree path:
>> +
>> +/full_bus_address/driver_name[.instance_number]
>> + or
>> +abbreviated_bus_address/driver_name[.instance_number]
>> +
>> +Example: /i440FX-pcihost/pci.0/e1000.2 addresses the second e1000
>> +adapter on the bus 'pci.0'.
>> +
>> Note: the USB device address can't be controlled at this time.
>
> "instance number" isn't defined in this document.
True, only implicitly via the example.
>
> I understand the problem you're trying to solve; I've had it myself many
> times. But is inventing an instance number the right solution?
>
> The two e1000 devices already have a perfectly fine unique identifier on
> their bus: their bus address. What about recognizing bus addresses in
> paths? Requires a suitable restriction on device names and IDs to avoid
> ambiguity, say "start with letter".
>
> qdev currently doesn't abstract bus addresses, but that's fixable.
You would also have to specify unique addressing scheme to those buses
that do not have it yet. E.g. what should be the address of a ISA bus
device? The base of its first ioport range? But if it does not have any
as it only injects ISA IRQs?
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]
next prev parent reply other threads:[~2010-05-29 15:50 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-22 8:17 [Qemu-devel] [PATCH v2 00/15] Basic device state visualization Jan Kiszka
2010-05-22 8:17 ` [Qemu-devel] [PATCH v2 01/15] Add dependency of JSON unit tests on config-host.h Jan Kiszka
2010-05-22 8:17 ` [Qemu-devel] [PATCH v2 02/15] qdev: Fix scanning across single-bus devices Jan Kiszka
2010-05-29 7:38 ` Markus Armbruster
2010-05-29 7:56 ` Jan Kiszka
2010-05-31 9:45 ` Gerd Hoffmann
2010-05-22 8:18 ` [Qemu-devel] [PATCH v2 03/15] qdev: Allow device addressing via 'driver.instance' Jan Kiszka
2010-05-29 7:50 ` Markus Armbruster
2010-05-29 8:09 ` Jan Kiszka [this message]
2010-05-31 8:43 ` Markus Armbruster
2010-05-22 8:18 ` [Qemu-devel] [PATCH v2 04/15] qdev: Convert device and bus lists to QTAILQ Jan Kiszka
2010-05-22 8:18 ` [Qemu-devel] [PATCH v2 05/15] qdev: Allow device specification by qtree path for device_del Jan Kiszka
2010-05-22 8:18 ` [Qemu-devel] [PATCH v2 06/15] qdev: Push QMP mode checks into qbus_list_bus/dev Jan Kiszka
2010-05-22 8:18 ` [Qemu-devel] [PATCH v2 07/15] monitor: Add completion for qdev paths Jan Kiszka
2010-05-22 8:18 ` [Qemu-devel] [PATCH v2 08/15] Add base64 encoder/decoder Jan Kiszka
2010-05-22 13:59 ` Blue Swirl
2010-05-23 7:55 ` Jan Kiszka
2010-05-23 8:48 ` Avi Kivity
2010-05-23 10:04 ` Jan Kiszka
2010-05-22 8:18 ` [Qemu-devel] [PATCH v2 09/15] QMP: Reserve namespace for complex object classes Jan Kiszka
2010-05-22 8:18 ` [Qemu-devel] [PATCH v2 10/15] Add QBuffer Jan Kiszka
2010-05-22 8:18 ` [Qemu-devel] [PATCH v2 11/15] monitor: return length of printed string via monitor_[v]printf Jan Kiszka
2010-05-22 8:18 ` [Qemu-devel] [PATCH v2 12/15] monitor: Add basic device state visualization Jan Kiszka
2010-05-22 18:55 ` [Qemu-devel] " Avi Kivity
2010-05-23 7:57 ` Jan Kiszka
2010-05-23 8:44 ` Avi Kivity
2010-05-23 10:03 ` Jan Kiszka
2010-05-23 10:42 ` Avi Kivity
2010-05-29 8:00 ` Markus Armbruster
2010-05-29 8:14 ` Jan Kiszka
2010-05-30 8:26 ` Avi Kivity
2010-05-30 12:36 ` Jan Kiszka
2010-05-31 8:46 ` Markus Armbruster
2010-05-31 8:58 ` Jan Kiszka
2010-05-31 11:07 ` Markus Armbruster
2010-05-31 11:11 ` Jan Kiszka
2010-05-24 12:51 ` Luiz Capitulino
2010-05-24 20:22 ` Anthony Liguori
2010-05-24 20:22 ` Anthony Liguori
2010-05-24 20:35 ` Jan Kiszka
2010-05-24 21:49 ` Anthony Liguori
2010-05-24 22:12 ` Jan Kiszka
2010-05-24 22:27 ` Anthony Liguori
2010-05-25 7:23 ` Avi Kivity
2010-05-25 13:03 ` Anthony Liguori
2010-05-25 13:19 ` Avi Kivity
2010-05-25 13:31 ` Anthony Liguori
2010-05-25 13:41 ` Avi Kivity
2010-05-22 8:18 ` [Qemu-devel] [PATCH v2 13/15] QMP: Teach basic capability negotiation to python example Jan Kiszka
2010-05-22 8:18 ` [Qemu-devel] [PATCH v2 14/15] QMP: Fix python helper /wrt long return strings Jan Kiszka
2010-05-22 8:18 ` [Qemu-devel] [PATCH v2 15/15] QMP: Add support for buffer class to qmp python helper Jan Kiszka
2010-05-22 14:05 ` [Qemu-devel] [PATCH v2 00/15] Basic device state visualization Blue Swirl
2010-05-23 7:55 ` Jan Kiszka
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=4C00CBBE.7030402@web.de \
--to=jan.kiszka@web.de \
--cc=aliguori@us.ibm.com \
--cc=armbru@redhat.com \
--cc=avi@redhat.com \
--cc=jan.kiszka@siemens.com \
--cc=lcapitulino@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).