diff mbox series

[v8,10/40] accel/hax: Implement AccelOpsClass::has_work()

Message ID 20210926222716.1732932-11-f4bug@amsat.org
State New
Headers show
Series accel: Move has_work() from CPUClass to AccelOpsClass | expand

Commit Message

Philippe Mathieu-Daudé Sept. 26, 2021, 10:26 p.m. UTC
Since there is no specific HAX handling for cpu_has_work() in
cpu_thread_is_idle(), implement HAX has_work() handler as a
simple 'return false' code.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 target/i386/hax/hax-accel-ops.c | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Richard Henderson Sept. 27, 2021, 12:01 a.m. UTC | #1
On 9/26/21 6:26 PM, Philippe Mathieu-Daudé wrote:
> Since there is no specific HAX handling for cpu_has_work() in
> cpu_thread_is_idle(), implement HAX has_work() handler as a
> simple 'return false' code.
> 
> Signed-off-by: Philippe Mathieu-Daudé<f4bug@amsat.org>
> ---
>   target/i386/hax/hax-accel-ops.c | 6 ++++++
>   1 file changed, 6 insertions(+)

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

r~
diff mbox series

Patch

diff --git a/target/i386/hax/hax-accel-ops.c b/target/i386/hax/hax-accel-ops.c
index 136630e9b23..5407ba17eaf 100644
--- a/target/i386/hax/hax-accel-ops.c
+++ b/target/i386/hax/hax-accel-ops.c
@@ -74,6 +74,11 @@  static void hax_start_vcpu_thread(CPUState *cpu)
 #endif
 }
 
+static bool hax_cpu_has_work(CPUState *cpu)
+{
+    return false;
+}
+
 static void hax_accel_ops_class_init(ObjectClass *oc, void *data)
 {
     AccelOpsClass *ops = ACCEL_OPS_CLASS(oc);
@@ -85,6 +90,7 @@  static void hax_accel_ops_class_init(ObjectClass *oc, void *data)
     ops->synchronize_post_init = hax_cpu_synchronize_post_init;
     ops->synchronize_state = hax_cpu_synchronize_state;
     ops->synchronize_pre_loadvm = hax_cpu_synchronize_pre_loadvm;
+    ops->has_work = hax_cpu_has_work;
 }
 
 static const TypeInfo hax_accel_ops_type = {