Il mer 18 dic 2019, 18:36 Alex Bennée ha scritto: > > Paolo Bonzini writes: > > > On 17/12/19 15:18, Alex Bennée wrote: > >> cpu_has_work is a guest function though and semihosting_console is a > >> common hw module. It can't peek into the guests internal state. > > > > semihosting_console only needs to something like > > cpu_interrupt(cpu->stopped_cpu, CPU_INTERRUPT_SEMIHOST). > > As an exception is being delivered we just end up re-executing the > EXCP_SEMIHOST. I still don't see why using cpu_interrupt is an > improvement seeing as it is secondary to exception processing. > FWIW I skimmed your patch and yes an interrupt is not needed since you are delaying the update of the program counter; that's nicer. Paolo