qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v7 12/40] accel/qtest: Implement AccelOpsClass::has_work()


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH v7 12/40] accel/qtest: Implement AccelOpsClass::has_work()
Date: Sat, 25 Sep 2021 17:27:20 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.1.0

+Igor

On 9/25/21 16:50, Philippe Mathieu-Daudé wrote:
Implement QTest has_work() handler in AccelOpsClass.
Since no CPU are available under QTest accelerator,
this function is not reachable.

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

diff --git a/accel/qtest/qtest.c b/accel/qtest/qtest.c
index 7e6b8110d52..903c39ec1bf 100644
--- a/accel/qtest/qtest.c
+++ b/accel/qtest/qtest.c
@@ -47,12 +47,18 @@ static const TypeInfo qtest_accel_type = {
  };
  module_obj(TYPE_QTEST_ACCEL);
+static bool qtest_cpu_has_work(CPUState *cpu)
+{
+    g_assert_not_reached();
+}

Sigh, this triggers:

Running test qtest-i386/cpu-plug-test
**
ERROR:../accel/qtest/qtest.c:52:qtest_cpu_has_work: code should not be reached ERROR qtest-i386/cpu-plug-test - Bail out! ERROR:../accel/qtest/qtest.c:52:qtest_cpu_has_work: code should not be reached
Broken pipe

I understand we want to test CPU hotplug, however I'm not sure what
part of the accelerator can be tested, QTest is almost empty stubs.

I suppose it is in my interest to 'return false' here and call it
a day...

  static void qtest_accel_ops_class_init(ObjectClass *oc, void *data)
  {
      AccelOpsClass *ops = ACCEL_OPS_CLASS(oc);
ops->create_vcpu_thread = dummy_start_vcpu_thread;
      ops->get_virtual_clock = qtest_get_virtual_clock;
+    ops->has_work = qtest_cpu_has_work;
  };
static const TypeInfo qtest_accel_ops_type = {




reply via email to

[Prev in Thread] Current Thread [Next in Thread]