tcg: Split out exec/user/guest-base.h
authorRichard Henderson <richard.henderson@linaro.org>
Sun, 30 Apr 2023 07:24:36 +0000 (08:24 +0100)
committerRichard Henderson <richard.henderson@linaro.org>
Wed, 17 May 2023 03:13:51 +0000 (20:13 -0700)
TCG will need this declaration, without all of the other
bits that come with cpu-all.h.

Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
include/exec/cpu-all.h
include/exec/user/guest-base.h [new file with mode: 0644]
tcg/tcg.c

index ad824fee52bba6a43889ed5c9f3ab69eb4dbba0e..78d258af4438d8f8fb4ee0761373db0207a8b1f2 100644 (file)
 
 #if defined(CONFIG_USER_ONLY)
 #include "exec/user/abitypes.h"
+#include "exec/user/guest-base.h"
 
-/* On some host systems the guest address space is reserved on the host.
- * This allows the guest address space to be offset to a convenient location.
- */
-extern uintptr_t guest_base;
 extern bool have_guest_base;
 
 /*
diff --git a/include/exec/user/guest-base.h b/include/exec/user/guest-base.h
new file mode 100644 (file)
index 0000000..afe2ab7
--- /dev/null
@@ -0,0 +1,12 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+/*
+ * Declaration of guest_base.
+ *  Copyright (c) 2003 Fabrice Bellard
+ */
+
+#ifndef EXEC_USER_GUEST_BASE_H
+#define EXEC_USER_GUEST_BASE_H
+
+extern uintptr_t guest_base;
+
+#endif
index a0bec135828d75560ee4643b732bd553817f5987..0b0fe9c7ad7a5b1362ee4817902a90a4d3227f64 100644 (file)
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -63,6 +63,9 @@
 #include "tcg/tcg-temp-internal.h"
 #include "tcg-internal.h"
 #include "accel/tcg/perf.h"
+#ifdef CONFIG_USER_ONLY
+#include "exec/user/guest-base.h"
+#endif
 
 /* Forward declarations for functions declared in tcg-target.c.inc and
    used here. */