[RFC v2 0/7] machvirt dynamic sysbus device instantiation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This RFC enables machvirt to dynamically instantiate sysbus devices
from command line.

the RFC originates from Alex Graf's work
- "Dynamic sysbus device allocation support"
  http://lists.gnu.org/archive/html/qemu-ppc/2014-07/msg00047.html

The code related to dynamic sysbus device IRQ and mmio region binding
and device tree node generation, originally developped in PPC e500.c,
is moved into 2 new modules:

- hw/misc/dyn_sysbus_binding (IRQ and MMIO binding)
- hw/arm/dyn_sysbus_devtree  (dt node generation)

This makes possible to reuse it for ARM/machvirt.

Both e500 and machvirt are adapted to use those helper routines.

This RFC applies onto "sysbus: Make devices spawnable via -device"
https://www.mail-archive.com/qemu-devel@xxxxxxxxxx/msg244394.html.

---

integrated branch can be found on
git://git.linaro.org/people/eric.auger/qemu.git,
branch dyn-sysbus-v2-integ

A related discussion can be found at
https://lists.nongnu.org/archive/html/qemu-devel/2014-07/msg04065.html

For e500 the device tree generation is kept in the machine file,
according to Alex will.

For machvirt we use dyn_sysbus_devtree since the code becomes large
with the expected support of vfio devices.

Best Regards
Eric

v1 -> v2:
- device node generation no more in sysbus device but in
  dyn_sysbus_devtree
- VFIO region shrinked to 4MB and relocated in machvirt to avoid PCI
  shrink (dynamic vfio-mmio support might come latter)
- platform_bus_base removed from PlatformDevtreeData

Alexander Graf (2):
  PPC: e500: Support dynamically spawned sysbus devices
  e500: Add support for eTSEC in device tree

Eric Auger (5):
  hw/misc/dyn_sysbus_binding: helpers for sysbus device dynamic binding
  hw/arm/dyn_sysbus_devtree: helpers for sysbus device dynamic dt node  
      generation
  hw/arm/boot: load_dtb becomes non static
  hw/arm/virt: add new add_fdt_xxx_node functions
  hw/arm/virt: Support dynamically spawned sysbus devices

 hw/arm/Makefile.objs                 |   1 +
 hw/arm/boot.c                        |   2 +-
 hw/arm/dyn_sysbus_devtree.c          |  66 ++++++++++++++
 hw/arm/virt.c                        | 129 +++++++++++++++++++++------
 hw/misc/Makefile.objs                |   1 +
 hw/misc/dyn_sysbus_binding.c         | 163 +++++++++++++++++++++++++++++++++++
 hw/ppc/e500.c                        | 129 +++++++++++++++++++++++++++
 hw/ppc/e500.h                        |   2 +
 hw/ppc/e500plat.c                    |   9 ++
 include/hw/arm/arm.h                 |   1 +
 include/hw/arm/dyn_sysbus_devtree.h  |  18 ++++
 include/hw/misc/dyn_sysbus_binding.h |  24 ++++++
 12 files changed, 519 insertions(+), 26 deletions(-)
 create mode 100644 hw/arm/dyn_sysbus_devtree.c
 create mode 100644 hw/misc/dyn_sysbus_binding.c
 create mode 100644 include/hw/arm/dyn_sysbus_devtree.h
 create mode 100644 include/hw/misc/dyn_sysbus_binding.h

-- 
1.8.3.2

_______________________________________________
kvmarm mailing list
kvmarm@xxxxxxxxxxxxxxxxxxxxx
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm




[Index of Archives]     [Linux KVM]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux