qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Jones <drjones@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH v2 3/3] target-arm: get_phys_addr_lpae: more xn control
Date: Wed, 11 Mar 2015 19:10:12 +0100	[thread overview]
Message-ID: <20150311181011.GB10903@hawk.usersys.redhat.com> (raw)
In-Reply-To: <CAFEAcA_Gpaf0sm1dhTu4wDiGd_g5TqoxOGNMukx5F1+XStytkw@mail.gmail.com>

On Wed, Mar 11, 2015 at 05:49:39PM +0000, Peter Maydell wrote:
> On 11 March 2015 at 17:42, Andrew Jones <drjones@redhat.com> wrote:
> > On Wed, Mar 11, 2015 at 05:02:00PM +0000, Peter Maydell wrote:
> 
> >> > +    if (is_aa64) {
> >> > +        switch (regime_el(env, mmu_idx)) {
> >> > +        case 1:
> >> > +            if (is_user && !user_rw) {
> >> > +                wxn = 0;
> >>
> >> I don't understand this. We ignore the WXN bit if this is
> >> a user access and the page is not readable ?
> >
> > Yup. If the page is not readable or writeable, AP[1]=0. I almost
> > submitted an errata to the ARM ARM when I saw this on the 2nd line
> > of table D4-32. I thought it must be a typo. However I tested it
> > on hardware, and it works this way. So at least the weirdness has
> > been implemented consistently...
> 
> Still confused. If the page isn't readable or writable
> then WXN isn't going to kick in anyway because WXN only
> affects writable pages. I don't see what the case is
> where this bit of code will make a difference.
>

Ah, that is true. Too bad I didn't read this before sending v3,
as I could have removed it, if you prefer. I had it here to
be explicit about the ignoring of wxn - matching the spec, but
you're right, it's useless code. Should I send a v4?

drew

  reply	other threads:[~2015-03-11 18:10 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-10 21:06 [Qemu-devel] [PATCH v2 0/3] tcg-arm: LPAE: fix and extend xn control Andrew Jones
2015-03-10 21:06 ` [Qemu-devel] [PATCH v2 1/3] target-arm: convert check_ap to ap_to_rw_prot Andrew Jones
2015-03-10 21:06 ` [Qemu-devel] [PATCH v2 2/3] target-arm: fix get_phys_addr_v6/SCTLR_AFE access check Andrew Jones
2015-03-11 16:55   ` Peter Maydell
2015-03-10 21:06 ` [Qemu-devel] [PATCH v2 3/3] target-arm: get_phys_addr_lpae: more xn control Andrew Jones
2015-03-11 17:02   ` Peter Maydell
2015-03-11 17:42     ` Andrew Jones
2015-03-11 17:49       ` Peter Maydell
2015-03-11 18:10         ` Andrew Jones [this message]
2015-03-11 18:15           ` Peter Maydell
2015-03-11 18:30             ` Andrew Jones
2015-03-11 18:36               ` 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=20150311181011.GB10903@hawk.usersys.redhat.com \
    --to=drjones@redhat.com \
    --cc=peter.maydell@linaro.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).