]> git.proxmox.com Git - mirror_qemu.git/commit - hw/ppc/spapr.c
machine: make MemoryHotplugState accessible via the machine
authorDavid Hildenbrand <david@redhat.com>
Mon, 23 Apr 2018 16:51:17 +0000 (18:51 +0200)
committerEduardo Habkost <ehabkost@redhat.com>
Mon, 7 May 2018 13:00:02 +0000 (10:00 -0300)
commitb0c14ec4efe912ae6f14a4802574f7b6b6db0648
tree87e01fb55fb216721e888739603d07eee337a716
parent2cc0e2e8140f43ccc6aced6e47c9c2db15ce2330
machine: make MemoryHotplugState accessible via the machine

Let's allow to query the MemoryHotplugState directly from the machine.
If the pointer is NULL, the machine does not support memory devices. If
the pointer is !NULL, the machine supports memory devices and the
data structure contains information about the applicable physical
guest address space region.

This allows us to generically detect if a certain machine has support
for memory devices, and to generically manage it (find free address
range, plug/unplug a memory region).

We will rename "MemoryHotplugState" to something more meaningful
("DeviceMemory") after we completed factoring out the pc-dimm code into
MemoryDevice code.

Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20180423165126.15441-3-david@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
[ehabkost: rebased series, solved conflicts at spapr.c]
[ehabkost: squashed fix to use g_malloc0()]
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
hw/i386/acpi-build.c
hw/i386/pc.c
hw/ppc/spapr.c
hw/ppc/spapr_hcall.c
hw/ppc/spapr_rtas_ddw.c
include/hw/boards.h
include/hw/i386/pc.h
include/hw/mem/pc-dimm.h
include/hw/ppc/spapr.h