qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Jamie Iles <jamie@jamieiles.com>
Cc: Jamie Iles <jamie.iles@picochip.com>,
	qemu-devel@nongnu.org, Aurelien Jarno <aurelien@aurel32.net>,
	Paul Brook <paul@codesourcery.com>
Subject: Re: [Qemu-devel] [PATCH] target-arm: support for ARM1176JZ-s cores
Date: Wed, 22 Jun 2011 10:40:12 +0100	[thread overview]
Message-ID: <BANLkTik46ssNvydUkhA3VNJQhTuFrh+MUg@mail.gmail.com> (raw)
In-Reply-To: <BANLkTik5ys3y4NUO3OJ7SCunrCEa_X1kpw@mail.gmail.com>

On 22 June 2011 00:42, Jamie Iles <jamie@jamieiles.com> wrote:
> On 21 June 2011 23:13, Peter Maydell <peter.maydell@linaro.org> wrote:
>> Ah yes, sorry, I misread the TRM there. So it does have those, it's
>> just the SEV/WFI/WFE it is missing. I guess we'll want an
>> ARM_FEATURE_VAPA too.
>
> Could we perhaps infer and detect some of these features?  For example,
> my reading of the ARM ARM says that the VA<->PA translation registers
> exist for >v7 or v6k if the security extensions exist.  We can detect
> the security extensions from the cpuid registers so we could
> automatically set that feature.

I thought about that, but there are a couple of reasons I'd rather
not detect things from the cpuid/feature registers:
 * older cores don't have them, so you need to cope without them anyway
 * there's a tension between "emulate the same feature regs as the
   h/w" and "emulate feature regs matching what we implement" -- some
   guest OSes will actually refuse to boot unless they get exact matches
   on the feature reg values...
   (At the moment we tend to the former, so we probably advertise the
   security extensions even though we don't implement them, for instance)
 * at the moment the feature regs are just random hex values in helper.c;
   if we wanted to drive things from them we'd need to set up a lot of
   enumerations and constants anyway in order to have something maintainable

Inferring ARM_FEATURE_foo flags from other ARM_FEATURE_foo flags is fine,
though.

Mostly what I'd like is for the actual code implementing things to
be gated on a fairly fine-grained set of flags, so that we can confine
the "what does this core have? what things imply what other things?"
code to a single place where it's easy to tweak if we get it wrong.

-- PMM

  reply	other threads:[~2011-06-22  9:40 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-21 12:55 [Qemu-devel] [PATCH] target-arm: support for ARM1176JZ-s cores Jamie Iles
2011-06-21 15:43 ` Peter Maydell
2011-06-21 16:13   ` Jamie Iles
2011-06-21 22:13     ` Peter Maydell
2011-06-21 23:42       ` Jamie Iles
2011-06-22  9:40         ` Peter Maydell [this message]
2011-06-22 15:45           ` Jamie Iles
2011-06-22 16:01             ` Peter Maydell
2011-06-22 16:16               ` Jamie Iles
2011-06-22 16:26                 ` Peter Maydell

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=BANLkTik46ssNvydUkhA3VNJQhTuFrh+MUg@mail.gmail.com \
    --to=peter.maydell@linaro.org \
    --cc=aurelien@aurel32.net \
    --cc=jamie.iles@picochip.com \
    --cc=jamie@jamieiles.com \
    --cc=paul@codesourcery.com \
    --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).