qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH 0/6] Dynamic sysbus device allocation support


From: Alexander Graf
Subject: [Qemu-devel] [PATCH 0/6] Dynamic sysbus device allocation support
Date: Tue, 1 Jul 2014 23:49:32 +0200

Platforms without ISA and/or PCI have had a seriously hard time in the dynamic
device creation world of QEMU. Devices on these were modeled as SysBus devices
which can only be instantiated in machine files, not through -device.

Why is that so?

For Sysbus devices we didn't know who should be responsible for mapping them
when the machine file didn't do it. Turns out, the machine file is the perfect
place to map them even when it doesn't create them :).

This patch set enables machine files to declare sysbus device creation via the
-device command line option as possible. With this we can (in the machine file)
map sysbus devices to whatever the machine thinks is fitting.

Some times users do want to specify manually where to map a device. This is
very useful when you want to have stable offsets in memory and irq space.
This patch set adds support for "user mapping hints" that the machine can use
to map a device at a certain location.

As example this patch set only enables the eTSEC device on the e500plat machine
type. This device was not possible to get added to the machine at all.

  $ qemu-system-ppc -nographic -M ppce500 -device eTSEC,netdev=nd \
                    -netdev user,id=nd

The idea can easily be extended to any sysbus device on any machine type though.


This patch set is based on previous ideas and discussions, most notably:

  https://lists.gnu.org/archive/html/qemu-devel/2013-07/msg03614.html
  https://lists.gnu.org/archive/html/qemu-devel/2014-06/msg00849.html

Alex

Alexander Graf (6):
  qom: macroify integer property helpers
  qom: Allow to make integer qom properties writeable
  sysbus: Add user map hints
  sysbus: Make devices spawnable via -device
  PPC: e500: Support dynamically spawned sysbus devices
  e500: Add support for eTSEC in device tree

 hw/acpi/ich9.c       |   4 +-
 hw/acpi/pcihp.c      |   2 +-
 hw/acpi/piix4.c      |  12 +--
 hw/core/machine.c    |  41 ++++++++
 hw/core/sysbus.c     |  80 +++++++++++++--
 hw/i386/acpi-build.c |   2 +-
 hw/isa/lpc_ich9.c    |   4 +-
 hw/ppc/e500.c        | 285 +++++++++++++++++++++++++++++++++++++++++++++++++++
 hw/ppc/e500.h        |   1 +
 hw/ppc/e500plat.c    |   1 +
 include/hw/boards.h  |   2 +
 include/hw/sysbus.h  |   6 ++
 include/qom/object.h |  84 ++++++++++++++-
 qom/object.c         |  94 +++++++----------
 ui/console.c         |   3 +-
 15 files changed, 535 insertions(+), 86 deletions(-)

-- 
1.8.1.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]