summary refs log tree commit diff stats
path: root/linux-user/syscall.c
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2023-08-06 22:26:10 -0700
committerRichard Henderson <richard.henderson@linaro.org>2023-08-08 13:41:55 -0700
commitdd55885516f42f718d0d121c59a5f7be5fdae3e6 (patch)
treecf9d586a0f3b969c5935c34145840e8187078d1d /linux-user/syscall.c
parent06f38c6688f8b7dcf65377b3302e45bfecc5e060 (diff)
downloadfocaccia-qemu-dd55885516f42f718d0d121c59a5f7be5fdae3e6.tar.gz
focaccia-qemu-dd55885516f42f718d0d121c59a5f7be5fdae3e6.zip
linux-user: Rewrite non-fixed probe_guest_base
Use pgb_addr_set to probe for all of the guest addresses,
not just the main executable.  Handle the identity map
specially and separately from the search.

If /proc/self/maps is available, utilize the full power
of the interval tree search, rather than a linear search
through the address list.

If /proc/self/maps is not available, increase the skip
between probes so that we do not probe every single page
of the host address space.  Choose 1 MiB for 32-bit hosts
(max 4k probes) and 1 GiB for 64-bit hosts (possibly a
large number of probes, but the large step makes it more
likely to find empty space quicker).

Tested-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'linux-user/syscall.c')
0 files changed, 0 insertions, 0 deletions