Register the new AccelOpsClass::cpu_instance_init hook. ACCEL_CPU_NAME("whpx") TypeInfo is now empty, remove it. Signed-off-by: Philippe Mathieu-Daudé --- accel/whpx/whpx-accel-ops.c | 2 ++ accel/whpx/whpx-common.c | 17 ----------------- target/arm/whpx/whpx-all.c | 1 - target/i386/whpx/whpx-all.c | 1 - 4 files changed, 2 insertions(+), 19 deletions(-) diff --git a/accel/whpx/whpx-accel-ops.c b/accel/whpx/whpx-accel-ops.c index b8f41544cbe..099e8ef6da3 100644 --- a/accel/whpx/whpx-accel-ops.c +++ b/accel/whpx/whpx-accel-ops.c @@ -98,6 +98,8 @@ static void whpx_accel_ops_class_init(ObjectClass *oc, const void *data) ops->handle_interrupt = generic_handle_interrupt; ops->supports_guest_debug = whpx_supports_guest_debug; + ops->cpu_instance_init = whpx_cpu_instance_init; + ops->synchronize_post_reset = whpx_cpu_synchronize_post_reset; ops->synchronize_post_init = whpx_cpu_synchronize_post_init; ops->synchronize_state = whpx_cpu_synchronize_state; diff --git a/accel/whpx/whpx-common.c b/accel/whpx/whpx-common.c index 247e12db812..25c5d84fd30 100644 --- a/accel/whpx/whpx-common.c +++ b/accel/whpx/whpx-common.c @@ -24,7 +24,6 @@ #include "qapi/qapi-types-common.h" #include "qapi/qapi-visit-common.h" #include "migration/blocker.h" -#include "accel/accel-cpu-target.h" #include #include "system/whpx-internal.h" @@ -505,21 +504,6 @@ static void whpx_set_hyperv(Object *obj, Visitor *v, } } -static void whpx_cpu_accel_class_init(ObjectClass *oc, const void *data) -{ - AccelCPUClass *acc = ACCEL_CPU_CLASS(oc); - - acc->cpu_instance_init = whpx_cpu_instance_init; -} - -static const TypeInfo whpx_cpu_accel_type = { - .name = ACCEL_CPU_NAME("whpx"), - - .parent = TYPE_ACCEL_CPU, - .class_init = whpx_cpu_accel_class_init, - .abstract = true, -}; - static void whpx_accel_class_init(ObjectClass *oc, const void *data) { AccelClass *ac = ACCEL_CLASS(oc); @@ -569,7 +553,6 @@ static const TypeInfo whpx_accel_type = { static void whpx_type_init(void) { type_register_static(&whpx_accel_type); - type_register_static(&whpx_cpu_accel_type); } bool init_whp_dispatch(void) diff --git a/target/arm/whpx/whpx-all.c b/target/arm/whpx/whpx-all.c index 3079c6293c8..16040f102a3 100644 --- a/target/arm/whpx/whpx-all.c +++ b/target/arm/whpx/whpx-all.c @@ -23,7 +23,6 @@ #include "qapi/qapi-types-common.h" #include "qapi/qapi-visit-common.h" #include "migration/blocker.h" -#include "accel/accel-cpu-target.h" #include #include "syndrome.h" diff --git a/target/i386/whpx/whpx-all.c b/target/i386/whpx/whpx-all.c index e626acef2f0..1b68f13a7dd 100644 --- a/target/i386/whpx/whpx-all.c +++ b/target/i386/whpx/whpx-all.c @@ -33,7 +33,6 @@ #include "qapi/qapi-visit-common.h" #include "migration/blocker.h" #include "host-cpu.h" -#include "accel/accel-cpu-target.h" #include #include "system/whpx-internal.h" -- 2.53.0