From: Alexey Kardashevskiy <aik@ozlabs.ru>
To: qemu-devel@nongnu.org
Cc: Alexey Kardashevskiy <aik@ozlabs.ru>,
qemu-ppc@nongnu.org, Alexander Graf <agraf@suse.de>
Subject: [Qemu-devel] [PATCH 1/2] target-ppc: fix Authority Mask Register init value
Date: Mon, 6 Jan 2014 16:36:39 +1100 [thread overview]
Message-ID: <1388986600-26301-2-git-send-email-aik@ozlabs.ru> (raw)
In-Reply-To: <1388986600-26301-1-git-send-email-aik@ozlabs.ru>
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 <aik@ozlabs.ru>
---
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
next prev parent reply other threads:[~2014-01-06 5:37 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-06 5:36 [Qemu-devel] [PATCH 0/2] PPC: KVM: fix set_one_reg Alexey Kardashevskiy
2014-01-06 5:36 ` Alexey Kardashevskiy [this message]
2014-01-06 17:29 ` [Qemu-devel] [Qemu-ppc] [PATCH 1/2] target-ppc: fix Authority Mask Register init value Greg Kurz
2014-01-06 5:36 ` [Qemu-devel] [PATCH 2/2] PPC: KVM: fix "set one register" Alexey Kardashevskiy
2014-01-06 6:40 ` Alexey Kardashevskiy
2014-01-06 18:23 ` [Qemu-devel] [RFC] PPC: KVM: add support for LPCR Greg Kurz
2014-01-09 13:02 ` [Qemu-devel] [Qemu-ppc] " Alexander Graf
2014-01-06 17:30 ` [Qemu-devel] [Qemu-ppc] [PATCH 2/2] PPC: KVM: fix "set one register" Greg Kurz
2014-01-09 12:59 ` [Qemu-devel] [PATCH 0/2] PPC: KVM: fix set_one_reg Alexander Graf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1388986600-26301-2-git-send-email-aik@ozlabs.ru \
--to=aik@ozlabs.ru \
--cc=agraf@suse.de \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).