From: Gleb Natapov <gleb@redhat.com>
To: Alex Williamson <alex.williamson@redhat.com>
Cc: Markus Armbruster <armbru@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] initialize unit id of IDE bus
Date: Tue, 26 Oct 2010 16:26:09 +0200 [thread overview]
Message-ID: <20101026142609.GB2764@redhat.com> (raw)
In-Reply-To: <1288102552.5129.86.camel@x201>
On Tue, Oct 26, 2010 at 08:15:52AM -0600, Alex Williamson wrote:
> On Tue, 2010-10-26 at 13:20 +0200, Markus Armbruster wrote:
> > >> How to tell whether it's primary or secondary? Primary uses I/O ports
> > >> 0x1f0..0x1ff,0x3f0..0x3ff and IRQ 14. IRQ could be easier to check,
> > >> because it should be right in ISADevice member isairq[0].
> > >> Alternatively, upcast to ISAIDEState and check members iobase or isairq.
> > > Again idebus_dev_path() should not care about what device IDEBus resides on.
> >
> > We really need to define what qbus's get_dev_path() callback is supposed
> > to do before we continue. Alex, you created it. What's your take on
> > its semantics?
>
> Perhaps going into too much detail, but the idea of get_dev_path() is
> that it's a recursive call up the device try, where each level adds a
> string to come up with a unique description. We currently only have
> this of PCI because it's device path is obvious, while others are not,
> particularly ISA.
>
> To start, I'd think IDE could easily implement a get_dev_path(), where
> the IDE qbus calls up to it's parent bus, then appends IDE channel and
> slot. So for a PCI IDE controller, we get something like
> PCI:0000:00:03.0/piix3-IDE0.master (change this to match qdev info
> strings, I'm just making it up here).
>
If we will do it like you suggest device path will be meaningless
outside of qemu internals. I would like get_dev_path() to build device
path that can be used in a guest to locate the device. In your example
above piix3-IDE0 does not provide any additional information anyway
since PCI:0000:00:03.0 already point at a device that can be easily
identified as piix3-ede0 by looking into PCI config space.
So for IDE I would like it to be like that:
PCI@0000:00:03.0/IDE@0:1
> An ISA IDE controller is harder since ISA doesn't have a bus enumeration
> mechanism. IIRC, there we some suggestions to use ioports and/or irqs
> to define a path on ISA, but not all ISA qdev devices expose these. So
> perhaps we'd want something like isa.irq14/piix3-IDE0.master. Doing ISA
> correctly probably means standardizing some portion of the qdev info for
> all the ISA devices. Thanks,
Have you looked at my isabus_get_dev_path() patch? It keeps track of
ioports used by ISA device at ISADevice level.
--
Gleb.
next prev parent reply other threads:[~2010-10-26 14:26 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-24 16:23 [Qemu-devel] [PATCH] initialize unit id of IDE bus Gleb Natapov
2010-10-25 14:29 ` Markus Armbruster
2010-10-25 15:42 ` Gleb Natapov
2010-10-25 16:22 ` Markus Armbruster
2010-10-25 16:49 ` Gleb Natapov
2010-10-25 18:06 ` Markus Armbruster
2010-10-25 18:20 ` Gleb Natapov
2010-10-26 9:29 ` Markus Armbruster
2010-10-26 10:23 ` Gleb Natapov
2010-10-26 11:59 ` Markus Armbruster
2010-10-26 12:32 ` Gleb Natapov
2010-10-26 7:28 ` Gleb Natapov
2010-10-26 9:14 ` Markus Armbruster
2010-10-26 10:15 ` Gleb Natapov
2010-10-26 11:20 ` Markus Armbruster
2010-10-26 12:12 ` Gleb Natapov
2010-10-26 12:39 ` Markus Armbruster
2010-10-26 13:03 ` Gleb Natapov
2010-10-26 14:15 ` Alex Williamson
2010-10-26 14:26 ` Gleb Natapov [this message]
2010-10-26 14:44 ` Alex Williamson
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=20101026142609.GB2764@redhat.com \
--to=gleb@redhat.com \
--cc=alex.williamson@redhat.com \
--cc=armbru@redhat.com \
--cc=qemu-devel@nongnu.org \
/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.