@@ -65,9 +65,6 @@
#if defined(CONFIG_USER_ONLY)
#include "exec/user/abitypes.h"
-#include "exec/user/guest-base.h"
-
-extern bool have_guest_base;
/*
* If non-zero, the guest virtual address space is a contiguous subset
@@ -69,6 +69,8 @@
#if defined(CONFIG_USER_ONLY)
+#include "exec/user/guest-base.h"
+
#ifndef TARGET_TAGGED_ADDRESSES
static inline abi_ptr cpu_untagged_addr(CPUState *cs, abi_ptr x)
{
@@ -7,6 +7,12 @@
#ifndef EXEC_USER_GUEST_BASE_H
#define EXEC_USER_GUEST_BASE_H
+#ifndef CONFIG_USER_ONLY
+#error Cannot include this header from system emulation
+#endif
+
extern uintptr_t guest_base;
+extern bool have_guest_base;
+
#endif
@@ -36,6 +36,7 @@
#include "qemu/help_option.h"
#include "qemu/module.h"
#include "exec/exec-all.h"
+#include "exec/user/guest-base.h"
#include "tcg/startup.h"
#include "qemu/timer.h"
#include "qemu/envlist.h"
@@ -7,6 +7,7 @@
#include "qemu.h"
#include "exec/user/tswap-target.h"
+#include "exec/user/guest-base.h"
#include "user-internals.h"
#include "signal-common.h"
#include "loader.h"
@@ -38,6 +38,7 @@
#include "qemu/help_option.h"
#include "qemu/module.h"
#include "qemu/plugin.h"
+#include "exec/user/guest-base.h"
#include "exec/exec-all.h"
#include "exec/gdbstub.h"
#include "gdbstub/user.h"