From: Eduardo Habkost <ehabkost@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Marcel Apfelbaum <marcel@redhat.com>,
Laszlo Ersek <lersek@redhat.com>,
QEMU Developers <qemu-devel@nongnu.org>,
Markus Armbruster <armbru@redhat.com>
Subject: Re: [Qemu-devel] q35 and sysbus devices
Date: Fri, 24 Mar 2017 16:04:42 -0300 [thread overview]
Message-ID: <20170324190442.GF28530@thinpad.lan.raisama.net> (raw)
In-Reply-To: <CAFEAcA8q=GDx_DKv=YyPmVVM2EeKqeafcmWJivLLvzNZUeUEbg@mail.gmail.com>
On Fri, Mar 24, 2017 at 02:13:48PM +0000, Peter Maydell wrote:
> On 24 March 2017 at 13:48, Eduardo Habkost <ehabkost@redhat.com> wrote:
> > The problem with today's mechanism is that we have no way to make
> > a machine accept one type of sysbus device without making it
> > start accepting every other sysbus devices. If we thought all
> > !cannot_instantiate_with_device_add_yet sysbus devices were
> > already safe, we wouldn't have has_dynamic_sysbus in the first
> > place, would we?
>
> Almost all sysbus devices are not dynamically instantiable
> and never will be [...]
Exactly. But most of them do _not_ have
cannot_instantiate_with_device_add_yet set. What I don't know is:
should they?
> [...] because they need to map mmio and wire
> up IRQs and so on, and we have no mechanism for doing that.
> So the default position is "no, you can't do that (but maybe
> a subclass which knows better might override)". has_dynamic_sysbus
> is a dodgy hack for boards which support the "platform bus"
> which is a special case where the user can use -device
> for certain sysbus devices that the platform bus knows about
> and can wire up itself (in a range of irqs and memory that
> the board has set aside for that purpose). The default
> is still "no, you can't dynamically instantiate this", but
> instead of this (and the handful of exceptions) being imposed
> at compile time it's imposed (with exceptions) at runtime.
>
> So for instance the ARM 'virt' board sets has_dynamic_sysbus,
> which allows a few devices to be added with -device, but
> most still do not permit it (they'll end up hitting the
> error_report() in hw/arm/sysbus-fdt.c:add_fdt_node()).
I sent a series yesterday that implements a generic mechanism for
boards to set the list of accepted device types, to replace
has_dynamic_sysbus. That part was easy. But I still don't know
what to do about q35.
--
Eduardo
next prev parent reply other threads:[~2017-03-24 19:04 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-22 20:31 [Qemu-devel] q35 and sysbus devices Eduardo Habkost
2017-03-22 20:46 ` Laszlo Ersek
2017-03-24 10:49 ` Marcel Apfelbaum
2017-03-24 13:48 ` Eduardo Habkost
2017-03-24 14:13 ` Peter Maydell
2017-03-24 19:04 ` Eduardo Habkost [this message]
2017-03-24 16:58 ` Markus Armbruster
2017-03-24 17:08 ` Peter Maydell
2017-03-24 17:59 ` Markus Armbruster
2017-03-24 18:10 ` Peter Maydell
2017-03-27 8:00 ` Thomas Huth
2017-03-24 19:23 ` Eduardo Habkost
2017-03-27 8:44 ` Cornelia Huck
2017-03-27 9:00 ` Peter Maydell
2017-03-27 16:11 ` Eduardo Habkost
2017-03-24 11:41 ` Thomas Huth
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=20170324190442.GF28530@thinpad.lan.raisama.net \
--to=ehabkost@redhat.com \
--cc=armbru@redhat.com \
--cc=lersek@redhat.com \
--cc=marcel@redhat.com \
--cc=peter.maydell@linaro.org \
--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.