qemu-e2k/stubs
David Hildenbrand 2cc0e2e814 pc-dimm: factor out MemoryDevice interface
On the qmp level, we already have the concept of memory devices:
    "query-memory-devices"
Right now, we only support NVDIMM and PCDIMM.

We want to map other devices later into the address space of the guest.
Such device could e.g. be virtio devices. These devices will have a
guest memory range assigned but won't be exposed via e.g. ACPI. We want
to make them look like memory device, but not glued to pc-dimm.

Especially, it will not always be possible to have TYPE_PC_DIMM as a parent
class (e.g. virtio devices). Let's use an interface instead. As a first
part, convert handling of
- qmp_pc_dimm_device_list
- get_plugged_memory_size
to our new model. plug/unplug stuff etc. will follow later.

A memory device will have to provide the following functions:
- get_addr(): Necessary, as the property "addr" can e.g. not be used for
              virtio devices (already defined).
- get_plugged_size(): The amount this device offers to the guest as of
                      now.
- get_region_size(): Because this can later on be bigger than the
                     plugged size.
- fill_device_info(): Fill MemoryDeviceInfo, e.g. for qmp.

Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20180423165126.15441-2-david@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
2018-05-07 10:00:02 -03:00
..
arch-query-cpu-def.c Include qapi/error.h exactly where needed 2018-02-09 13:50:17 +01:00
arch-query-cpu-model-baseline.c Include qapi/error.h exactly where needed 2018-02-09 13:50:17 +01:00
arch-query-cpu-model-comparison.c Include qapi/error.h exactly where needed 2018-02-09 13:50:17 +01:00
arch-query-cpu-model-expansion.c Include qapi/error.h exactly where needed 2018-02-09 13:50:17 +01:00
bdrv-next-monitor-owned.c
blk-commit-all.c
blockdev-close-all-bdrv-states.c
change-state-handler.c
clock-warp.c
cpu-get-clock.c
cpu-get-icount.c
dump.c Include qmp-commands.h exactly where needed 2018-02-09 13:52:10 +01:00
error-printf.c
fd-register.c
fdset.c
gdbstub.c
get-vm-name.c
iothread-lock.c
iothread.c
is-daemonized.c
linux-aio.c
machine-init-done.c vl: export machine_init_done 2018-03-12 16:12:46 +01:00
Makefile.objs pc-dimm: factor out MemoryDevice interface 2018-05-07 10:00:02 -03:00
migr-blocker.c
monitor.c
notify-event.c
pc_madt_cpu_entry.c
pci-host-piix.c
qmp_memory_device.c pc-dimm: factor out MemoryDevice interface 2018-05-07 10:00:02 -03:00
qtest.c
ram-block.c stubs: Add stubs for ram block API 2018-02-08 09:22:03 +08:00
replay.c replay: make locking visible outside replay code 2018-03-12 16:12:50 +01:00
runstate-check.c
set-fd-handler.c
slirp.c
sysbus.c
target-get-monitor-def.c
target-monitor-defs.c
tpm.c Include less of the generated modular QAPI headers 2018-03-02 13:45:50 -06:00
trace-control.c
uuid.c qapi: Empty out qapi-schema.json 2018-03-02 13:45:50 -06:00
vm-stop.c
vmgenid.c qapi: Empty out qapi-schema.json 2018-03-02 13:45:50 -06:00
vmstate.c
xen-common.c
xen-hvm.c qapi: Empty out qapi-schema.json 2018-03-02 13:45:50 -06:00