Skip to contentSkip to conversation

spapr: Add ibm, purr property on power7 and newer

PATCH Applied Alexey Kardashevskiy 2 participants 2 messages Sep 27, 2013 – Sep 30, 2013

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 spapr: Add ibm, purr property on power7 and newer

PAPR+ says that no "ibm,purr" tells the guest that H_PURR is not supported. However some guests still try calling H_PURR on POWER7 unless the property is present and equal to 0. This adds the property for CPUs supporting the PURR special register.

---
Changes:
v2:
* the property is set now if PURR register is supported by QEMU (at the moment it is POWER7, POWER7+, POWER8)

---
 hw/ppc/spapr.c | 4 ++++
 1 file changed, 4 insertions(+)
hw/ppc/spapr.c +4 -0
index bca91d9..07ff4cf 100644
@@ -485,6 +485,10 @@ static void *spapr_create_fdt_skel(hwaddr initrd_base,
         _FDT((fdt_property(fdt, "ibm,ppc-interrupt-gserver#s",
                            gservers_prop, sizeof(gservers_prop))));
 
+        if (env->spr_cb[SPR_PURR].oea_read) {
+            _FDT((fdt_property(fdt, "ibm,purr", NULL, 0)));
+        }
+
         if (env->mmu_model & POWERPC_MMU_1TSEG) {
             _FDT((fdt_property(fdt, "ibm,processor-segment-sizes",
                                segs, sizeof(segs))));
Signature · 1 line
1.8.4.rc4