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: Re: [Qemu-devel] [PATCH] target-ppc: disable unsupported modes for SPR_CTRL/SPR_UCTRL
Date: Fri, 10 Jan 2014 19:41:24 +1100 [thread overview]
Message-ID: <52CFB234.5090302@ozlabs.ru> (raw)
In-Reply-To: <1387766542-3184-1-git-send-email-aik@ozlabs.ru>
On 12/23/2013 01:42 PM, Alexey Kardashevskiy wrote:
> The Figure 17 "SPR encodings" of the PowerISA 2.07 describes CTRL SPR as:
>
> priviledged
> # spr5-9 spr0-4 name mtspr mfspr len cat
> 136 00100 01000 CTRL - no 32 S
> 152 00100 11000 CTRL yes - 32 S
>
> According to this chart, the hypervisor's CTRL (#152) does not support
> reading, the user-space's CTRL (UCTRL, #136) does not support writing.
>
> This replaces unsupported operations with the default SPR_NOACCESS hook.
>
> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
> ---
>
> While we are on this topic, I thought it makes sense to fix this too.
> This does not seem to affect anything in the current QEMU but it is more
> correct/clean.
Alex, ping.
Is it complicated or controversial patch? :)
>
>
> ---
> target-ppc/translate_init.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c
> index 93ad762..860e241 100644
> --- a/target-ppc/translate_init.c
> +++ b/target-ppc/translate_init.c
> @@ -6737,11 +6737,11 @@ static void init_proc_970FX (CPUPPCState *env)
> 0x00000000);
> spr_register(env, SPR_CTRL, "SPR_CTRL",
> SPR_NOACCESS, SPR_NOACCESS,
> - &spr_read_generic, &spr_write_generic,
> + SPR_NOACCESS, &spr_write_generic,
> 0x00000000);
> spr_register(env, SPR_UCTRL, "SPR_UCTRL",
> SPR_NOACCESS, SPR_NOACCESS,
> - &spr_read_generic, &spr_write_generic,
> + &spr_read_generic, SPR_NOACCESS,
> 0x00000000);
> spr_register(env, SPR_VRSAVE, "SPR_VRSAVE",
> &spr_read_generic, &spr_write_generic,
> @@ -6902,11 +6902,11 @@ static void init_proc_power5plus(CPUPPCState *env)
> 0x00000000);
> spr_register(env, SPR_CTRL, "SPR_CTRL",
> SPR_NOACCESS, SPR_NOACCESS,
> - &spr_read_generic, &spr_write_generic,
> + SPR_NOACCESS, &spr_write_generic,
> 0x00000000);
> spr_register(env, SPR_UCTRL, "SPR_UCTRL",
> SPR_NOACCESS, SPR_NOACCESS,
> - &spr_read_generic, &spr_write_generic,
> + &spr_read_generic, SPR_NOACCESS,
> 0x00000000);
> spr_register(env, SPR_VRSAVE, "SPR_VRSAVE",
> &spr_read_generic, &spr_write_generic,
> @@ -7002,11 +7002,11 @@ static void init_proc_POWER7 (CPUPPCState *env)
> /* XXX : not implemented */
> spr_register(env, SPR_CTRL, "SPR_CTRLT",
> SPR_NOACCESS, SPR_NOACCESS,
> - &spr_read_generic, &spr_write_generic,
> + SPR_NOACCESS, &spr_write_generic,
> 0x80800000);
> spr_register(env, SPR_UCTRL, "SPR_CTRLF",
> SPR_NOACCESS, SPR_NOACCESS,
> - &spr_read_generic, &spr_write_generic,
> + &spr_read_generic, SPR_NOACCESS,
> 0x80800000);
> spr_register(env, SPR_VRSAVE, "SPR_VRSAVE",
> &spr_read_generic, &spr_write_generic,
>
--
Alexey
next prev parent reply other threads:[~2014-01-10 8:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-23 2:42 [Qemu-devel] [PATCH] target-ppc: disable unsupported modes for SPR_CTRL/SPR_UCTRL Alexey Kardashevskiy
2014-01-10 8:41 ` Alexey Kardashevskiy [this message]
2014-01-20 15:08 ` 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=52CFB234.5090302@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).