This is currently missing on both PowerNV and PAPR

FIXME: Split patch & fix tabs

Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org>
---
 hw/ppc/pnv.c                | 8 ++++++++
 target-ppc/translate_init.c | 1 +
 2 files changed, 9 insertions(+)

diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c
index 179f93b..1787dd1 100644
--- a/hw/ppc/pnv.c
+++ b/hw/ppc/pnv.c
@@ -275,6 +275,11 @@ static void powernv_create_cpu_node(void *fdt, CPUState 
*cs, int smt_threads)
     uint32_t page_sizes_prop[64];
     size_t page_sizes_prop_size;
     char *nodename;
+    const uint8_t pa_features[] = { 24, 0,
+                                    0xf6, 0x3f, 0xc7, 0xc0, 0x80, 0xf0,
+                                    0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
+                                    0x00, 0x00, 0x00, 0x00, 0x80, 0x00,
+                                    0x80, 0x00, 0x80, 0x00, 0x80, 0x00 };
 
     if ((index % smt_threads) != 0) {
         return;
@@ -349,6 +354,9 @@ static void powernv_create_cpu_node(void *fdt, CPUState 
*cs, int smt_threads)
                            page_sizes_prop, page_sizes_prop_size)));
     }
 
+    _FDT((fdt_property(fdt, "ibm,pa-features",
+                       pa_features, sizeof(pa_features))));
+
     /* XXX Just a hack for now */
     _FDT((fdt_property_cell(fdt, "ibm,chip-id", 0)));
 
diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c
index b623206..25f5b18 100644
--- a/target-ppc/translate_init.c
+++ b/target-ppc/translate_init.c
@@ -10028,6 +10028,7 @@ static void ppc_cpu_initfn(Object *obj)
             },
         };
         env->sps = (env->mmu_model & POWERPC_MMU_64K) ? defsps_64k : defsps_4k;
+       env->ci_large_pages = env->mmu_model >= POWERPC_MMU_2_06;
     }
 #endif /* defined(TARGET_PPC64) */
 
-- 
2.5.0


Reply via email to