On 9/26/21 6:26 PM, Philippe Mathieu-Daudé wrote:
All accelerators but TCG implement their AccelOpsClass::has_work()
handler, meaning all the remaining CPUClass::has_work() ones are
only reachable from TCG accelerator; and these has_work() handlers
belong to TCGCPUOps.

We will gradually move each target CPUClass::has_work() to
TCGCPUOps in the following commits.
For now, move the CPUClass::has_work() call to tcg_cpu_has_work(),
the TCG AccelOpsClass::has_work() implementation.

Signed-off-by: Philippe Mathieu-Daudé<f4...@amsat.org>
---
  include/hw/core/cpu.h     |  2 +-
  accel/tcg/tcg-accel-ops.c | 11 +++++++++++
  softmmu/cpus.c            |  5 -----
  3 files changed, 12 insertions(+), 6 deletions(-)

Are we really really really sure this works?

Device emulation raises e.g. CPU_INTERRUPT_HARD. We certainly test that bit in target/i386/kvm/kvm.c. But we don't check that bit in your kvm_cpu_has_work. We're currently checking that via cc->has_work(), in x86_cpu_pending_interrupt, but after this change we won't test it at all for kvm.


r~

Reply via email to