[PATCH v2 03/30] exec/cpu-all: move cpu_copy to linux-user/qemu.h

Pierrick Bouvier posted 30 patches 1 week, 5 days ago
There is a newer version of this series
[PATCH v2 03/30] exec/cpu-all: move cpu_copy to linux-user/qemu.h
Posted by Pierrick Bouvier 1 week, 5 days ago
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
---
 include/exec/cpu-all.h | 2 --
 linux-user/qemu.h      | 3 +++
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h
index d2895fb55b1..74017a5ce7c 100644
--- a/include/exec/cpu-all.h
+++ b/include/exec/cpu-all.h
@@ -32,8 +32,6 @@
 #include "exec/cpu-defs.h"
 #include "exec/target_page.h"
 
-CPUArchState *cpu_copy(CPUArchState *env);
-
 #include "cpu.h"
 
 /* Validate correct placement of CPUArchState. */
diff --git a/linux-user/qemu.h b/linux-user/qemu.h
index 5f007501518..948de8431a5 100644
--- a/linux-user/qemu.h
+++ b/linux-user/qemu.h
@@ -362,4 +362,7 @@ void *lock_user_string(abi_ulong guest_addr);
 #define unlock_user_struct(host_ptr, guest_addr, copy)		\
     unlock_user(host_ptr, guest_addr, (copy) ? sizeof(*host_ptr) : 0)
 
+/* Clone cpu state */
+CPUArchState *cpu_copy(CPUArchState *env);
+
 #endif /* QEMU_H */
-- 
2.39.5
Re: [PATCH v2 03/30] exec/cpu-all: move cpu_copy to linux-user/qemu.h
Posted by Richard Henderson 1 week, 4 days ago
On 3/20/25 15:29, Pierrick Bouvier wrote:
> Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
> ---
>   include/exec/cpu-all.h | 2 --
>   linux-user/qemu.h      | 3 +++
>   2 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h
> index d2895fb55b1..74017a5ce7c 100644
> --- a/include/exec/cpu-all.h
> +++ b/include/exec/cpu-all.h
> @@ -32,8 +32,6 @@
>   #include "exec/cpu-defs.h"
>   #include "exec/target_page.h"
>   
> -CPUArchState *cpu_copy(CPUArchState *env);
> -
>   #include "cpu.h"
>   
>   /* Validate correct placement of CPUArchState. */
> diff --git a/linux-user/qemu.h b/linux-user/qemu.h
> index 5f007501518..948de8431a5 100644
> --- a/linux-user/qemu.h
> +++ b/linux-user/qemu.h
> @@ -362,4 +362,7 @@ void *lock_user_string(abi_ulong guest_addr);
>   #define unlock_user_struct(host_ptr, guest_addr, copy)		\
>       unlock_user(host_ptr, guest_addr, (copy) ? sizeof(*host_ptr) : 0)
>   
> +/* Clone cpu state */
> +CPUArchState *cpu_copy(CPUArchState *env);
> +
>   #endif /* QEMU_H */

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~