From: Alexander Graf <agraf@suse.de>
To: Michael Walle <michael@walle.cc>, Riku Voipio <riku.voipio@iki.fi>
Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] linux-user: ppc64: set MSR_CM bit for BookE 2.06 MMU
Date: Fri, 22 Jul 2016 17:57:04 +0200 [thread overview]
Message-ID: <57924250.5020205@suse.de> (raw)
In-Reply-To: <1469200685-13695-1-git-send-email-michael@walle.cc>
On 07/22/2016 05:18 PM, Michael Walle wrote:
> 64 bit user mode doesn't work for the e5500 core because the MSR_CM bit is
> not set which enables the 64 bit mode for this MMU model. Memory addresses
> are truncated to 32 bit, which results in "Invalid data memory access"
> error messages. Fix it by setting the MSR_CM bit for this MMU model.
>
> Signed-off-by: Michael Walle <michael@walle.cc>
Yup, I guess that's about as smart as we have to be :).
Reviewed-by: Alexander Graf <agraf@suse.de>
Alex
> ---
>
> This is a kind of a v2 patch. The did the fix in the wrong place:
> http://lists.nongnu.org/archive/html/qemu-devel/2016-07/msg05409.html
>
> linux-user/main.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/linux-user/main.c b/linux-user/main.c
> index 462e820..bac2cb0 100644
> --- a/linux-user/main.c
> +++ b/linux-user/main.c
> @@ -4626,10 +4626,11 @@ int main(int argc, char **argv, char **envp)
> int i;
>
> #if defined(TARGET_PPC64)
> + int flag = (env->insns_flags2 & PPC2_BOOKE206) ? MSR_CM : MSR_SF;
> #if defined(TARGET_ABI32)
> - env->msr &= ~((target_ulong)1 << MSR_SF);
> + env->msr &= ~((target_ulong)1 << flag);
> #else
> - env->msr |= (target_ulong)1 << MSR_SF;
> + env->msr |= (target_ulong)1 << flag;
> #endif
> #endif
> env->nip = regs->nip;
next prev parent reply other threads:[~2016-07-22 15:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-22 15:18 [Qemu-devel] [PATCH] linux-user: ppc64: set MSR_CM bit for BookE 2.06 MMU Michael Walle
2016-07-22 15:57 ` Alexander Graf [this message]
2016-08-16 13:32 ` Michael Walle
2016-08-16 13:41 ` Riku Voipio
2016-08-16 13:56 ` Michael Walle
2016-09-21 10:59 ` Michael Walle
2016-09-21 18:41 ` Riku Voipio
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=57924250.5020205@suse.de \
--to=agraf@suse.de \
--cc=michael@walle.cc \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=riku.voipio@iki.fi \
/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).