common-user: Move guest_base, have_guest_base to probe-guest-base.c
Unify the definitions of guest_base and have_guest_base. Reviewed-by: Helge Deller <deller@gmx.de> Reviewed-by: Warner Losh <imp@bsdimp.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Richard Henderson committed
May 30, 2026 at 00:40 UTC
de1a2257117fc893d0703a154683b05f7bee0b12
3 files changed
+5
-4
bsd-user/main.c
+1
-2
@@ -63,8 +63,7 @@ intptr_t qemu_host_page_mask;
63
64
static bool opt_one_insn_per_tb;
65
static unsigned long opt_tb_size;
66
-uintptr_t guest_base;
67
-bool have_guest_base;
66
+
67
/*
68
* When running 32-on-64 we should make sure we can fit all of the possible
69
* guest address space into a contiguous chunk of virtual host memory.
common-user/probe-guest-base.c
+4
@@ -7,6 +7,7 @@
7
#include "qemu/log.h"
8
#include "user/guest-base.h"
9
#include "user/mmap-min-addr.h"
10
+#include "user/guest-base.h"
11
#include "user/guest-host.h"
12
#include "user/probe-guest-base.h"
13
#include "user/selfmap.h"
@@ -18,6 +19,9 @@
19
#define MAP_FIXED_NOREPLACE (MAP_FIXED | MAP_EXCL)
20
#endif
21
22
+uintptr_t guest_base;
23
+bool have_guest_base;
24
+
25
/**
26
* pgb_try_mmap:
27
* @addr: host start address
linux-user/main.c
-2
@@ -79,8 +79,6 @@ static envlist_t *envlist;
79
static const char *cpu_model;
80
static const char *cpu_type;
81
static const char *seed_optarg;
82
-uintptr_t guest_base;
83
-bool have_guest_base;
82
83
/*
84
* Used to implement backwards-compatibility for the `-strace`, and