summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPavel Dovgalyuk2018-01-11 09:24:58 +0100
committerPaolo Bonzini2018-01-12 13:22:02 +0100
commit829600a519386c7b188d5d813e78ba69bf0bd323 (patch)
tree9a6e6fe965845a0d23623b45b3c04bd4fd786c96 /include
parentpc: fail memory hot-plug/unplug with -no-acpi and Q35 machine type (diff)
downloadqemu-829600a519386c7b188d5d813e78ba69bf0bd323.tar.gz
qemu-829600a519386c7b188d5d813e78ba69bf0bd323.tar.xz
qemu-829600a519386c7b188d5d813e78ba69bf0bd323.zip
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 <pavel.dovgaluk@ispras.ru> Signed-off-by: Maria Klimushenkova <maria.klimushenkova@ispras.ru> Reviewed-by: Juan Quintela <quintela@redhat.com> -- v3: Added compat property for correct migration. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/hw/compat.h6
1 files changed, 5 insertions, 1 deletions
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 \
{\