[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3] hpet: recover timer offset correctly
From: |
Juan Quintela |
Subject: |
Re: [Qemu-devel] [PATCH v3] hpet: recover timer offset correctly |
Date: |
Wed, 10 Jan 2018 11:47:13 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) |
Pavel Dovgalyuk <address@hidden> wrote:
> HPET saves its state by calculating the current time and recovers timer
> offset using this calculated value. But these calculations include
> divisions and multiplications. Therefore the timer state cannot be recovered
> precise enough.
> This patch introduces saving of the original value of the offset to
> preserve the determinism of the timer.
>
> Signed-off-by: Pavel Dovgalyuk <address@hidden>
> Signed-off-by: Maria Klimushenkova <address@hidden>
> Reviewed-by: Juan Quintela <address@hidden>
>
> --
> v3: Added compat property for correct migration.
Yeap, Much better.
> @@ -762,6 +787,7 @@ static Property hpet_device_properties[] = {
> DEFINE_PROP_UINT8("timers", HPETState, num_timers, HPET_MIN_TIMERS),
> DEFINE_PROP_BIT("msi", HPETState, flags, HPET_MSI_SUPPORT, false),
> DEFINE_PROP_UINT32(HPET_INTCAP, HPETState, intcap, 0),
> + DEFINE_PROP_BOOL("hpet-offset-saved", HPETState, hpet_offset_saved,
> true),
> DEFINE_PROP_END_OF_LIST(),
> };
I am thinking about the name, but I can't suggest anything else that is
short and descriptive, so ....
Later, Juan.