diff options
author | Nicholas Piggin <npiggin@gmail.com> | 2023-06-29 12:07:13 +1000 |
---|---|---|
committer | Daniel Henrique Barboza <danielhb413@gmail.com> | 2023-07-07 04:18:26 -0300 |
commit | 2ad2e113deb5663e69a05dd6922cbfc6d7ea34d3 (patch) | |
tree | d0feab9444b294d4702f5fc34601e319a3f855ed /hw/ppc/ppc4xx_pci.c | |
parent | a5ff7875a9e50180c354471f931f863a26283ce1 (diff) | |
download | qemu-2ad2e113deb5663e69a05dd6922cbfc6d7ea34d3.zip qemu-2ad2e113deb5663e69a05dd6922cbfc6d7ea34d3.tar.gz qemu-2ad2e113deb5663e69a05dd6922cbfc6d7ea34d3.tar.bz2 |
hw/ppc: Fix clock update drift
The clock update logic reads the clock twice to compute the new clock
value, with a value derived from the later time subtracted from a value
derived from the earlier time. The delta causes time to be lost.
This can ultimately result in time becoming unsynchronized between CPUs
and that can cause OS lockups, timeouts, watchdogs, etc. This can be
seen running a KVM guest (that causes lots of TB updates) on a powernv
SMP machine.
Fix this by reading the clock once.
Cc: qemu-stable@nongnu.org
Fixes: dbdd25065e90 ("Implement time-base start/stop helpers.")
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Frederic Barrat <fbarrat@linux.ibm.com>
Message-ID: <20230629020713.327745-1-npiggin@gmail.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Diffstat (limited to 'hw/ppc/ppc4xx_pci.c')
0 files changed, 0 insertions, 0 deletions