[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC 0/4] Replace has_dynamic_sysbus with device type w
From: |
Juergen Gross |
Subject: |
Re: [Qemu-devel] [RFC 0/4] Replace has_dynamic_sysbus with device type whitelist |
Date: |
Fri, 24 Mar 2017 09:27:50 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 |
On 23/03/17 22:28, Eduardo Habkost wrote:
> Summary
> -------
>
> This series replaces the existing has_dynamic_sysbus flag (that
> makes the machine accept every single sysbus device type on the
> command-line) with a short whitelist.
>
> This will be helpful when implementing the new query-device-slots
> command, because each machine type will include only the sysbus
> devices it really supports, instead of including a catch-all
> TYPE_SYS_BUS_DEVICE "slot".
>
> Most of the machines already have an internal whitelist
> implemented using foreach_dynamic_sysbus_device(), so we just
> encode the existing behavior inside the new MachineClass field.
>
> Caveat: q35
> -----------
>
> The only problematic case is q35, that accepts all sysbus device
> types. In this case, instead of adding TYPE_SYS_BUS_DEVICE to the
> whitelist, I'm adding the existing list of existing sysbus device
> types to keep compatibility. After that, we can gradually and
> carefully remove unnecessary entries from the q35 whitelist.
>
> Issue: xen_set_dynamic_sysbus() hack
> ------------------------------------
>
> We still have an obstacle to get around: the callers of
> qdev_set_id() outside qdev_device_add() are breaking
> foreach_dynamic_sysbus_device(), and xen_set_dynamic_sysbus() is
> a workaround for that bug. We now need to fix that bug to be able
> to remove the xen_set_dynamic_sysbus() hack. This means the first
> patch of this series will probably break Xen, until we fix that
> bug.
>
> Eduardo Habkost (4):
> [UNTESTED] xen: Don't force has_dynamic_sysbus on machine class
> machine: Replace has_dynamic_sysbus with a whitelist
> q35: Remove ioapic devices from sysbus whitelist
> q35: Remove fw_cfg* from sysbus whitelist
>
> include/hw/arm/sysbus-fdt.h | 7 +++++++
> include/hw/boards.h | 3 ++-
> hw/arm/sysbus-fdt.c | 10 ++++++++++
> hw/arm/virt.c | 4 +++-
> hw/core/machine.c | 43 +++++++++++++++++++++++++++++--------------
> hw/i386/pc_q35.c | 25 ++++++++++++++++++++++++-
> hw/ppc/e500plat.c | 4 +++-
> hw/ppc/spapr.c | 2 +-
> hw/xen/xen_backend.c | 11 -----------
> 9 files changed, 79 insertions(+), 30 deletions(-)
>
This seems to break Xen. I got:
qemu-system-i386: Option '-device xen-backend' cannot be handled by this
machine
when using qemu as Xen backend driver.
Juergen
- Re: [Qemu-devel] [RFC 1/4] [UNTESTED] xen: Don't force has_dynamic_sysbus on machine class, (continued)
- Re: [Qemu-devel] [RFC 1/4] [UNTESTED] xen: Don't force has_dynamic_sysbus on machine class, Peter Maydell, 2017/03/24
- Re: [Qemu-devel] [RFC 1/4] [UNTESTED] xen: Don't force has_dynamic_sysbus on machine class, Juergen Gross, 2017/03/24
- Re: [Qemu-devel] [RFC 1/4] [UNTESTED] xen: Don't force has_dynamic_sysbus on machine class, Eduardo Habkost, 2017/03/24
- Re: [Qemu-devel] [RFC 1/4] [UNTESTED] xen: Don't force has_dynamic_sysbus on machine class, Juergen Gross, 2017/03/24
- Re: [Qemu-devel] [RFC 1/4] [UNTESTED] xen: Don't force has_dynamic_sysbus on machine class, Eduardo Habkost, 2017/03/24
- Re: [Qemu-devel] [RFC 1/4] [UNTESTED] xen: Don't force has_dynamic_sysbus on machine class, Juergen Gross, 2017/03/24
- Re: [Qemu-devel] [RFC 1/4] [UNTESTED] xen: Don't force has_dynamic_sysbus on machine class, Thomas Huth, 2017/03/24
[Qemu-devel] [RFC 2/4] machine: Replace has_dynamic_sysbus with a whitelist, Eduardo Habkost, 2017/03/23
[Qemu-devel] [RFC 3/4] q35: Remove ioapic devices from sysbus whitelist, Eduardo Habkost, 2017/03/23
[Qemu-devel] [RFC 4/4] q35: Remove fw_cfg* from sysbus whitelist, Eduardo Habkost, 2017/03/23
Re: [Qemu-devel] [RFC 0/4] Replace has_dynamic_sysbus with device type whitelist,
Juergen Gross <=