qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC v2 3/6] cpus: extract out kvm-specific code to accel/kvm


From: Paolo Bonzini
Subject: Re: [RFC v2 3/6] cpus: extract out kvm-specific code to accel/kvm
Date: Wed, 8 Jul 2020 09:58:17 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0

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
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]