From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45834) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W0E0B-0007Mp-U5 for qemu-devel@nongnu.org; Mon, 06 Jan 2014 12:30:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W0E02-0003D1-0v for qemu-devel@nongnu.org; Mon, 06 Jan 2014 12:30:11 -0500 Received: from e06smtp11.uk.ibm.com ([195.75.94.107]:33425) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W0E01-0003CK-PB for qemu-devel@nongnu.org; Mon, 06 Jan 2014 12:30:01 -0500 Received: from /spool/local by e06smtp11.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 6 Jan 2014 17:29:58 -0000 Date: Mon, 6 Jan 2014 18:29:51 +0100 From: Greg Kurz Message-ID: <20140106182951.188820cc@bahia.local> In-Reply-To: <1388986600-26301-2-git-send-email-aik@ozlabs.ru> References: <1388986600-26301-1-git-send-email-aik@ozlabs.ru> <1388986600-26301-2-git-send-email-aik@ozlabs.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [Qemu-ppc] [PATCH 1/2] target-ppc: fix Authority Mask Register init value List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexey Kardashevskiy Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org On Mon, 6 Jan 2014 16:36:39 +1100 Alexey Kardashevskiy wrote: > The existing default value (-1) of the AMR register forbids data access > to all 32 classes. Since the guest linux does not change this register, > we end up with the guest hanging right after switching from the real to > protected mode. > > This sets the default AMR value to zero what enables data access for all > classes. > > The only reason for not hitting this bug before is that > kvm_arch_put_registers() did not put any SPR to KVM due to missing > assignment of @one_reg_id in _spr_register() (which is going to be fixed > by a separate patch). > > Signed-off-by: Alexey Kardashevskiy Reviewed-by: Greg Kurz > --- > target-ppc/translate_init.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c > index 93ad762..144de3d 100644 > --- a/target-ppc/translate_init.c > +++ b/target-ppc/translate_init.c > @@ -1064,7 +1064,7 @@ static void gen_spr_amr (CPUPPCState *env) > spr_register_kvm(env, SPR_AMR, "AMR", > SPR_NOACCESS, SPR_NOACCESS, > &spr_read_generic, &spr_write_generic, > - KVM_REG_PPC_AMR, 0xffffffffffffffffULL); > + KVM_REG_PPC_AMR, 0); > spr_register_kvm(env, SPR_UAMOR, "UAMOR", > SPR_NOACCESS, SPR_NOACCESS, > &spr_read_generic, &spr_write_generic, -- Gregory Kurz kurzgreg@fr.ibm.com gkurz@linux.vnet.ibm.com Software Engineer @ IBM/Meiosys http://www.ibm.com Tel +33 (0)562 165 496 "Anarchy is about taking complete responsibility for yourself." Alan Moore.