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>,
"Philippe Mathieu-Daudé" <f4bug@amsat.org>
Subject: Re: [PATCH for-6.0 v2 4/5] hw/core/loader: Add new function rom_ptr_for_as()
Date: Thu, 18 Mar 2021 15:56:16 -0600 [thread overview]
Message-ID: <706a2b95-f0ba-4abf-fdf7-09b7b856db45@linaro.org> (raw)
In-Reply-To: <CAFEAcA9i21sTkYoMfMt8sgN+18B3uHSqzG3No7k-+XJkzREi9A@mail.gmail.com>
On 3/18/21 3:28 PM, Peter Maydell wrote:
> On Thu, 18 Mar 2021 at 21:14, Richard Henderson
> <richard.henderson@linaro.org> wrote:
>>
>> On 3/18/21 1:02 PM, Peter Maydell wrote:
>>>>> + * Note that we do not check @as against the 'as' member in the
>>>>> + * 'struct Rom' returned by rom_ptr(). The Rom::as is the
>>>>> + * AddressSpace which the rom blob should be written to...
>> ...
>>>> Should you really have this special case? Nowhere is this going to verify that
>>>> @addr is in @as.
>>>
>>> It's the "happens almost all the time" case. Nothing verifies
>>> that @addr is in @as anyway -- see the "Note that" part of the
>>> comment above.
>>
>> The comment explains why we don't examine Rom::as.
>> But we do check @addr vs @as via @as -> @fv -> flatview_translate.
>
> All we do is look for "every other address in the AS that
> maps to the same MR as the address we started with".
> Are you asking about the !cbdata.mr exit ?
Well, I suppose. I guess I didn't read the cb properly.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~
next prev parent reply other threads:[~2021-03-18 21:57 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-18 17:48 [PATCH for-6.0 v2 0/5] arm: Make M-profile VTOR loads on reset handle memory aliasin Peter Maydell
2021-03-18 17:48 ` [PATCH for-6.0 v2 1/5] memory: Make flatview_cb return bool, not int Peter Maydell
2021-03-18 18:39 ` Richard Henderson
2021-03-18 20:55 ` Philippe Mathieu-Daudé
2021-03-18 17:48 ` [PATCH for-6.0 v2 2/5] memory: Document flatview_for_each_range() Peter Maydell
2021-03-18 18:40 ` Richard Henderson
2021-03-18 20:58 ` Philippe Mathieu-Daudé
2021-03-18 17:48 ` [PATCH for-6.0 v2 3/5] memory: Add offset_in_region to flatview_cb arguments Peter Maydell
2021-03-18 18:40 ` Richard Henderson
2021-03-18 21:01 ` Philippe Mathieu-Daudé
2021-03-18 17:48 ` [PATCH for-6.0 v2 4/5] hw/core/loader: Add new function rom_ptr_for_as() Peter Maydell
2021-03-18 18:44 ` Richard Henderson
2021-03-18 19:02 ` Peter Maydell
2021-03-18 21:14 ` Richard Henderson
2021-03-18 21:28 ` Peter Maydell
2021-03-18 21:56 ` Richard Henderson [this message]
2021-03-18 17:48 ` [PATCH for-6.0 v2 5/5] target/arm: Make M-profile VTOR loads on reset handle memory aliasing Peter Maydell
2021-03-18 18:44 ` Richard Henderson
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=706a2b95-f0ba-4abf-fdf7-09b7b856db45@linaro.org \
--to=richard.henderson@linaro.org \
--cc=f4bug@amsat.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).