From 829600a519386c7b188d5d813e78ba69bf0bd323 Mon Sep 17 00:00:00 2001 From: Pavel Dovgalyuk Date: Thu, 11 Jan 2018 11:24:58 +0300 Subject: hpet: recover timer offset correctly 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 Signed-off-by: Maria Klimushenkova Reviewed-by: Juan Quintela -- v3: Added compat property for correct migration. Signed-off-by: Paolo Bonzini --- include/hw/compat.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'include/hw/compat.h') diff --git a/include/hw/compat.h b/include/hw/compat.h index 263de973a7..7f31850dfa 100644 --- a/include/hw/compat.h +++ b/include/hw/compat.h @@ -2,7 +2,11 @@ #define HW_COMPAT_H #define HW_COMPAT_2_11 \ - /* empty */ + {\ + .driver = "hpet",\ + .property = "hpet-offset-saved",\ + .value = "false",\ + }, #define HW_COMPAT_2_10 \ {\ -- cgit v1.2.3-55-g7522