mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 17:23:56 -06:00
cpus: prepare new CpusAccel cpu accelerator interface
The new interface starts unused, will start being used by the next patches. It provides methods for each accelerator to start a vcpu, kick a vcpu, synchronize state, get cpu virtual clock and elapsed ticks. In qemu_wait_io_event, make it clear that APC is used only for HAX on Windows. Signed-off-by: Claudio Fontana <cfontana@suse.de> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
8191d36841
commit
430065dab0
11 changed files with 225 additions and 123 deletions
|
@ -61,18 +61,13 @@ static int64_t cpu_get_ticks_locked(void)
|
|||
}
|
||||
|
||||
/*
|
||||
* return the time elapsed in VM between vm_start and vm_stop. Unless
|
||||
* icount is active, cpu_get_ticks() uses units of the host CPU cycle
|
||||
* counter.
|
||||
* return the time elapsed in VM between vm_start and vm_stop.
|
||||
* cpu_get_ticks() uses units of the host CPU cycle counter.
|
||||
*/
|
||||
int64_t cpu_get_ticks(void)
|
||||
{
|
||||
int64_t ticks;
|
||||
|
||||
if (icount_enabled()) {
|
||||
return icount_get();
|
||||
}
|
||||
|
||||
qemu_spin_lock(&timers_state.vm_clock_lock);
|
||||
ticks = cpu_get_ticks_locked();
|
||||
qemu_spin_unlock(&timers_state.vm_clock_lock);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue