[PATCH v2 00/13] *-user: probe_guest_base improvments

Richard Henderson posted 13 patches 1 month, 1 week ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260616212055.334466-1-richard.henderson@linaro.org
Maintainers: Warner Losh <imp@bsdimp.com>, Kyle Evans <kevans@freebsd.org>, Laurent Vivier <laurent@vivier.eu>, Helge Deller <deller@gmx.de>, Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
There is a newer version of this series
include/user/guest-host.h        |   1 +
include/user/mmap-min-addr.h     |  12 +
include/user/probe-guest-base.h  |  37 +++
include/{qemu => user}/selfmap.h |   0
linux-user/arm/target_elf.h      |   2 +-
linux-user/hppa/target_elf.h     |   2 +-
linux-user/user-internals.h      |  17 +-
bsd-user/elfload.c               |  37 +--
bsd-user/main.c                  |  42 +---
common-user/mmap-min-addr.c      |  50 ++++
common-user/probe-guest-base.c   | 347 +++++++++++++++++++++++++++
{util => common-user}/selfmap.c  |  45 +++-
linux-user/arm/elfload.c         |   2 +-
linux-user/elfload.c             | 400 ++-----------------------------
linux-user/flatload.c            |   3 +-
linux-user/hppa/elfload.c        |   4 +-
linux-user/main.c                |  35 +--
linux-user/mmap.c                |   1 +
linux-user/syscall.c             |   2 +-
common-user/meson.build          |   8 +
util/meson.build                 |   4 -
21 files changed, 565 insertions(+), 486 deletions(-)
create mode 100644 include/user/mmap-min-addr.h
create mode 100644 include/user/probe-guest-base.h
rename include/{qemu => user}/selfmap.h (100%)
create mode 100644 common-user/mmap-min-addr.c
create mode 100644 common-user/probe-guest-base.c
rename {util => common-user}/selfmap.c (69%)
[PATCH v2 00/13] *-user: probe_guest_base improvments
Posted by Richard Henderson 1 month, 1 week ago
The first 4 patches fix the ambiguous guest_lobase parameter,
which affects an odd usage of a bare metal image with qemu-arm.

The rest of the patches improve bsd-user to use probe_guest_base.

Changes for v2:
  - read_self_maps rewrite (warner)
  - rebase and r-b applied.


r~


Richard Henderson (13):
  linux-user: Introduce PGBRange
  linux-user: Use PGBRange in load_elf_image
  linux-user: Drop hiaddr out-of-range check in probe_guest_base
  linux-user: Pass image_range to probe_guest_base
  linux-user: Use PGBRange for commpage
  common-user: Move mmap_min_addr from linux-user
  common-user: Initialize mmap_min_addr for FreeBSD
  include/user/guest-host: Include missing cpu.h
  common-user: Move selfmap from util
  common-user: Implement read_self_maps for FreeBSD
  common-user: Move probe_guest_base from linux-user
  bsd-user: Use probe_guest_base
  common-user: Move guest_base, have_guest_base to probe-guest-base.c

 include/user/guest-host.h        |   1 +
 include/user/mmap-min-addr.h     |  12 +
 include/user/probe-guest-base.h  |  37 +++
 include/{qemu => user}/selfmap.h |   0
 linux-user/arm/target_elf.h      |   2 +-
 linux-user/hppa/target_elf.h     |   2 +-
 linux-user/user-internals.h      |  17 +-
 bsd-user/elfload.c               |  37 +--
 bsd-user/main.c                  |  42 +---
 common-user/mmap-min-addr.c      |  50 ++++
 common-user/probe-guest-base.c   | 347 +++++++++++++++++++++++++++
 {util => common-user}/selfmap.c  |  45 +++-
 linux-user/arm/elfload.c         |   2 +-
 linux-user/elfload.c             | 400 ++-----------------------------
 linux-user/flatload.c            |   3 +-
 linux-user/hppa/elfload.c        |   4 +-
 linux-user/main.c                |  35 +--
 linux-user/mmap.c                |   1 +
 linux-user/syscall.c             |   2 +-
 common-user/meson.build          |   8 +
 util/meson.build                 |   4 -
 21 files changed, 565 insertions(+), 486 deletions(-)
 create mode 100644 include/user/mmap-min-addr.h
 create mode 100644 include/user/probe-guest-base.h
 rename include/{qemu => user}/selfmap.h (100%)
 create mode 100644 common-user/mmap-min-addr.c
 create mode 100644 common-user/probe-guest-base.c
 rename {util => common-user}/selfmap.c (69%)

-- 
2.43.0
Re: [PATCH v2 00/13] *-user: probe_guest_base improvments
Posted by Helge Deller 1 month, 1 week ago
On 6/16/26 23:20, Richard Henderson wrote:
> The first 4 patches fix the ambiguous guest_lobase parameter,
> which affects an odd usage of a bare metal image with qemu-arm.
> 
> The rest of the patches improve bsd-user to use probe_guest_base.
> 
> Changes for v2:
>    - read_self_maps rewrite (warner)
>    - rebase and r-b applied
I've tested the patch for Linux-user (not bsd-user), you you may add
to the whole series:

Tested-by: Helge Deller <deller@gmx.de

Helge