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>,
	"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:14:06 -0600	[thread overview]
Message-ID: <ec96b321-80d4-948d-b482-dfad61eff67f@linaro.org> (raw)
In-Reply-To: <CAFEAcA-mZMP0LPmGKvMuUq8C_V6cG9AVpaAQ4SoWvihObO_VXA@mail.gmail.com>

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.


r~


  reply	other threads:[~2021-03-18 21:15 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 [this message]
2021-03-18 21:28         ` Peter Maydell
2021-03-18 21:56           ` Richard Henderson
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=ec96b321-80d4-948d-b482-dfad61eff67f@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).