[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] Migrating decrementer
From: |
Mark Cave-Ayland |
Subject: |
Re: [Qemu-ppc] Migrating decrementer |
Date: |
Thu, 25 Feb 2016 09:50:20 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.5.0 |
On 25/02/16 05:00, Mark Cave-Ayland wrote:
> On 25/02/16 04:33, Mark Cave-Ayland wrote:
>
>> cpu_start/resume():
>> cpu->tb_env->tb_offset =
>> qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) * tb_env->tb_freq +
>> cpu->tb_env->tb_offset -
>> qemu_clock_get_ns(QEMU_CLOCK_HOST)
>
> Actually just realised this is slightly wrong and in fact should be:
>
> cpu_start/resume():
> cpu->tb_env->tb_offset =
> muldiv64(qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL),
> cpu->tb_env->tb_freq, NANOSECONDS_PER_SECOND) +
> cpu->tb_env->tb_offset -
> qemu_clock_get_ns(QEMU_CLOCK_HOST)
Sign. And let me try that again, this time after caffeine:
cpu_start/resume():
cpu->tb_env->tb_offset =
muldiv64(qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL),
cpu->tb_env->tb_freq, NANOSECONDS_PER_SECOND) +
cpu->tb_env->tb_offset -
cpu_get_host_ticks();
This should translate to: at CPU start, calculate the difference between
the current guest virtual timebase and the host timebase, storing the
difference in cpu->tb_env->tb_offset.
ATB,
Mark.
- Re: [Qemu-ppc] [Qemu-devel] Migrating decrementer, Mark Cave-Ayland, 2016/02/02
- Re: [Qemu-ppc] [Qemu-devel] Migrating decrementer, David Gibson, 2016/02/02
- Re: [Qemu-ppc] [Qemu-devel] Migrating decrementer, Alexander Graf, 2016/02/03
- Re: [Qemu-ppc] [Qemu-devel] Migrating decrementer, Mark Cave-Ayland, 2016/02/23
- Re: [Qemu-ppc] [Qemu-devel] Migrating decrementer, David Gibson, 2016/02/23
- Re: [Qemu-ppc] Migrating decrementer, Juan Quintela, 2016/02/24
- Re: [Qemu-ppc] Migrating decrementer, David Gibson, 2016/02/24
- Re: [Qemu-ppc] Migrating decrementer, Mark Cave-Ayland, 2016/02/24
- Re: [Qemu-ppc] Migrating decrementer, Mark Cave-Ayland, 2016/02/25
- Re: [Qemu-ppc] Migrating decrementer,
Mark Cave-Ayland <=
- Re: [Qemu-ppc] Migrating decrementer, David Gibson, 2016/02/25
- Re: [Qemu-ppc] [Qemu-devel] Migrating decrementer, Mark Cave-Ayland, 2016/02/26
- Re: [Qemu-ppc] [Qemu-devel] Migrating decrementer, David Gibson, 2016/02/29
- Re: [Qemu-ppc] [Qemu-devel] Migrating decrementer, Mark Cave-Ayland, 2016/02/29