diff mbox series

[12/13] exec/cpu-all: Restrict cpu_copy() to user emulation

Message ID 20220208152243.16452-13-f4bug@amsat.org (mailing list archive)
State New, archived
Headers show
Series exec: Move translation declarations to 'translate-all.h' | expand

Commit Message

Philippe Mathieu-Daudé Feb. 8, 2022, 3:22 p.m. UTC
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 include/exec/cpu-all.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Richard Henderson Feb. 8, 2022, 10:47 p.m. UTC | #1
On 2/9/22 02:22, Philippe Mathieu-Daudé wrote:
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>   include/exec/cpu-all.h | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h
> index c0f0fab28a..84188febfa 100644
> --- a/include/exec/cpu-all.h
> +++ b/include/exec/cpu-all.h
> @@ -296,10 +296,11 @@ void *page_alloc_target_data(target_ulong address, size_t size);
>    * at @address, as per page_alloc_target_data.
>    */
>   void *page_get_target_data(target_ulong address);
> -#endif
>   
>   CPUArchState *cpu_copy(CPUArchState *env);
>   
> +#endif /* CONFIG_USER_ONLY */
> +

Alternately, move it to linux-user/user-internals.h.


r~
diff mbox series

Patch

diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h
index c0f0fab28a..84188febfa 100644
--- a/include/exec/cpu-all.h
+++ b/include/exec/cpu-all.h
@@ -296,10 +296,11 @@  void *page_alloc_target_data(target_ulong address, size_t size);
  * at @address, as per page_alloc_target_data.
  */
 void *page_get_target_data(target_ulong address);
-#endif
 
 CPUArchState *cpu_copy(CPUArchState *env);
 
+#endif /* CONFIG_USER_ONLY */
+
 /* Flags for use in ENV->INTERRUPT_PENDING.
 
    The numbers assigned here are non-sequential in order to preserve