From: xndcn <xndchn@gmail.com>
To: Richard Henderson <richard.henderson@linaro.org>
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: Mon, 25 Nov 2024 10:50:34 +0800 [thread overview]
Message-ID: <CAJ=gGT1B8kC7tzT0dKbZ2053e8fQZS82qfRT9CHj2xWpONf7zA@mail.gmail.com> (raw)
In-Reply-To: <501e74e5-72b1-4d0c-8e22-c213dd4a75da@linaro.org>
Got it, thanks.
It seems like there is still a lot of work surrounding the API, so I
create a issue to track it
https://gitlab.com/qemu-project/qemu/-/issues/2697
On Mon, Nov 25, 2024 at 5:23 AM Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> 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~
prev parent reply other threads:[~2024-11-25 2:51 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
2024-11-25 2:50 ` xndcn [this message]
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='CAJ=gGT1B8kC7tzT0dKbZ2053e8fQZS82qfRT9CHj2xWpONf7zA@mail.gmail.com' \
--to=xndchn@gmail.com \
--cc=david@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peterx@redhat.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.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).