[RFC PATCH 06/19] accel/hvf: Fix TYPE_HVF_ACCEL instance size

Philippe Mathieu-Daudé posted 19 patches 8 months, 1 week 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>, Peter Maydell <peter.maydell@linaro.org>, Reinoud Zandijk <reinoud@netbsd.org>, Sunil Muthuswamy <sunilmut@microsoft.com>
There is a newer version of this series
[RFC PATCH 06/19] accel/hvf: Fix TYPE_HVF_ACCEL instance size
Posted by Philippe Mathieu-Daudé 8 months, 1 week ago
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 include/system/hvf_int.h  | 1 +
 accel/hvf/hvf-accel-ops.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/include/system/hvf_int.h b/include/system/hvf_int.h
index 8c8b84012d9..d774e58df91 100644
--- a/include/system/hvf_int.h
+++ b/include/system/hvf_int.h
@@ -44,6 +44,7 @@ typedef struct hvf_vcpu_caps {
 
 struct HVFState {
     AccelState parent;
+
     hvf_slot slots[32];
     int num_slots;
 
diff --git a/accel/hvf/hvf-accel-ops.c b/accel/hvf/hvf-accel-ops.c
index 3dd9de26dbb..808ecea3816 100644
--- a/accel/hvf/hvf-accel-ops.c
+++ b/accel/hvf/hvf-accel-ops.c
@@ -366,6 +366,7 @@ static void hvf_accel_class_init(ObjectClass *oc, const void *data)
 static const TypeInfo hvf_accel_type = {
     .name = TYPE_HVF_ACCEL,
     .parent = TYPE_ACCEL,
+    .instance_size = sizeof(HVFState),
     .class_init = hvf_accel_class_init,
 };
 
-- 
2.49.0


Re: [RFC PATCH 06/19] accel/hvf: Fix TYPE_HVF_ACCEL instance size
Posted by Richard Henderson 8 months, 1 week ago
On 6/6/25 17:44, Philippe Mathieu-Daudé wrote:
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   include/system/hvf_int.h  | 1 +
>   accel/hvf/hvf-accel-ops.c | 1 +
>   2 files changed, 2 insertions(+)
> 
> diff --git a/include/system/hvf_int.h b/include/system/hvf_int.h
> index 8c8b84012d9..d774e58df91 100644
> --- a/include/system/hvf_int.h
> +++ b/include/system/hvf_int.h
> @@ -44,6 +44,7 @@ typedef struct hvf_vcpu_caps {
>   
>   struct HVFState {
>       AccelState parent;
> +
>       hvf_slot slots[32];
>       int num_slots;
>   
> diff --git a/accel/hvf/hvf-accel-ops.c b/accel/hvf/hvf-accel-ops.c
> index 3dd9de26dbb..808ecea3816 100644
> --- a/accel/hvf/hvf-accel-ops.c
> +++ b/accel/hvf/hvf-accel-ops.c
> @@ -366,6 +366,7 @@ static void hvf_accel_class_init(ObjectClass *oc, const void *data)
>   static const TypeInfo hvf_accel_type = {
>       .name = TYPE_HVF_ACCEL,
>       .parent = TYPE_ACCEL,
> +    .instance_size = sizeof(HVFState),
>       .class_init = hvf_accel_class_init,
>   };
>   

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

r~