spapr: Support ibm, dynamic-memory-v2 property
RFC PATCH 1/1 spapr: Support ibm, dynamic-memory-v2 property
The new property ibm,dynamic-memory-v2 allows memory to be represented in a more compact manner in device tree.
Signed-off-by Bharata B Rao <[email protected]>
---
v0: http://lists.gnu.org/archive/html/qemu-ppc/2018-02/msg00236.html
Changes in v1:
- Rebased on top of Haozhong Zhang's qmp_pc_dimm_device_list refactor patch.
(http://lists.gnu.org/archive/html/qemu-devel/2018-03/msg00978.html)
docs/specs/ppc-spapr-hotplug.txt | 19 +++ hw/ppc/spapr.c | 256 ++++++++++++++++++++++++++++++++------- include/hw/ppc/spapr.h | 1 + include/hw/ppc/spapr_ovec.h | 1 + 4 files changed, 233 insertions(+), 44 deletions(-)
docs/specs/ppc-spapr-hotplug.txt +19 -0
@@ -387,4 +387,23 @@ Each LMB list entry consists of the following elements: - A 32bit flags word. The bit at bit position 0x00000008 defines whether the LMB is assigned to the the partition as of boot time. +ibm,dynamic-memory-v2 + +This property describes the dynamically reconfigurable memory. This is +an alternate and newer way to describe dyanamically reconfigurable memory. +It is a property encoded array that has an integer N (the number of +LMB set entries) followed by N LMB set entries. There is an LMB set entry +for each sequential group of LMBs that share common attributes. + +Each LMB set entry consists of the following elements: + +- Number of sequential LMBs in the entry represented by a 32bit integer. +- Logical address of the first LMB in the set encoded as a 64bit integer. +- DRC index of the first LMB in the set. +- Associativity list index that is used as an index into + ibm,associativity-lookup-arrays property described earlier. This + is used to retrieve the right associativity list to be used for all + the LMBs in this set. +- A 32bit flags word that applies to all the LMBs in the set. + [1] http://thread.gmane.org/gmane.linux.ports.ppc.embedded/75350/focus=106867
hw/ppc/spapr.c +212 -44
320 lines not on this page · raw message
include/hw/ppc/spapr.h +1 -0
@@ -149,6 +149,7 @@ struct sPAPRMachineState {sPAPROptionVector *ov5;/* QEMU-supported option vectors */ sPAPROptionVector *ov5_cas;/* negotiated (via CAS) option vectors */ uint32_t max_compat_pvr; +bool use_ibm_dynamic_memory_v2;/* Migration state */ int htab_save_index;
include/hw/ppc/spapr_ovec.h +1 -0
@@ -51,6 +51,7 @@ typedef struct sPAPROptionVector sPAPROptionVector;#define OV5_FORM1_AFFINITY OV_BIT(5, 0)#define OV5_HP_EVT OV_BIT(6, 5)#define OV5_HPT_RESIZE OV_BIT(6, 7) +#define OV5_DRMEM_V2 OV_BIT(22, 0)#define OV5_XIVE_BOTH OV_BIT(23, 0)#define OV5_XIVE_EXPLOIT OV_BIT(23, 1)/* 1=exploitation 0=legacy */
Signature · 1 line
2.14.3