qemu-stable
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] hw/ppc: Fix clock update drift


From: Cédric Le Goater
Subject: Re: [PATCH] hw/ppc: Fix clock update drift
Date: Thu, 29 Jun 2023 09:34:08 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0

On 6/29/23 09:04, Frederic Barrat wrote:


On 29/06/2023 04:07, Nicholas Piggin wrote:
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
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---


Nice! It must have been a nightmare to debug.
Do you know where that ATB spr comes from? I can't relate it to the ISA.

You should look at the e500 CPU (BookE) specs.

C.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]