Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
tcg: Split out exec/user/guest-base.h
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>
  • Loading branch information
rth7680 committed May 17, 2023
1 parent a66efde commit 7d47830
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
5 changes: 1 addition & 4 deletions include/exec/cpu-all.h
Expand Up @@ -84,11 +84,8 @@

#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;

/*
Expand Down
12 changes: 12 additions & 0 deletions include/exec/user/guest-base.h
@@ -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
3 changes: 3 additions & 0 deletions tcg/tcg.c
Expand Up @@ -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. */
Expand Down

0 comments on commit 7d47830

Please sign in to comment.