[PATCH v8 09/40] accel/xen: Implement AccelOpsClass::has_work()

Philippe Mathieu-Daudé posted 40 patches 4 years, 4 months ago
Maintainers: Cornelia Huck <cohuck@redhat.com>, Thomas Huth <thuth@redhat.com>, "Philippe Mathieu-Daudé" <f4bug@amsat.org>, Jiaxun Yang <jiaxun.yang@flygoat.com>, Aurelien Jarno <aurelien@aurel32.net>, Aleksandar Rikalo <aleksandar.rikalo@syrmia.com>
[PATCH v8 09/40] accel/xen: Implement AccelOpsClass::has_work()
Posted by Philippe Mathieu-Daudé 4 years, 4 months ago
Since there is no specific Xen handling for cpu_has_work() in
cpu_thread_is_idle(), implement Xen has_work() handler as a
simple 'return false' code.

Acked-by: Paul Durrant <paul@xen.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 accel/xen/xen-all.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/accel/xen/xen-all.c b/accel/xen/xen-all.c
index 69aa7d018b2..fe5a37fa2e6 100644
--- a/accel/xen/xen-all.c
+++ b/accel/xen/xen-all.c
@@ -215,11 +215,17 @@ static const TypeInfo xen_accel_type = {
     .class_init = xen_accel_class_init,
 };
 
+static bool xen_cpu_has_work(CPUState *cpu)
+{
+    return false;
+}
+
 static void xen_accel_ops_class_init(ObjectClass *oc, void *data)
 {
     AccelOpsClass *ops = ACCEL_OPS_CLASS(oc);
 
     ops->create_vcpu_thread = dummy_start_vcpu_thread;
+    ops->has_work = xen_cpu_has_work;
 }
 
 static const TypeInfo xen_accel_ops_type = {
-- 
2.31.1

Re: [PATCH v8 09/40] accel/xen: Implement AccelOpsClass::has_work()
Posted by Richard Henderson 4 years, 4 months ago
On 9/26/21 6:26 PM, Philippe Mathieu-Daudé wrote:
> Since there is no specific Xen handling for cpu_has_work() in
> cpu_thread_is_idle(), implement Xen has_work() handler as a
> simple 'return false' code.
> 
> Acked-by: Paul Durrant<paul@xen.org>
> Signed-off-by: Philippe Mathieu-Daudé<f4bug@amsat.org>
> ---
>   accel/xen/xen-all.c | 6 ++++++
>   1 file changed, 6 insertions(+)
> 

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

r~