@samitouri / QOSamiQemu / commits / ad7a005d67

include: Don't include guest-host.h in cpu-ldst.h

We currently include user/guest-host.h from accel/tcg/cpu-ldst.h. However that file doesn't need anything from guest-host.h, since we removed the uses of g2h() in commit 9b74d403b30e ("accel/tcg: Move user-only tlb_vaddr_to_host out of line"). Move the include of guest-host.h to where it's actually needed. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20260330143123.1685142-2-peter.maydell@linaro.org Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>

Peter Maydell committed Mar 30, 2026 at 15:31 UTC ad7a005d672a657a5344575426642bfbea20e3e0
3 files changed +2 -4
bsd-user/qemu.h
+1
@@ -27,6 +27,7 @@
27 #include "user/abitypes.h"
28 #include "user/cpu_loop.h"
29 #include "user/page-protection.h"
30 +#include "user/guest-host.h"
31
32 extern char **environ;
33
include/accel/tcg/cpu-ldst.h
-4
@@ -71,10 +71,6 @@
71 #include "accel/tcg/cpu-mmu-index.h"
72 #include "exec/abi_ptr.h"
73
74 -#if defined(CONFIG_USER_ONLY)
75 -#include "user/guest-host.h"
76 -#endif /* CONFIG_USER_ONLY */
77 -
74 static inline uint32_t
75 cpu_ldub_mmuidx_ra(CPUArchState *env, abi_ptr addr, int mmu_idx, uintptr_t ra)
76 {
linux-user/qemu.h
+1
@@ -10,6 +10,7 @@
10 #include "syscall_defs.h"
11 #include "target_syscall.h"
12 #include "accel/tcg/vcpu-state.h"
13 +#include "user/guest-host.h"
14
15 /*
16 * This is the size of the host kernel's sigset_t, needed where we make