From: Leon Alrae <leon.alrae@imgtec.com>
To: Yongbok Kim <yongbok.kim@imgtec.com>, qemu-devel@nongnu.org
Cc: aurelien@aurel32.net
Subject: Re: [Qemu-devel] [PATCH] target-mips: fix updating XContext on mmu exception
Date: Tue, 6 Oct 2015 14:10:14 +0100 [thread overview]
Message-ID: <5613C836.3070107@imgtec.com> (raw)
In-Reply-To: <1443800041-57659-1-git-send-email-yongbok.kim@imgtec.com>
On 02/10/15 16:34, Yongbok Kim wrote:
> Correct updating XContext.Region field on mmu exceptions.
> If Config3.CTXTC = 0 then the R filed of XContext has to be updated
s/filed/field
> with the value of bits 63..62 of the virtual address upon a TLB
> exception.
>
> Signed-off-by: Yongbok Kim <yongbok.kim@imgtec.com>
> ---
> target-mips/helper.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/target-mips/helper.c b/target-mips/helper.c
> index 01c4461..8ffc990 100644
> --- a/target-mips/helper.c
> +++ b/target-mips/helper.c
> @@ -294,7 +294,7 @@ static void raise_mmu_exception(CPUMIPSState *env, target_ulong address,
> #if defined(TARGET_MIPS64)
> env->CP0_EntryHi &= env->SEGMask;
> env->CP0_XContext = (env->CP0_XContext & ((~0ULL) << (env->SEGBITS - 7))) |
> - ((address & 0xC00000000000ULL) >> (55 - env->SEGBITS)) |
> + (((address >> 62) & 0x3) << (env->SEGBITS - 9)) |
Did you consider using extract64?
> ((address & ((1ULL << env->SEGBITS) - 1) & 0xFFFFFFFFFFFFE000ULL) >> 9);
Care to fix this >80 chars line while you are on this? :)
Thanks,
Leon
> #endif
> cs->exception_index = exception;
>
prev parent reply other threads:[~2015-10-06 13:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-02 15:34 [Qemu-devel] [PATCH] target-mips: fix updating XContext on mmu exception Yongbok Kim
2015-10-06 13:10 ` Leon Alrae [this message]
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=5613C836.3070107@imgtec.com \
--to=leon.alrae@imgtec.com \
--cc=aurelien@aurel32.net \
--cc=qemu-devel@nongnu.org \
--cc=yongbok.kim@imgtec.com \
/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).