From: Richard Henderson <richard.henderson@linaro.org>
To: xndcn <xndchn@gmail.com>
Cc: qemu-devel@nongnu.org, "Paolo Bonzini" <pbonzini@redhat.com>,
"Peter Xu" <peterx@redhat.com>,
"David Hildenbrand" <david@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: Re: [PATCH] system/physmem: Fix cpu_memory_rw_debug for armv7m MPU
Date: Sun, 24 Nov 2024 15:23:45 -0600 [thread overview]
Message-ID: <501e74e5-72b1-4d0c-8e22-c213dd4a75da@linaro.org> (raw)
In-Reply-To: <CAJ=gGT3v9WrDButDKP7C_6b7dLnX7AS0Gfyy5x1cLYunJqWBwg@mail.gmail.com>
On 11/23/24 22:30, xndcn wrote:
> Thanks. This patch at least guarantees normal read/write access to
> addresses with r/w flags, although there is still a risk of
> misidentifying accessible regions within continuous address spaces.
>
> Actually, initially I did write a patch with a modified page size as
> an argument, but I soon found that the current implementation of
> armv7a (pmsav7) will return the page size (lg_page_size) as 0 in many
> situations (such as overlapping regions).
0 was arbitrarily chosen as "anything less than TARGET_PAGE_BITS".
> Maybe we can simply make the page size as 2^5 (minimal page size) when
> the returned lg_page_size == 0?
No, don't lie, or make unhelpful guesses at the generic level. The only thing you could do
for arm m-profile is give accurate information, which for now will be immediately
discarded as *still* being less than TARGET_PAGE_BITS. But I do have plans for that.
Anyway, nothing you do with page sizes is helpful along the debug path. For that, we need
to swap away from "pages" to "ranges", where some ranges are in fact pages, but others
aren't. This means changing the API for cpu_get_phys_<something>_debug.
r~
next prev parent reply other threads:[~2024-11-24 21:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-20 15:15 [PATCH] system/physmem: Fix cpu_memory_rw_debug for armv7m MPU Xiong Nandi
2024-11-20 15:15 ` Xiong Nandi
2024-11-22 20:32 ` Richard Henderson
2024-11-24 4:30 ` xndcn
2024-11-24 21:23 ` Richard Henderson [this message]
2024-11-25 2:50 ` xndcn
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=501e74e5-72b1-4d0c-8e22-c213dd4a75da@linaro.org \
--to=richard.henderson@linaro.org \
--cc=david@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peterx@redhat.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=xndchn@gmail.com \
/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).