qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paul Mundt <lethal@linux-sh.org>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] SH4: Privilege check for instructions
Date: Wed, 17 Sep 2008 23:42:42 +0900	[thread overview]
Message-ID: <20080917144242.GA30834@linux-sh.org> (raw)
In-Reply-To: <48CFE26E.80302@juno.dti.ne.jp>

On Wed, Sep 17, 2008 at 01:44:30AM +0900, Shin-ichiro KAWASAKI wrote:
> By the way, special load instructions for SR ('ldc  Rm,SR' and 'ldc  
> @Rm+,SR'),
> can change supervisor/user bits.  Though I guess SH-Linux does not use it to
> modify supervisor/user bits, it might be a problem for other OSes.
> 
Correct. The supervisor bit is set primarily on the initial SR setup and
largely ignored after that. Other things, like SR_FD, are modified very
regularly. We also see similar behaviour on parts with the SR_DSP bit,
which has roughly the same semantics.

> Similar problems happen for status of floating point unit.  The instructions
> 'lds Rm,FPSCR', 'lds @Rm+,FPSCR', 'frchg', and 'fschg', might change the
> status, and confuse the translated codes.  I guess this will happen so often
> on SH-Linux.
> 
Those FPU instructions are used primarily in save/restore paths of FPU
state in the lazy context switching code. In order to test this, you need
multiple processes that are using the FPU. If you permit the compiler to
emit floating point instructions, this will include basically every
process in the system, so it becomes a very frequent thing.

      parent reply	other threads:[~2008-09-17 14:43 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-14  4:04 [Qemu-devel] [PATCH] SH4: Privilege check for instructions Shin-ichiro KAWASAKI
2008-09-14  6:34 ` Blue Swirl
2008-09-14 10:27   ` Shin-ichiro KAWASAKI
2008-09-14 11:26     ` Blue Swirl
2008-09-15  1:38       ` Shin-ichiro KAWASAKI
2008-09-15  8:49         ` Aurelien Jarno
2008-09-15 15:19         ` Blue Swirl
2008-09-16 16:44           ` Shin-ichiro KAWASAKI
2008-09-16 18:19             ` Blue Swirl
2008-09-17  1:20               ` Shin-ichiro KAWASAKI
2008-09-17 14:42             ` Paul Mundt [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=20080917144242.GA30834@linux-sh.org \
    --to=lethal@linux-sh.org \
    --cc=qemu-devel@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).