qemu-patch-raspberry4/hw/i386
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
..
kvm kvmclock: fix clock_is_reliable on migration from QEMU < 2.9 2018-04-09 16:36:39 +02:00
xen xen: Use newly added dmops for mapping VGA memory 2018-04-26 16:29:51 +01:00
acpi-build.c pc-dimm: factor out MemoryDevice interface 2018-05-07 10:00:02 -03:00
acpi-build.h Use scripts/clean-includes to drop redundant qemu/typedefs.h 2016-03-22 22:20:16 +01:00
amd_iommu.c x86_iommu: Move machine check to x86_iommu_realize() 2018-01-18 21:52:38 +02:00
amd_iommu.h amd_iommu: avoid needless includes in header file 2017-12-18 17:07:02 +03:00
intel_iommu.c intel-iommu: Accept 64-bit writes to FEADDR 2018-03-01 16:25:37 +02:00
intel_iommu_internal.h intel-iommu: Extend address width to 48 bits 2018-01-18 21:52:38 +02:00
kvmvapic.c mttcg/i386: Patch instruction using async_safe_* framework 2017-07-14 12:04:35 +02:00
Makefile.objs hw/i386: make IOMMUs configurable via default-configs/ 2018-03-12 16:12:46 +01:00
multiboot.c multiboot: Check validity of mh_header_addr 2018-03-21 15:13:25 +01:00
multiboot.h refer to FWCfgState explicitly 2013-06-02 18:14:02 +03:00
pc.c serial-isa: Use MAX_ISA_SERIAL_PORTS instead of MAX_SERIAL_PORTS 2018-04-26 13:57:00 +01:00
pc_piix.c hw: Do not include "sysemu/block-backend.h" if it is not necessary 2018-03-12 16:12:46 +01:00
pc_q35.c q35: change default NIC to e1000e 2018-03-12 16:12:45 +01:00
pc_sysfw.c target/i386: encrypt bios rom 2018-03-13 17:36:05 +01:00
trace-events hw/i386/vmport: replace fprintf() by trace events or LOG_UNIMP 2017-12-21 09:30:32 +01:00
vmmouse.c hw/input/i8042: Extract declarations from i386/pc.h into input/i8042.h 2018-03-12 16:12:48 +01:00
vmport.c hw/input/i8042: Extract declarations from i386/pc.h into input/i8042.h 2018-03-12 16:12:48 +01:00
x86-iommu.c x86_iommu: check if machine has PCI bus 2018-01-18 21:52:38 +02:00