Skip to content

RFC bus-less device hotplug

Igor Mammedov qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest8 patches 17 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8vl.c: extend -m option to support options for memory hotpluginclude/hw/boards.h qemu-options.hx vl.c+59 -30 replies
2/8make machine_class_init() accessible outside of vl.chw/core/machine.c include/hw/boards.h vl.c+9 -72 replies
3/8pc: prepare PC for custom machine statehw/i386/pc.c hw/i386/pc_piix.c hw/i386/pc_q35.c +1 more+62 -227 replies
4/8qdev: link based hotplughw/core/hotplug.c hw/core/qdev.c include/hw/hotplug.h +1 more+53 -08 replies
5/8dimm: implement dimm device abstractiondefault-configs/i386-softmmu.mak default-configs/x86_64-softmmu.mak hw/Makefile.objs +3 more+162 -00 replies
6/8pc: preallocate hotplug links for DIMMDeviceshw/i386/pc.c include/hw/i386/pc.h+39 -00 replies
7/8pc: initialize memory hotplug address spacehw/i386/pc.c include/hw/i386/pc.h+19 -20 replies
8/8pc: make PC_MACHINE memory hotplug controllerhw/i386/pc.c+18 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [Qemu-devel] [RFC 0/8] bus-less device hotplug

This series is a excerpt from memory hotplug series, posted for getting an opinion on hotplug implementation for bus-less devices using link<>s as a means to provide connection between hotplugged device and hotplug controller that performs board specific actions that hot-added device ishould not be aware of.

Patches implementing link<> based hotplug are:
qdev: link based hotplug
pc: preallocate hotplug links for DIMMDevices
...
pc: make PC_MACHINE memory hotplug controller
the rest is just an environment to make above work.

compile-able WIP tree is available at:
https://github.com/imammedo/qemu/commits/memory-hotplug-v8

way to test:
- run:
x86_64-softmmu/qemu-system-x86_64 -monitor stdio -object memory-ram,id=foo,size=1G -m 1G,slots=1,maxmem=2G
- in monitor execute:
(qemu) device_add dimm,id=dimm1,memdev=foo
(qemu) info mtree

there should be "foo" memory region under "hotplug-memory" container.

Igor Mammedov (7):
vl.c: extend -m option to support options for memory hotplug make machine_class_init() accessible outside of vl.c
pc: prepare PC for custom machine state
qdev: link based hotplug
pc: preallocate hotplug links for DIMMDevices
pc: initialize memory hotplug address space
pc: make PC_MACHINE memory hotplug controller

Vasilis Liaskovitis (1):
dimm: implement dimm device abstraction

 default-configs/i386-softmmu.mak   |    1 +
 default-configs/x86_64-softmmu.mak |    1 +
 hw/Makefile.objs                   |    1 +
 hw/core/hotplug.c                  |   30 +++++++++++
 hw/core/machine.c                  |    7 +++
 hw/core/qdev.c                     |   15 +++++
 hw/i386/pc.c                       |   95 +++++++++++++++++++++++++++++++++-
 hw/i386/pc_piix.c                  |   34 ++++++------
 hw/i386/pc_q35.c                   |   10 ++--
 hw/mem/Makefile.objs               |    1 +
 hw/mem/dimm.c                      |  100 ++++++++++++++++++++++++++++++++++++
 include/hw/boards.h                |    4 ++
 include/hw/hotplug.h               |    2 +
 include/hw/i386/pc.h               |   23 ++++++++
 include/hw/mem/dimm.h              |   58 +++++++++++++++++++++
 include/hw/qdev-core.h             |    6 ++
 qemu-options.hx                    |    9 ++-
 vl.c                               |   58 ++++++++++++++++++---
 18 files changed, 421 insertions(+), 34 deletions(-)
 create mode 100644 hw/mem/Makefile.objs
 create mode 100644 hw/mem/dimm.c
 create mode 100644 include/hw/mem/dimm.h