[PATCH v2 0/5] Generalize the sysbus device machine allowance

Damien Hedde posted 5 patches 3 years, 10 months ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20220331115312.30018-1-damien.hedde@greensocs.com
Maintainers: Peter Maydell <peter.maydell@linaro.org>, Eduardo Habkost <eduardo@habkost.net>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, "Philippe Mathieu-Daudé" <f4bug@amsat.org>, Yanan Wang <wangyanan55@huawei.com>, Paolo Bonzini <pbonzini@redhat.com>, "Daniel P. Berrangé" <berrange@redhat.com>, Sergio Lopez <slp@redhat.com>, "Michael S. Tsirkin" <mst@redhat.com>, Richard Henderson <richard.henderson@linaro.org>, "Cédric Le Goater" <clg@kaod.org>, Daniel Henrique Barboza <danielhb413@gmail.com>, David Gibson <david@gibson.dropbear.id.au>, Greg Kurz <groug@kaod.org>, Palmer Dabbelt <palmer@dabbelt.com>, Alistair Francis <alistair.francis@wdc.com>, Bin Meng <bin.meng@windriver.com>, Stefano Stabellini <sstabellini@kernel.org>, Anthony Perard <anthony.perard@citrix.com>, Paul Durrant <paul@xen.org>
include/hw/boards.h         | 40 ++++++++++++++++++-------------------
include/hw/qdev-core.h      |  9 +++++++++
hw/arm/virt.c               | 10 +++++-----
hw/core/machine.c           | 10 +++++-----
hw/core/qdev.c              |  1 +
hw/core/sysbus.c            |  1 +
hw/i386/microvm.c           |  2 +-
hw/i386/pc_piix.c           |  4 ++--
hw/i386/pc_q35.c            |  8 ++++----
hw/ppc/e500plat.c           |  2 +-
hw/ppc/spapr.c              |  2 +-
hw/riscv/virt.c             |  2 +-
hw/xen/xen-legacy-backend.c |  2 +-
softmmu/qdev-monitor.c      |  8 ++++----
14 files changed, 56 insertions(+), 45 deletions(-)
[PATCH v2 0/5] Generalize the sysbus device machine allowance
Posted by Damien Hedde 3 years, 10 months ago
Hi all,

This series transforms the TYPE_SYSBUS_DEVICE allowed list that exists
in machine class model into a TYPE_DEVICE allowed list.

This will allow to add non-sysbus device into this list to prevent
the user to create them on most machines.
Typical use case will be for example cpu related devices like
these developed in the following series:
https://lore.kernel.org/qemu-devel/20220330125639.201937-1-damien.hedde@greensocs.com/

Patches 1 and 3 lack a review.

Thanks,
--
Damien

v2:
 + update the flag name and put it just below user_creatable (Philippe)

Damien Hedde (5):
  qdev: add user_creatable_requires_machine_allowance class flag
  machine: update machine allowed list related functions/fields
  qdev-monitor: use the new user_creatable_requires_machine_allowance
  rename machine_class_allow_dynamic_sysbus_dev
  machine: remove temporary inline functions

 include/hw/boards.h         | 40 ++++++++++++++++++-------------------
 include/hw/qdev-core.h      |  9 +++++++++
 hw/arm/virt.c               | 10 +++++-----
 hw/core/machine.c           | 10 +++++-----
 hw/core/qdev.c              |  1 +
 hw/core/sysbus.c            |  1 +
 hw/i386/microvm.c           |  2 +-
 hw/i386/pc_piix.c           |  4 ++--
 hw/i386/pc_q35.c            |  8 ++++----
 hw/ppc/e500plat.c           |  2 +-
 hw/ppc/spapr.c              |  2 +-
 hw/riscv/virt.c             |  2 +-
 hw/xen/xen-legacy-backend.c |  2 +-
 softmmu/qdev-monitor.c      |  8 ++++----
 14 files changed, 56 insertions(+), 45 deletions(-)

-- 
2.35.1