[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] q35 and sysbus devices
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] q35 and sysbus devices |
Date: |
Fri, 24 Mar 2017 14:13:48 +0000 |
On 24 March 2017 at 13:48, Eduardo Habkost <address@hidden> 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 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()).
thanks
-- PMM
- [Qemu-devel] q35 and sysbus devices, Eduardo Habkost, 2017/03/22
- Re: [Qemu-devel] q35 and sysbus devices, Laszlo Ersek, 2017/03/22
- Re: [Qemu-devel] q35 and sysbus devices, Marcel Apfelbaum, 2017/03/24
- Re: [Qemu-devel] q35 and sysbus devices, Markus Armbruster, 2017/03/24
- Re: [Qemu-devel] q35 and sysbus devices, Peter Maydell, 2017/03/24
- Re: [Qemu-devel] q35 and sysbus devices, Markus Armbruster, 2017/03/24
- Re: [Qemu-devel] q35 and sysbus devices, Peter Maydell, 2017/03/24
- Re: [Qemu-devel] q35 and sysbus devices, Thomas Huth, 2017/03/27
- Re: [Qemu-devel] q35 and sysbus devices, Eduardo Habkost, 2017/03/24
- Re: [Qemu-devel] q35 and sysbus devices, Cornelia Huck, 2017/03/27
- Re: [Qemu-devel] q35 and sysbus devices, Peter Maydell, 2017/03/27
- Re: [Qemu-devel] q35 and sysbus devices, Eduardo Habkost, 2017/03/27