On 9/27/21 02:12, Richard Henderson wrote:
> 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é<[email protected]>
>> ---
>>   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?

As sure as a green CI, so I wonder if KVM is really tested there...

> 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.

Indeed. I guess I misunderstood your v6 comment. I'll revisit. Sorry.

Reply via email to