[PATCH v3 62/68] accel/tcg: Add rr_vcpu_destroy() stub

Philippe Mathieu-Daudé posted 68 patches 4 months, 2 weeks ago
Maintainers: Richard Henderson <richard.henderson@linaro.org>, Paolo Bonzini <pbonzini@redhat.com>, Cameron Esfahani <dirty@apple.com>, Roman Bolshakov <rbolshakov@ddn.com>, Phil Dennis-Jordan <phil@philjordan.eu>, Fabiano Rosas <farosas@suse.de>, Laurent Vivier <lvivier@redhat.com>, Stefano Stabellini <sstabellini@kernel.org>, Anthony PERARD <anthony@xenproject.org>, Paul Durrant <paul@xen.org>, "Edgar E. Iglesias" <edgar.iglesias@gmail.com>, Warner Losh <imp@bsdimp.com>, Kyle Evans <kevans@freebsd.org>, "Alex Bennée" <alex.bennee@linaro.org>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, "Dr. David Alan Gilbert" <dave@treblig.org>, Eduardo Habkost <eduardo@habkost.net>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, Yanan Wang <wangyanan55@huawei.com>, Zhao Liu <zhao1.liu@intel.com>, Reinoud Zandijk <reinoud@netbsd.org>, Sunil Muthuswamy <sunilmut@microsoft.com>, Eric Blake <eblake@redhat.com>, Markus Armbruster <armbru@redhat.com>, Peter Xu <peterx@redhat.com>, David Hildenbrand <david@redhat.com>, Peter Maydell <peter.maydell@linaro.org>, Alexander Graf <agraf@csgraf.de>
There is a newer version of this series
[PATCH v3 62/68] accel/tcg: Add rr_vcpu_destroy() stub
Posted by Philippe Mathieu-Daudé 4 months, 2 weeks ago
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 accel/tcg/tcg-accel-ops-rr.h | 2 ++
 accel/tcg/tcg-accel-ops-rr.c | 5 +++++
 2 files changed, 7 insertions(+)

diff --git a/accel/tcg/tcg-accel-ops-rr.h b/accel/tcg/tcg-accel-ops-rr.h
index a73fe5b94a6..4234ef2f706 100644
--- a/accel/tcg/tcg-accel-ops-rr.h
+++ b/accel/tcg/tcg-accel-ops-rr.h
@@ -20,4 +20,6 @@ void rr_start_vcpu_thread(CPUState *cpu);
 
 int rr_cpu_exec(CPUState *cpu);
 
+void rr_vcpu_destroy(CPUState *cpu);
+
 #endif /* TCG_ACCEL_OPS_RR_H */
diff --git a/accel/tcg/tcg-accel-ops-rr.c b/accel/tcg/tcg-accel-ops-rr.c
index a9150802369..95c7d3a3172 100644
--- a/accel/tcg/tcg-accel-ops-rr.c
+++ b/accel/tcg/tcg-accel-ops-rr.c
@@ -137,6 +137,11 @@ static void rr_deal_with_unplugged_cpus(void)
     }
 }
 
+void rr_vcpu_destroy(CPUState *cpu)
+{
+    /* Already dealt with in rr_deal_with_unplugged_cpus() */
+}
+
 static void rr_force_rcu(Notifier *notify, void *data)
 {
     rr_kick_next_cpu();
-- 
2.49.0


Re: [PATCH v3 62/68] accel/tcg: Add rr_vcpu_destroy() stub
Posted by Richard Henderson 4 months, 2 weeks ago
On 7/1/25 08:40, Philippe Mathieu-Daudé wrote:
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   accel/tcg/tcg-accel-ops-rr.h | 2 ++
>   accel/tcg/tcg-accel-ops-rr.c | 5 +++++
>   2 files changed, 7 insertions(+)
> 
> diff --git a/accel/tcg/tcg-accel-ops-rr.h b/accel/tcg/tcg-accel-ops-rr.h
> index a73fe5b94a6..4234ef2f706 100644
> --- a/accel/tcg/tcg-accel-ops-rr.h
> +++ b/accel/tcg/tcg-accel-ops-rr.h
> @@ -20,4 +20,6 @@ void rr_start_vcpu_thread(CPUState *cpu);
>   
>   int rr_cpu_exec(CPUState *cpu);
>   
> +void rr_vcpu_destroy(CPUState *cpu);
> +
>   #endif /* TCG_ACCEL_OPS_RR_H */
> diff --git a/accel/tcg/tcg-accel-ops-rr.c b/accel/tcg/tcg-accel-ops-rr.c
> index a9150802369..95c7d3a3172 100644
> --- a/accel/tcg/tcg-accel-ops-rr.c
> +++ b/accel/tcg/tcg-accel-ops-rr.c
> @@ -137,6 +137,11 @@ static void rr_deal_with_unplugged_cpus(void)
>       }
>   }
>   
> +void rr_vcpu_destroy(CPUState *cpu)
> +{
> +    /* Already dealt with in rr_deal_with_unplugged_cpus() */
> +}
> +
>   static void rr_force_rcu(Notifier *notify, void *data)
>   {
>       rr_kick_next_cpu();

Why?  Is this hook mandatory?

r~

Re: [PATCH v3 62/68] accel/tcg: Add rr_vcpu_destroy() stub
Posted by Philippe Mathieu-Daudé 4 months, 2 weeks ago
On 2/7/25 17:34, Richard Henderson wrote:
> On 7/1/25 08:40, Philippe Mathieu-Daudé wrote:
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>> ---
>>   accel/tcg/tcg-accel-ops-rr.h | 2 ++
>>   accel/tcg/tcg-accel-ops-rr.c | 5 +++++
>>   2 files changed, 7 insertions(+)
>>
>> diff --git a/accel/tcg/tcg-accel-ops-rr.h b/accel/tcg/tcg-accel-ops-rr.h
>> index a73fe5b94a6..4234ef2f706 100644
>> --- a/accel/tcg/tcg-accel-ops-rr.h
>> +++ b/accel/tcg/tcg-accel-ops-rr.h
>> @@ -20,4 +20,6 @@ void rr_start_vcpu_thread(CPUState *cpu);
>>   int rr_cpu_exec(CPUState *cpu);
>> +void rr_vcpu_destroy(CPUState *cpu);
>> +
>>   #endif /* TCG_ACCEL_OPS_RR_H */
>> diff --git a/accel/tcg/tcg-accel-ops-rr.c b/accel/tcg/tcg-accel-ops-rr.c
>> index a9150802369..95c7d3a3172 100644
>> --- a/accel/tcg/tcg-accel-ops-rr.c
>> +++ b/accel/tcg/tcg-accel-ops-rr.c
>> @@ -137,6 +137,11 @@ static void rr_deal_with_unplugged_cpus(void)
>>       }
>>   }
>> +void rr_vcpu_destroy(CPUState *cpu)
>> +{
>> +    /* Already dealt with in rr_deal_with_unplugged_cpus() */
>> +}
>> +
>>   static void rr_force_rcu(Notifier *notify, void *data)
>>   {
>>       rr_kick_next_cpu();
> 
> Why?  Is this hook mandatory?

No, I'll drop.