mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-01 14:53:54 -06:00
timer: introduce new QEMU_CLOCK_VIRTUAL_RT clock
This patch introduces new QEMU_CLOCK_VIRTUAL_RT clock, which should be used for icount warping. In the next patch, it will be used to avoid a huge icount warp when a virtual machine is stopped for a long time. Signed-off-by: Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
d8a499f17e
commit
4e7fa73ec2
2 changed files with 9 additions and 0 deletions
|
@ -566,6 +566,8 @@ int64_t qemu_clock_get_ns(QEMUClockType type)
|
|||
notifier_list_notify(&clock->reset_notifiers, &now);
|
||||
}
|
||||
return now;
|
||||
case QEMU_CLOCK_VIRTUAL_RT:
|
||||
return cpu_get_clock();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue