qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-arm <qemu-arm@nongnu.org>,
	QEMU Developers <qemu-devel@nongnu.org>,
	Adithya Baglody <adithya.nagaraj.baglody@intel.com>,
	"patches@linaro.org" <patches@linaro.org>
Subject: Re: [Qemu-devel] [PATCH for-3.0] target/arm: Correctly handle overlapping small MPU regions
Date: Tue, 17 Jul 2018 21:02:37 -0700	[thread overview]
Message-ID: <1f26dbe0-9999-f9ea-103f-d5dde6c52dc0@linaro.org> (raw)
In-Reply-To: <CAFEAcA8FnSP35scTZmLG6_qFOBsu1wRC0mLq5isz+Y_r907i5w@mail.gmail.com>

On 07/17/2018 12:40 PM, Peter Maydell wrote:
> On 17 July 2018 at 18:29, Richard Henderson
> <richard.henderson@linaro.org> wrote:
>> I don't understand why this is necessary in the v8m case.
>>
>>                AP                 APL
>>     <----B1----|----L1-B2-A-------|---L2--->
>>
>>
>> Your comment posits two regions [B1,L1] and [B2,L2], that A is not within
>> [B1,L1] but is within [B2,L2] (otherwise we would not report a hit at all).
>> Further, that [B1,L1] intersects [AP,APL] but does not intersect [B2,L2]
>> (otherwise we would report a fault for overlapping regions).
>>
>> Surely this combination of ranges implies that [B2,L2] must itself set
>> IS_SUBPAGE (otherwise the first region would not overlap the page of A, or
>> would not overlap the second region).
> 
> (a) the overlap fault is only for addresses which are actually in the
> overlap (ie "you asked about address X and it hits in R1 and R2"); it
> doesn't imply that other addresses which are only in R1 fault just
> because some part of R1 overlaps with R2.

Ah, that wasn't clear from the manual.

> So for instance:
> 
>        AP                        APL
>    [B1                                L1]
>                  [B2       L2]
>              A1^     A2^

Thanks for the example,

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~

  reply	other threads:[~2018-07-18  4:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-16 13:33 [Qemu-devel] [PATCH for-3.0] target/arm: Correctly handle overlapping small MPU regions Peter Maydell
2018-07-17 17:29 ` Richard Henderson
2018-07-17 19:40   ` Peter Maydell
2018-07-18  4:02     ` Richard Henderson [this message]
2018-07-19 16:30       ` 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=1f26dbe0-9999-f9ea-103f-d5dde6c52dc0@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=adithya.nagaraj.baglody@intel.com \
    --cc=patches@linaro.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.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).