Received: from eggs.gnu.org ([2001:4830:134:3::10]:49552) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XFliH-0001Kf-PA for qemu-devel@nongnu.org; Fri, 08 Aug 2014 11:04:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XFliD-00073m-3y for qemu-devel@nongnu.org; Fri, 08 Aug 2014 11:04:13 -0400 Received: from mail-wi0-f180.google.com ([209.85.212.180]:45012) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XFliC-00073N-Ug for qemu-devel@nongnu.org; Fri, 08 Aug 2014 11:04:09 -0400 Received: by mail-wi0-f180.google.com with SMTP id n3so1163546wiv.7 for ; Fri, 08 Aug 2014 08:04:07 -0700 (PDT) From: Eric Auger Date: Fri, 8 Aug 2014 16:03:42 +0100 Message-Id: <1407510229-28167-1-git-send-email-eric.auger@linaro.org> Subject: [Qemu-devel] [RFC v2 0/7] machvirt dynamic sysbus device instantiation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: eric.auger@st.com, christoffer.dall@linaro.org, qemu-devel@nongnu.org, kim.phillips@freescale.com, a.rigo@virtualopensystems.com Cc: peter.maydell@linaro.org, eric.auger@linaro.org, patches@linaro.org, will.deacon@arm.com, agraf@suse.de, stuart.yoder@freescale.com, Bharat.Bhushan@freescale.com, alex.williamson@redhat.com, a.motakis@virtualopensystems.com, kvmarm@lists.cs.columbia.edu 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@nongnu.org/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