qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2 0/6] Replace has_dynamic_sysbus with list of allowed device types
@ 2017-11-25 15:16 Eduardo Habkost
  2017-11-25 15:16 ` [Qemu-devel] [PATCH v2 1/6] machine: Replace has_dynamic_sysbus with list of allowed devices Eduardo Habkost
                   ` (7 more replies)
  0 siblings, 8 replies; 25+ messages in thread
From: Eduardo Habkost @ 2017-11-25 15:16 UTC (permalink / raw)
  To: qemu-devel
  Cc: jgross, Thomas Huth, sstabellini, Laszlo Ersek, Marcel Apfelbaum,
	Marc-André Lureau, Paolo Bonzini, Stefan Berger,
	Alexander Graf

Changes v1 (RFC) -> v2:
* Patch 1 now just adds TYPE_SYS_BUS_DEVICE to the existing
  has_dynamic_sysbus=true machines, and other patches make
  the lists on each machine-type more specific.
* Change the name of the new field to
  allowed_dynamic_sysbus_devices.
* The q35 allowed list is much shorter because the list of
  user-creatable sysbus devices in QEMU is shorter.
* Keep the xen_set_dynamic_sysbus() hack, just change it
  to add 'xen-sysdev" to the allowed list.
* Simplified the arm/virt code.

Summary
-------

This series replaces the existing has_dynamic_sysbus flag (that
makes the machine accept every user-creatable sysbus device type
on the command-line) with a list of allowed devices.

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".

This will be useful to add support to new sysbus devices on
machines like pc_piix, that don't have has_dynamic_sysbus set
today.

This also makes the code safer: just compiling a new sysbus
device in the same QEMU binary won't make a machine-type
automatically start accepting the device.

Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
Cc: Marcel Apfelbaum <marcel@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Stefan Berger <stefanb@linux.vnet.ibm.com>
Cc: Alexander Graf <agraf@suse.de>

Eduardo Habkost (6):
  machine: Replace has_dynamic_sysbus with list of allowed devices
  hw/arm/virt: Allow only supported dynamic sysbus devices
  ppc: e500: Allow only supported dynamic sysbus devices
  spapr: Allow only supported dynamic sysbus devices
  xen: Add only xen-sysdev to dynamic sysbus device list
  q35: Allow only supported dynamic sysbus devices

 include/hw/boards.h  |  5 ++++-
 hw/arm/virt.c        |  5 ++++-
 hw/core/machine.c    | 43 +++++++++++++++++++++++++++++--------------
 hw/i386/pc_q35.c     |  5 ++++-
 hw/ppc/e500plat.c    |  4 +++-
 hw/ppc/spapr.c       |  2 +-
 hw/xen/xen_backend.c |  2 +-
 7 files changed, 46 insertions(+), 20 deletions(-)

-- 
2.13.6

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

end of thread, other threads:[~2018-01-09 20:12 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-25 15:16 [Qemu-devel] [PATCH v2 0/6] Replace has_dynamic_sysbus with list of allowed device types Eduardo Habkost
2017-11-25 15:16 ` [Qemu-devel] [PATCH v2 1/6] machine: Replace has_dynamic_sysbus with list of allowed devices Eduardo Habkost
2017-11-25 17:08   ` Greg Kurz
2017-11-27  1:51   ` David Gibson
2017-11-27  8:39   ` Marcel Apfelbaum
2017-11-28 16:55   ` Marc-André Lureau
2017-11-28 18:34     ` Eduardo Habkost
2017-11-25 15:16 ` [Qemu-devel] [PATCH v2 2/6] hw/arm/virt: Allow only supported dynamic sysbus devices Eduardo Habkost
2017-11-25 15:16 ` [Qemu-devel] [PATCH v2 3/6] ppc: e500: " Eduardo Habkost
2017-11-25 18:31   ` Greg Kurz
2017-11-28  1:11     ` Eduardo Habkost
2017-11-27  1:52   ` David Gibson
2017-11-28  1:12     ` Eduardo Habkost
2017-11-28  4:54       ` David Gibson
2017-11-25 15:16 ` [Qemu-devel] [PATCH v2 4/6] spapr: " Eduardo Habkost
2017-11-25 17:43   ` Greg Kurz
2017-11-27  1:52   ` David Gibson
2017-11-25 15:16 ` [Qemu-devel] [PATCH v2 5/6] xen: Add only xen-sysdev to dynamic sysbus device list Eduardo Habkost
2017-12-22 13:36   ` Marc-André Lureau
2018-01-05 14:12   ` Anthony PERARD
2017-11-25 15:16 ` [Qemu-devel] [PATCH v2 6/6] q35: Allow only supported dynamic sysbus devices Eduardo Habkost
2017-11-27  8:44   ` Marcel Apfelbaum
2017-11-28  1:18     ` Eduardo Habkost
2017-12-22 13:37 ` [Qemu-devel] [PATCH v2 0/6] Replace has_dynamic_sysbus with list of allowed device types Marc-André Lureau
2018-01-09 20:12 ` Eduardo Habkost

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).