diff options
| author | Philippe Mathieu-Daudé <philmd@linaro.org> | 2025-06-12 14:45:19 +0200 |
|---|---|---|
| committer | Philippe Mathieu-Daudé <philmd@linaro.org> | 2025-07-04 12:08:44 +0200 |
| commit | b9b8ce038497a18f4525e9b229f9090b1cec3b05 (patch) | |
| tree | 147e3d4ac71973543edeb72612f7bd2f31dfb416 /accel | |
| parent | e8388158e62184cb567b7b97ab9e6738dec45348 (diff) | |
| download | focaccia-qemu-b9b8ce038497a18f4525e9b229f9090b1cec3b05.tar.gz focaccia-qemu-b9b8ce038497a18f4525e9b229f9090b1cec3b05.zip | |
accel: Expose and register generic_handle_interrupt()
In order to dispatch over AccelOpsClass::handle_interrupt(), we need it always defined, not calling a hidden handler under the hood. Make AccelOpsClass::handle_interrupt() mandatory. Expose generic_handle_interrupt() prototype and register it for each accelerator. Suggested-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Reviewed-by: Zhao Liu <zhao1.liu@intel.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com> Message-Id: <20250703173248.44995-29-philmd@linaro.org>
Diffstat (limited to 'accel')
| -rw-r--r-- | accel/hvf/hvf-accel-ops.c | 1 | ||||
| -rw-r--r-- | accel/kvm/kvm-accel-ops.c | 1 | ||||
| -rw-r--r-- | accel/qtest/qtest.c | 1 | ||||
| -rw-r--r-- | accel/xen/xen-all.c | 1 |
4 files changed, 4 insertions, 0 deletions
diff --git a/accel/hvf/hvf-accel-ops.c b/accel/hvf/hvf-accel-ops.c index 395b5a8e1c..be8724ac89 100644 --- a/accel/hvf/hvf-accel-ops.c +++ b/accel/hvf/hvf-accel-ops.c @@ -353,6 +353,7 @@ static void hvf_accel_ops_class_init(ObjectClass *oc, const void *data) ops->create_vcpu_thread = hvf_start_vcpu_thread; ops->kick_vcpu_thread = hvf_kick_vcpu_thread; + ops->handle_interrupt = generic_handle_interrupt; ops->synchronize_post_reset = hvf_cpu_synchronize_post_reset; ops->synchronize_post_init = hvf_cpu_synchronize_post_init; diff --git a/accel/kvm/kvm-accel-ops.c b/accel/kvm/kvm-accel-ops.c index e5c15449aa..0eafc902c3 100644 --- a/accel/kvm/kvm-accel-ops.c +++ b/accel/kvm/kvm-accel-ops.c @@ -101,6 +101,7 @@ static void kvm_accel_ops_class_init(ObjectClass *oc, const void *data) ops->synchronize_post_init = kvm_cpu_synchronize_post_init; ops->synchronize_state = kvm_cpu_synchronize_state; ops->synchronize_pre_loadvm = kvm_cpu_synchronize_pre_loadvm; + ops->handle_interrupt = generic_handle_interrupt; #ifdef TARGET_KVM_HAVE_GUEST_DEBUG ops->update_guest_debug = kvm_update_guest_debug_ops; diff --git a/accel/qtest/qtest.c b/accel/qtest/qtest.c index 612cede160..5474ce7313 100644 --- a/accel/qtest/qtest.c +++ b/accel/qtest/qtest.c @@ -67,6 +67,7 @@ static void qtest_accel_ops_class_init(ObjectClass *oc, const void *data) ops->create_vcpu_thread = dummy_start_vcpu_thread; ops->get_virtual_clock = qtest_get_virtual_clock; ops->set_virtual_clock = qtest_set_virtual_clock; + ops->handle_interrupt = generic_handle_interrupt; }; static const TypeInfo qtest_accel_ops_type = { diff --git a/accel/xen/xen-all.c b/accel/xen/xen-all.c index c150dd43ca..c12c22de78 100644 --- a/accel/xen/xen-all.c +++ b/accel/xen/xen-all.c @@ -153,6 +153,7 @@ static void xen_accel_ops_class_init(ObjectClass *oc, const void *data) AccelOpsClass *ops = ACCEL_OPS_CLASS(oc); ops->create_vcpu_thread = dummy_start_vcpu_thread; + ops->handle_interrupt = generic_handle_interrupt; } static const TypeInfo xen_accel_ops_type = { |