Received: from eggs.gnu.org ([2001:4830:134:3::10]:45503) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ahzKf-00047A-Ge for qemu-devel@nongnu.org; Mon, 21 Mar 2016 08:53:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ahzKc-000788-9h for qemu-devel@nongnu.org; Mon, 21 Mar 2016 08:53:17 -0400 Received: from e06smtp10.uk.ibm.com ([195.75.94.106]:52376) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ahzKb-00077d-W8 for qemu-devel@nongnu.org; Mon, 21 Mar 2016 08:53:14 -0400 Received: from localhost by e06smtp10.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 21 Mar 2016 12:53:13 -0000 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Date: Mon, 21 Mar 2016 13:52:36 +0100 Message-Id: <1458564760-31993-7-git-send-email-clg@fr.ibm.com> In-Reply-To: <1458564760-31993-1-git-send-email-clg@fr.ibm.com> References: <1458564760-31993-1-git-send-email-clg@fr.ibm.com> Subject: [Qemu-devel] [PATCH v3 06/10] ppc: Initialize AMOR in PAPR mode List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: David Gibson Cc: Thomas Huth , Cedric Le Goater , qemu-ppc@nongnu.org, qemu-devel@nongnu.org From: Benjamin Herrenschmidt Make sure we give the guest full authorization Signed-off-by: Benjamin Herrenschmidt Reviewed-by: Thomas Huth Reviewed-by: David Gibson --- target-ppc/translate_init.c | 4 ++++ 1 file changed, 4 insertions(+) Index: qemu-dgibson-for-2.6.git/target-ppc/translate_init.c =================================================================== --- qemu-dgibson-for-2.6.git.orig/target-ppc/translate_init.c +++ qemu-dgibson-for-2.6.git/target-ppc/translate_init.c @@ -8398,6 +8398,7 @@ POWERPC_FAMILY(POWER8)(ObjectClass *oc, 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);