This patch series enables machvirt to dynamically instantiate sysbus devices from command line (using -device option). All those sysbus devices are plugged onto a platform bus. This latter device is instantiated in machvirt and takes care of the binding of children sysbus devices on a machine init done notifier. The device tree node generation for children dynamic sysbus device also happens on a subsequent notifier that must be executed after the above one. machvirt registers that notifier before the platform bus creation to make sure notifiers are executed in the right order: dt generation after actual QOM binding. Very few sysbus devices are supposed to be instantiated that way. VFIO devices belong to them. Node creation really is architecture specific. On ARM the dynamic sysbus device node creation is implemented in a new C module, hw/arm/sysbus-fdt.c and not in the machine file. Machvirt transformations and sysbus-fdt are largely inspired from Alex work. The patch series can be found at: http://git.linaro.org/people/eric.auger/qemu.git (branch vfio_integ_v8) Best Regards Eric v4 -> v5: - in virt.c: platform_bus_params becomes static const - sysbus-fdt: change indentation in add_fdt_node_functions array init - s/load_dtb/arm_load_dtb in one boot.c comment v3 -> v4: - dyn_sysbus_binding removed since binding stuff now are implemented by the platform bus device - due to a change in ARM load_dtb implementation using rom_add_blob_fixed, the dt no more is generated in a reset notifier but is generated on a machine init done notifier - the augmented device tree is not generated from scratch anymore but is added using a modify_dtb function. This required some small change in boot.c - the case where the user provides a dtb file now is handled - some cleanup in virt additions - implement a list of dyanmically instantiable devices in sysbus-fdt v2 -> v3: - patch now applies on top of Alex full patchset - dyn_sysbus_devtree: add arm_prefix to emphasize the fact those functions are arm specific; arm_sysbus_device_create_devtree becomes static - load_dtb renamed into arm_load_dtb - add copyright in hw/arm/dyn_sysbus_devtree.c Eric Auger (6): hw/arm/boot: load_dtb becomes non static arm_load_dtb hw/arm/boot: dtb start and limit moved in arm_boot_info hw/arm/boot: do not free VirtBoardInfo fdt in arm_load_dtb hw/arm: add a new modify_dtb_opaque field in arm_boot_info hw/arm/sysbus-fdt: helpers for platform bus nodes addition hw/arm/virt: add dynamic sysbus device support hw/arm/Makefile.objs | 1 + hw/arm/boot.c | 52 +++++++------ hw/arm/sysbus-fdt.c | 180 ++++++++++++++++++++++++++++++++++++++++++++ hw/arm/virt.c | 57 ++++++++++++++ include/hw/arm/arm.h | 7 ++ include/hw/arm/sysbus-fdt.h | 50 ++++++++++++ 6 files changed, 325 insertions(+), 22 deletions(-) create mode 100644 hw/arm/sysbus-fdt.c create mode 100644 include/hw/arm/sysbus-fdt.h -- 1.8.3.2 _______________________________________________ kvmarm mailing list kvmarm@xxxxxxxxxxxxxxxxxxxxx https://lists.cs.columbia.edu/mailman/listinfo/kvmarm