From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47516) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W02s3-0002hv-Tj for qemu-devel@nongnu.org; Mon, 06 Jan 2014 00:37:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W02ru-0003ag-Oo for qemu-devel@nongnu.org; Mon, 06 Jan 2014 00:37:03 -0500 Received: from e23smtp07.au.ibm.com ([202.81.31.140]:57072) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W02ru-0003a8-0T for qemu-devel@nongnu.org; Mon, 06 Jan 2014 00:36:54 -0500 Received: from /spool/local by e23smtp07.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 6 Jan 2014 15:36:51 +1000 From: Alexey Kardashevskiy Date: Mon, 6 Jan 2014 16:36:39 +1100 Message-Id: <1388986600-26301-2-git-send-email-aik@ozlabs.ru> In-Reply-To: <1388986600-26301-1-git-send-email-aik@ozlabs.ru> References: <1388986600-26301-1-git-send-email-aik@ozlabs.ru> Subject: [Qemu-devel] [PATCH 1/2] target-ppc: fix Authority Mask Register init value 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 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 --- 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, -- 1.8.4.rc4