On 08/07/20 09:40, Claudio Fontana wrote: > Ciao Paolo, > > On 7/7/20 7:01 PM, Paolo Bonzini wrote: >> On 07/07/20 15:58, Claudio Fontana wrote: >>> +static void kvm_kick_vcpu_thread(CPUState *cpu) >>> +{ >>> + cpus_kick_thread(cpu); >>> +} >>> + >> >> I would just use cpus_kick_thread instead of wrapping it (and likewise > > Here I left the common code in cpus_kick_thread, which is just used "as is" > for kvm, > but for hax f.e. we have: > > [...] > > Maybe we will need additional code that specializes the kick also for HVF? > > I cannot run cpus_kick_thread for _all_ accels, because it is not good for > Windows (whpx and hax-windows).
Yeah, I meant just initialize the function pointer with cpus_kick_thread, instead of having the wrapper, similar to the global noops. >> would provide a global function for noop synchronization). > > I will look into providing global noops, thanks! > >> start_vcpu_thread is also a candidate for abstraction, so that > > Thanks, will look into this! > The accel that I expect will resist this will be tcg, but will try to fit it. Yes, no problem if some of them are different. Paolo > >> kvm_start_vcpu_thread(CPUState *cpu) would be just >> >> qemu_start_vcpu_thread(cpu, "KVM", kvm_vcpu_thread_fn); >> >> Paolo >> >> > > Ciao, > > Claudio >