Received: from eggs.gnu.org ([2001:4830:134:3::10]:37424) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aiwuM-0002IN-Kt for qemu-devel@nongnu.org; Thu, 24 Mar 2016 00:30:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aiwuD-00071y-Ns for qemu-devel@nongnu.org; Thu, 24 Mar 2016 00:30:06 -0400 From: David Gibson Date: Thu, 24 Mar 2016 15:30:50 +1100 Message-Id: <1458793858-4010-9-git-send-email-david@gibson.dropbear.id.au> In-Reply-To: <1458793858-4010-1-git-send-email-david@gibson.dropbear.id.au> References: <1458793858-4010-1-git-send-email-david@gibson.dropbear.id.au> Subject: [Qemu-devel] [PULL 08/16] ppc: Initialize AMOR in PAPR mode List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: peter.maydell@linaro.org Cc: thuth@redhat.com, agraf@suse.de, qemu-devel@nongnu.org, clg@fr.ibm.com, qemu-ppc@nongnu.org, David Gibson From: Benjamin Herrenschmidt Make sure we give the guest full authorization Signed-off-by: Benjamin Herrenschmidt Reviewed-by: Thomas Huth Reviewed-by: David Gibson Signed-off-by: David Gibson --- target-ppc/translate_init.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c index 3a13ad7..5125743 100644 --- a/target-ppc/translate_init.c +++ b/target-ppc/translate_init.c @@ -8398,6 +8398,7 @@ POWERPC_FAMILY(POWER8)(ObjectClass *oc, void *data) void cpu_ppc_set_papr(PowerPCCPU *cpu) { CPUPPCState *env = &cpu->env; + ppc_spr_t *amor = &env->spr_cb[SPR_AMOR]; /* PAPR always has exception vectors in RAM not ROM. To ensure this, * MSR[IP] should never be set. @@ -8406,6 +8407,9 @@ void cpu_ppc_set_papr(PowerPCCPU *cpu) */ env->msr_mask &= ~((1ull << MSR_EP) | MSR_HVB); + /* Set a full AMOR so guest can use the AMR as it sees fit */ + env->spr[SPR_AMOR] = amor->default_value = 0xffffffffffffffffull; + /* Tell KVM that we're in PAPR mode */ if (kvm_enabled()) { kvmppc_set_papr(cpu); -- 2.5.5