On 8/7/23 09:37, Richard Henderson wrote:
We will want to be able to search the set of mappings.
For this patch, the two users iterate the tree in order.

Signed-off-by: Richard Henderson <richard.hender...@linaro.org>
---
  include/qemu/selfmap.h |  20 ++++----
  linux-user/elfload.c   |  14 +++--
  linux-user/syscall.c   |  15 +++---
  util/selfmap.c         | 114 +++++++++++++++++++++++++----------------
  4 files changed, 96 insertions(+), 67 deletions(-)

I should note that, for 8.2, this will enable a rewrite of open_self_maps_1 so that it does not require page-by-page checking of page_get_flags.

My idea is that open_self_maps_1 would use walk_memory_regions to see all guest memory regions. The per-region callback would cross-check with the host-region interval tree to find the dev+inode+path.

Cc Ilya and Helge, since there are two outstanding changes to open_self_maps.


r~

Reply via email to