[PATCH 06/24] target/arm/hvf: Mention flush_cpu_state() must run on vCPU thread

Philippe Mathieu-Daudé posted 24 patches 3 days, 4 hours ago
[PATCH 06/24] target/arm/hvf: Mention flush_cpu_state() must run on vCPU thread
Posted by Philippe Mathieu-Daudé 3 days, 4 hours ago
Since flush_cpu_state() calls hvf_arch_put_registers(),
which must run on a vCPU, it also must. Mention it.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 target/arm/hvf/hvf.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c
index 21002f419f5..58934953c4a 100644
--- a/target/arm/hvf/hvf.c
+++ b/target/arm/hvf/hvf.c
@@ -814,6 +814,7 @@ int hvf_arch_put_registers(CPUState *cpu)
     return 0;
 }
 
+/* Must be called by the owning thread */
 static void flush_cpu_state(CPUState *cpu)
 {
     if (cpu->vcpu_dirty) {
-- 
2.51.0


Re: [PATCH 06/24] target/arm/hvf: Mention flush_cpu_state() must run on vCPU thread
Posted by Richard Henderson 3 days, 2 hours ago
On 9/3/25 12:06, Philippe Mathieu-Daudé wrote:
> Since flush_cpu_state() calls hvf_arch_put_registers(),
> which must run on a vCPU, it also must. Mention it.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   target/arm/hvf/hvf.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c
> index 21002f419f5..58934953c4a 100644
> --- a/target/arm/hvf/hvf.c
> +++ b/target/arm/hvf/hvf.c
> @@ -814,6 +814,7 @@ int hvf_arch_put_registers(CPUState *cpu)
>       return 0;
>   }
>   
> +/* Must be called by the owning thread */
>   static void flush_cpu_state(CPUState *cpu)
>   {
>       if (cpu->vcpu_dirty) {

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

r~