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~

Reply via email to