[PATCH v3 63/68] accel/system: Declare init/exec/destroy vcpu hooks

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 63/68] accel/system: Declare init/exec/destroy vcpu hooks
Posted by Philippe Mathieu-Daudé 4 months, 2 weeks ago
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 include/system/accel-ops.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/include/system/accel-ops.h b/include/system/accel-ops.h
index 28e29cfa06d..f98a1c9b662 100644
--- a/include/system/accel-ops.h
+++ b/include/system/accel-ops.h
@@ -43,8 +43,11 @@ struct AccelOpsClass {
     void *(*cpu_thread_routine)(void *);
     void (*thread_precreate)(CPUState *cpu);
     void (*create_vcpu_thread)(CPUState *cpu);
+    int (*init_vcpu_thread)(CPUState *cpu);
     void (*kick_vcpu_thread)(CPUState *cpu);
     bool (*cpu_thread_is_idle)(CPUState *cpu);
+    int (*exec_vcpu_thread)(CPUState *cpu);
+    void (*destroy_vcpu_thread)(CPUState *cpu);
 
     /**
      * synchronize_post_reset:
-- 
2.49.0


Re: [PATCH v3 63/68] accel/system: Declare init/exec/destroy vcpu hooks
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>
> ---
>   include/system/accel-ops.h | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/include/system/accel-ops.h b/include/system/accel-ops.h
> index 28e29cfa06d..f98a1c9b662 100644
> --- a/include/system/accel-ops.h
> +++ b/include/system/accel-ops.h
> @@ -43,8 +43,11 @@ struct AccelOpsClass {
>       void *(*cpu_thread_routine)(void *);
>       void (*thread_precreate)(CPUState *cpu);
>       void (*create_vcpu_thread)(CPUState *cpu);
> +    int (*init_vcpu_thread)(CPUState *cpu);
>       void (*kick_vcpu_thread)(CPUState *cpu);
>       bool (*cpu_thread_is_idle)(CPUState *cpu);
> +    int (*exec_vcpu_thread)(CPUState *cpu);
> +    void (*destroy_vcpu_thread)(CPUState *cpu);
>   
>       /**
>        * synchronize_post_reset:

These could use some documentation, distinguishing them from e.g. cpu_thread_routine.


r~