From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36862) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VPTJy-0007Ex-8R for qemu-devel@nongnu.org; Fri, 27 Sep 2013 04:22:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VPTJq-0005us-4i for qemu-devel@nongnu.org; Fri, 27 Sep 2013 04:22:42 -0400 Received: from e23smtp06.au.ibm.com ([202.81.31.148]:36796) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VPTJp-0005u6-IJ for qemu-devel@nongnu.org; Fri, 27 Sep 2013 04:22:34 -0400 Received: from /spool/local by e23smtp06.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 27 Sep 2013 18:11:56 +1000 From: Alexey Kardashevskiy Date: Fri, 27 Sep 2013 18:11:51 +1000 Message-Id: <1380269511-18657-1-git-send-email-aik@ozlabs.ru> Subject: [Qemu-devel] [PATCH v2] spapr: Add ibm, purr property on power7 and newer List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Alexey Kardashevskiy , qemu-ppc@nongnu.org, Alexander Graf 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 Signed-off-by: Alexey Kardashevskiy --- 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(+) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index bca91d9..07ff4cf 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -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)))); -- 1.8.4.rc4