[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 0/6] Replace has_dynamic_sysbus with list of allo
From: |
Eduardo Habkost |
Subject: |
[Qemu-devel] [PATCH v2 0/6] Replace has_dynamic_sysbus with list of allowed device types |
Date: |
Sat, 25 Nov 2017 13:16:04 -0200 |
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 <address@hidden>
Cc: Marcel Apfelbaum <address@hidden>
Cc: Paolo Bonzini <address@hidden>
Cc: Stefan Berger <address@hidden>
Cc: Alexander Graf <address@hidden>
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
- [Qemu-devel] [PATCH v2 0/6] Replace has_dynamic_sysbus with list of allowed device types,
Eduardo Habkost <=