Commit de1a225711 for qemu.org
commit de1a2257117fc893d0703a154683b05f7bee0b12
Author: Richard Henderson <richard.henderson@linaro.org>
Date: Sat May 30 00:40:22 2026 -0700
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>
diff --git a/bsd-user/main.c b/bsd-user/main.c
index 5277b4e099..694481ae3e 100644
--- a/bsd-user/main.c
+++ b/bsd-user/main.c
@@ -63,8 +63,7 @@ intptr_t qemu_host_page_mask;
static bool opt_one_insn_per_tb;
static unsigned long opt_tb_size;
-uintptr_t guest_base;
-bool have_guest_base;
+
/*
* When running 32-on-64 we should make sure we can fit all of the possible
* guest address space into a contiguous chunk of virtual host memory.
diff --git a/common-user/probe-guest-base.c b/common-user/probe-guest-base.c
index 77722fe63f..6f1247cf1a 100644
--- a/common-user/probe-guest-base.c
+++ b/common-user/probe-guest-base.c
@@ -7,6 +7,7 @@
#include "qemu/log.h"
#include "user/guest-base.h"
#include "user/mmap-min-addr.h"
+#include "user/guest-base.h"
#include "user/guest-host.h"
#include "user/probe-guest-base.h"
#include "user/selfmap.h"
@@ -18,6 +19,9 @@
#define MAP_FIXED_NOREPLACE (MAP_FIXED | MAP_EXCL)
#endif
+uintptr_t guest_base;
+bool have_guest_base;
+
/**
* pgb_try_mmap:
* @addr: host start address
diff --git a/linux-user/main.c b/linux-user/main.c
index 01cf5bf079..60a695b7ca 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -79,8 +79,6 @@ static envlist_t *envlist;
static const char *cpu_model;
static const char *cpu_type;
static const char *seed_optarg;
-uintptr_t guest_base;
-bool have_guest_base;
/*
* Used to implement backwards-compatibility for the `-strace`, and