qemu-e2k/hw/ppc
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
..
e500-ccsr.h
e500.c ppc: e500: switch E500 based machines to full machine definition 2018-04-27 18:05:23 +10:00
e500.h ppc: e500: switch E500 based machines to full machine definition 2018-04-27 18:05:23 +10:00
e500plat.c ppc: e500: switch E500 based machines to full machine definition 2018-04-27 18:05:23 +10:00
fdt.c target/ppc: Split page size information into a separate allocation 2018-04-27 18:05:22 +10:00
mac_newworld.c mac_newworld: move wiring of macio IRQs to macio_newworld_realize() 2018-05-04 15:00:37 +10:00
mac_oldworld.c mac_oldworld: move wiring of macio IRQs to macio_oldworld_realize() 2018-04-27 18:05:22 +10:00
mac.h mac_newworld: remove pics IRQ array and wire up macio to OpenPIC directly 2018-05-04 15:00:37 +10:00
Makefile.objs
mpc8544_guts.c
mpc8544ds.c ppc: e500: switch E500 based machines to full machine definition 2018-04-27 18:05:23 +10:00
pnv_bmc.c
pnv_core.c
pnv_lpc.c
pnv_occ.c
pnv_psi.c
pnv_xscom.c
pnv.c target/ppc: Fold slb_nr into PPCHash64Options 2018-04-27 18:05:22 +10:00
ppc4xx_devs.c
ppc4xx_pci.c
ppc405_boards.c
ppc405_uc.c Change references to serial_hds[] to serial_hd() 2018-04-26 13:57:00 +01:00
ppc405.h
ppc440_bamboo.c Change references to serial_hds[] to serial_hd() 2018-04-26 13:57:00 +01:00
ppc440_pcix.c
ppc440_uc.c sam460ex: Fix timer frequency and clock multipliers 2018-04-10 10:05:38 +10:00
ppc440.h
ppc_booke.c
ppc.c
ppce500_spin.c
prep_systemio.c
prep.c
rs6000_mc.c
sam460ex.c Change references to serial_hds[] to serial_hd() 2018-04-26 13:57:00 +01:00
spapr_caps.c
spapr_cpu_core.c spapr: Clean up handling of LPCR power-saving exit bits 2018-05-04 15:00:37 +10:00
spapr_drc.c qobject: Replace qobject_incref/QINCREF qobject_decref/QDECREF 2018-05-04 08:27:53 +02:00
spapr_events.c
spapr_hcall.c pc-dimm: factor out MemoryDevice interface 2018-05-07 10:00:02 -03:00
spapr_iommu.c
spapr_ovec.c
spapr_pci_vfio.c
spapr_pci.c
spapr_rng.c
spapr_rtas_ddw.c
spapr_rtas.c spapr: Clean up handling of LPCR power-saving exit bits 2018-05-04 15:00:37 +10:00
spapr_rtc.c
spapr_vio.c
spapr.c pc-dimm: factor out MemoryDevice interface 2018-05-07 10:00:02 -03:00
trace-events uninorth: create new uninorth device 2018-05-04 15:00:37 +10:00
virtex_ml507.c Change references to serial_hds[] to serial_hd() 2018-04-26 13:57:00 +01:00