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:
void hax_kick_vcpu_thread(CPUState *cpu)
{
/*
* FIXME: race condition with the exit_request check in
* hax_vcpu_hax_exec
*/
cpu->exit_request = 1;
cpus_kick_thread(cpu);
}
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).
> 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.
> kvm_start_vcpu_thread(CPUState *cpu) would be just
>
> qemu_start_vcpu_thread(cpu, "KVM", kvm_vcpu_thread_fn);
>
> Paolo
>
>
Ciao,
Claudio