From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45079) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1afYrk-0003jr-6r for qemu-devel@nongnu.org; Mon, 14 Mar 2016 16:13:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1afYrg-00017X-7W for qemu-devel@nongnu.org; Mon, 14 Mar 2016 16:13:24 -0400 References: <1457974600-13828-1-git-send-email-clg@fr.ibm.com> <1457974600-13828-12-git-send-email-clg@fr.ibm.com> From: Thomas Huth Message-ID: <56E71B5C.3090603@redhat.com> Date: Mon, 14 Mar 2016 21:13:16 +0100 MIME-Version: 1.0 In-Reply-To: <1457974600-13828-12-git-send-email-clg@fr.ibm.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 11/17] ppc: Initialize AMOR in PAPR mode List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?Q?C=c3=a9dric_Le_Goater?= , David Gibson Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org On 14.03.2016 17:56, C=C3=A9dric Le Goater wrote: > From: Benjamin Herrenschmidt >=20 > Make sure we give the guest full authorization >=20 > Signed-off-by: Benjamin Herrenschmidt > --- > target-ppc/translate_init.c | 4 ++++ > 1 file changed, 4 insertions(+) >=20 > diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c > index 68abd847a251..c921d9f53984 100644 > --- a/target-ppc/translate_init.c > +++ b/target-ppc/translate_init.c > @@ -8542,6 +8542,7 @@ void cpu_ppc_set_papr(PowerPCCPU *cpu) > { > CPUPPCState *env =3D &cpu->env; > ppc_spr_t *lpcr =3D &env->spr_cb[SPR_LPCR]; > + ppc_spr_t *amor =3D &env->spr_cb[SPR_AMOR]; > =20 > /* PAPR always has exception vectors in RAM not ROM. To ensure thi= s, > * MSR[IP] should never be set. > @@ -8563,6 +8564,9 @@ void cpu_ppc_set_papr(PowerPCCPU *cpu) > */ > env->spr[SPR_LPCR] =3D lpcr->default_value; > =20 > + /* Set a full AMOR so guest can use the AMR as it sees fit */ > + env->spr[SPR_AMOR] =3D amor->default_value =3D 0xffffffffffffffffu= ll; > + > /* Tell KVM that we're in PAPR mode */ > if (kvm_enabled()) { > kvmppc_set_papr(cpu); >=20 Reviewed-by: Thomas Huth