mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 17:53:56 -06:00
new clock logic: cpu ticks and virtual clocks are no longer proportional - added timestamps on the stdio console
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2049 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
effedbc915
commit
1dce7c3c22
4 changed files with 192 additions and 226 deletions
13
hw/pc.c
13
hw/pc.c
|
@ -58,10 +58,19 @@ static void ioportF0_write(void *opaque, uint32_t addr, uint32_t data)
|
|||
}
|
||||
|
||||
/* TSC handling */
|
||||
|
||||
uint64_t cpu_get_tsc(CPUX86State *env)
|
||||
{
|
||||
return qemu_get_clock(vm_clock);
|
||||
/* Note: when using kqemu, it is more logical to return the host TSC
|
||||
because kqemu does not trap the RDTSC instruction for
|
||||
performance reasons */
|
||||
#if USE_KQEMU
|
||||
if (env->kqemu_enabled) {
|
||||
return cpu_get_real_ticks();
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
return cpu_get_ticks();
|
||||
}
|
||||
}
|
||||
|
||||
/* IRQ handling */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue