]> git.proxmox.com Git - qemu.git/commitdiff
spapr: Add ibm, purr property on power7 and newer
authorAlexey Kardashevskiy <aik@ozlabs.ru>
Fri, 27 Sep 2013 08:11:51 +0000 (18:11 +1000)
committerAlexander Graf <agraf@suse.de>
Fri, 25 Oct 2013 21:25:46 +0000 (23:25 +0200)
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.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Alexander Graf <agraf@suse.de>
hw/ppc/spapr.c

index 6322c986c0f4805e59178ee116397327d6d1c9df..259df92092f47b13016228ce94f35204a925410e 100644 (file)
@@ -422,6 +422,10 @@ static void *spapr_create_fdt_skel(const char *cpu_model,
         _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))));