[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [patch] option -no-tsc for i386 with speedstep
From: |
Massimo Dal Zotto |
Subject: |
Re: [Qemu-devel] [patch] option -no-tsc for i386 with speedstep |
Date: |
Mon, 25 Apr 2005 19:44:59 +0200 |
User-agent: |
Mutt/1.5.6+20040523i |
On Mon, Apr 25, 2005 at 01:07:52PM -0400, Jim C. Brown wrote:
>
> I just want to point out that your patches break qemu for almost every
> platform other than i386.
>
> You probably want to do this, because notsc is only declared for the i386
> platform.
>
> int64_t cpu_get_real_ticks(void)
> {
> int64_t val;
> +#ifdef __i386__
> + if (notsc) {
> + return get_clock();
> + }
> +#endif
> asm volatile ("rdtsc" : "=A" (val));
> return val;
> }
>
Correct, I forgot the #ifdef inside that function.
I made also some more tests and it turned out that my patch works but
not as expected. The clock now runs at constant rate at any speedstep
frequency, which is what I wanted, but unfortunately it is always ~20%
slower than wall clock.
I tried also to force different values of ticks_per_sec but it seems
that it has no effects on irq frequency, so there must be something that
I don't understand in the timer code.
Any idea on how to fix this bug?
--
Massimo Dal Zotto <address@hidden>
Re: [Qemu-devel] [patch] option -no-tsc for i386 with speedstep, Kyle Hayes, 2005/04/25