All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [RFC 0/4] Replace has_dynamic_sysbus with device type whitelist
@ 2017-03-23 21:28 Eduardo Habkost
  2017-03-23 21:28 ` [Qemu-devel] [RFC 1/4] [UNTESTED] xen: Don't force has_dynamic_sysbus on machine class Eduardo Habkost
                   ` (4 more replies)
  0 siblings, 5 replies; 14+ messages in thread
From: Eduardo Habkost @ 2017-03-23 21:28 UTC (permalink / raw)
  To: qemu-devel
  Cc: jgross, Thomas Huth, sstabellini, Markus Armbruster,
	Laszlo Ersek, Marcel Apfelbaum

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(-)

-- 
2.11.0.259.g40922b1

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2017-03-24 13:59 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-23 21:28 [Qemu-devel] [RFC 0/4] Replace has_dynamic_sysbus with device type whitelist Eduardo Habkost
2017-03-23 21:28 ` [Qemu-devel] [RFC 1/4] [UNTESTED] xen: Don't force has_dynamic_sysbus on machine class Eduardo Habkost
2017-03-24  8:23   ` Juergen Gross
2017-03-24 10:09     ` Peter Maydell
2017-03-24 10:24       ` Juergen Gross
2017-03-24 11:10         ` Eduardo Habkost
2017-03-24 12:27           ` Juergen Gross
2017-03-24 13:50             ` Eduardo Habkost
2017-03-24 13:59               ` Juergen Gross
2017-03-24 10:32       ` Thomas Huth
2017-03-23 21:28 ` [Qemu-devel] [RFC 2/4] machine: Replace has_dynamic_sysbus with a whitelist Eduardo Habkost
2017-03-23 21:28 ` [Qemu-devel] [RFC 3/4] q35: Remove ioapic devices from sysbus whitelist Eduardo Habkost
2017-03-23 21:28 ` [Qemu-devel] [RFC 4/4] q35: Remove fw_cfg* " Eduardo Habkost
2017-03-24  8:27 ` [Qemu-devel] [RFC 0/4] Replace has_dynamic_sysbus with device type whitelist Juergen Gross

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.