qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Desnogues <laurent.desnogues@gmail.com>
To: Riku Voipio <riku.voipio@iki.fi>
Cc: Riku Voipio <riku.voipio@nokia.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 5/5] target-arm: Thread ID Registers are ARMv6K +
Date: Tue, 26 Jan 2010 17:28:57 +0100	[thread overview]
Message-ID: <761ea48b1001260828p2547c20egeca08eebd99e5ea4@mail.gmail.com> (raw)
In-Reply-To: <1264521604-2020-6-git-send-email-riku.voipio@iki.fi>

On Tue, Jan 26, 2010 at 5:00 PM, Riku Voipio <riku.voipio@iki.fi> wrote:
> From: Riku Voipio <riku.voipio@nokia.com>
>
> Change the system-emulation code also to only support accessing
> the cp15.c13 Thread ID registers on ARMv6K and newer.
>
> Signed-off-by: Riku Voipio <riku.voipio@nokia.com>
> ---
>  target-arm/helper.c |   12 ++++++++++++
>  1 files changed, 12 insertions(+), 0 deletions(-)
>
> diff --git a/target-arm/helper.c b/target-arm/helper.c
> index 68578ce..1245d9d 100644
> --- a/target-arm/helper.c
> +++ b/target-arm/helper.c
> @@ -1517,12 +1517,18 @@ void HELPER(set_cp15)(CPUState *env, uint32_t insn, uint32_t val)
>             env->cp15.c13_context = val;
>             break;
>         case 2:
> +            if (!arm_feature(env, ARM_FEATURE_V6K))
> +                goto bad_reg;
>             env->cp15.c13_tls1 = val;
>             break;
>         case 3:
> +            if (!arm_feature(env, ARM_FEATURE_V6K))
> +                goto bad_reg;
>             env->cp15.c13_tls2 = val;
>             break;
>         case 4:
> +            if (!arm_feature(env, ARM_FEATURE_V6K))
> +                goto bad_reg;
>             env->cp15.c13_tls3 = val;
>             break;
>         default:
> @@ -1805,10 +1811,16 @@ uint32_t HELPER(get_cp15)(CPUState *env, uint32_t insn)
>         case 1:
>             return env->cp15.c13_context;
>         case 2:
> +            if (!arm_feature(env, ARM_FEATURE_V6K))
> +                goto bad_reg;
>             return env->cp15.c13_tls1;
>         case 3:
> +            if (!arm_feature(env, ARM_FEATURE_V6K))
> +                goto bad_reg;
>             return env->cp15.c13_tls2;
>         case 4:
> +            if (!arm_feature(env, ARM_FEATURE_V6K))
> +                goto bad_reg;
>             return env->cp15.c13_tls3;
>         default:
>             goto bad_reg;

Same question as for user mode :-)


Laurent

      reply	other threads:[~2010-01-26 16:29 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-26 15:59 [Qemu-devel] [PATCH 0/5] linux-user for-usptream patches Riku Voipio
2010-01-26 16:00 ` [Qemu-devel] [PATCH 1/5] linux-user: adapt uname machine to emulated CPU Riku Voipio
2010-01-26 16:00 ` [Qemu-devel] [PATCH 2/5] fix locking error with current_tb Riku Voipio
2010-01-26 16:00 ` [Qemu-devel] [PATCH 3/5] linux-user: remove signal handler before calling abort() Riku Voipio
2010-01-26 16:00 ` [Qemu-devel] [PATCH 4/5] linux-user: Add access to TLS registers Riku Voipio
2010-01-26 16:27   ` Laurent Desnogues
2010-01-26 20:00     ` Riku Voipio
2010-01-26 16:00 ` [Qemu-devel] [PATCH 5/5] target-arm: Thread ID Registers are ARMv6K + Riku Voipio
2010-01-26 16:28   ` Laurent Desnogues [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=761ea48b1001260828p2547c20egeca08eebd99e5ea4@mail.gmail.com \
    --to=laurent.desnogues@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=riku.voipio@iki.fi \
    --cc=riku.voipio@nokia.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).