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 5/5] target-arm: apply get_S1prot to get_phys_addr_v6
Date: Tue, 10 Mar 2015 17:54:11 +0100 [thread overview]
Message-ID: <20150310165410.GD6320@hawk.usersys.redhat.com> (raw)
In-Reply-To: <CAFEAcA8DOdhL8qYfzd8uu2zvMK=BGrGBK=ns7XiRmi0kBMuQZg@mail.gmail.com>
On Tue, Mar 10, 2015 at 03:57:27PM +0000, Peter Maydell wrote:
> On 12 February 2015 at 17:08, Andrew Jones <drjones@redhat.com> wrote:
> > On Thu, Feb 12, 2015 at 04:05:07PM +0100, Andrew Jones wrote:
> >> Now that we have get_S1prot, we can apply it to get_phys_addr_v6
> >> for a minor code cleanup.
>
> I think this is a bad idea -- better to keep the long
> and short descriptor code paths separate. It's too easy
> to get confused otherwise.
I don't mind keeping them separate, but I disagree with it being
confusing keeping them together :-)
>
> > Actually, I should point out that this isn't just a cleanup, but
> > also a fix. See below.
>
> > The original code didn't take into account that it may be calling check_ap
> > with a simple AP, AP[2:1].
>
> No, because check_ap() always takes AP[2:0]...
No, it's really wrong. It's not the 2 vs. 3 bit issue that's the
problem, it's the cases. You snipped most of my reply to myself.
This part is pertinent
> As a simple AP wouldn't be properly translated to protection flags with
> check_ap (except for case 6), then I think this should have caused some
> problems. Maybe this path just hasn't been tested? I don't see CR_AFE
> getting used by Linux, so possibly not.
So, yes, a simple (3-bit) ap would be handled by the 8-case switch with
cases 0, 2, 4, and 6, but only case 6 would give the correct result.
Thanks for the review.
drew
next prev parent reply other threads:[~2015-03-10 16:54 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-12 15:05 [Qemu-devel] [PATCH 0/5] tcg-arm: LPAE: fix and extend xn control Andrew Jones
2015-02-12 15:05 ` [Qemu-devel] [PATCH 1/5] target-arm: convert check_ap to get_rw_prot Andrew Jones
2015-03-10 15:07 ` Peter Maydell
2015-03-10 15:17 ` Peter Maydell
2015-03-10 15:12 ` Peter Maydell
2015-03-10 15:52 ` Andrew Jones
2015-02-12 15:05 ` [Qemu-devel] [PATCH 2/5] target-arm: enable get_rw_prot to take simple AP Andrew Jones
2015-03-10 15:22 ` Peter Maydell
2015-03-10 16:32 ` Andrew Jones
2015-03-10 16:41 ` Peter Maydell
2015-03-10 16:57 ` Andrew Jones
2015-02-12 15:05 ` [Qemu-devel] [PATCH 3/5] target-arm: add an is_user param to get_rw_prot Andrew Jones
2015-02-12 15:05 ` [Qemu-devel] [PATCH 4/5] target-arm: get_phys_addr_lpae: more xn control Andrew Jones
2015-02-12 17:44 ` Andrew Jones
2015-03-10 15:56 ` Peter Maydell
2015-03-10 16:48 ` Andrew Jones
2015-03-10 16:55 ` Peter Maydell
2015-03-10 17:02 ` Andrew Jones
2015-03-10 17:14 ` Peter Maydell
2015-03-10 17:28 ` Andrew Jones
2015-03-10 17:38 ` Peter Maydell
2015-03-11 10:37 ` Andrew Jones
2015-02-12 15:05 ` [Qemu-devel] [PATCH 5/5] target-arm: apply get_S1prot to get_phys_addr_v6 Andrew Jones
2015-02-12 17:08 ` Andrew Jones
2015-03-10 15:57 ` Peter Maydell
2015-03-10 16:54 ` Andrew Jones [this message]
2015-03-10 17:03 ` Peter Maydell
2015-03-10 17:08 ` Andrew Jones
2015-02-24 15:06 ` [Qemu-devel] [PATCH 0/5] tcg-arm: LPAE: fix and extend xn control Andrew Jones
2015-02-24 15:08 ` Peter Maydell
2015-02-24 15:14 ` Andrew Jones
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=20150310165410.GD6320@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.