[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: |
Claudio Fontana |
Subject: |
Re: [RFC v2 3/6] cpus: extract out kvm-specific code to accel/kvm |
Date: |
Wed, 8 Jul 2020 09:40:52 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 |
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
- [RFC v2 0/6] QEMU cpus.c refactoring part2, Claudio Fontana, 2020/07/07
- [RFC v2 4/6] cpus: extract out hax-specific code to target/i386/, Claudio Fontana, 2020/07/07
- [RFC v2 1/6] cpus: extract out TCG-specific code to accel/tcg, Claudio Fontana, 2020/07/07
- [RFC v2 6/6] cpus: extract out hvf-specific code to target/i386/hvf/, Claudio Fontana, 2020/07/07
- [RFC v2 5/6] cpus: extract out whpx-specific code to target/i386/, Claudio Fontana, 2020/07/07