On Wed, 2 Sept 2026 at 13:27, Igor Mammedov <[email protected]> wrote: > > According to spec[1]: > > "The compare value can either be loaded directly or indirectly on an > explicit refresh or timeout refresh" > > QEMU accepts writes to WCV but doesn't reschedule the timer, > which it should per the spec pseudo code: > > "TimeoutRefresh = ( SystemCounter [63:0] > CompareValue [63:0])" > > Fix it by updating the timer on WCV write. > > partialy[2] fixes Windows in GTDT mode, which never issues a WRR refresh. > Instead, it programs WOR to ~4 sec, enables WCS, and immediately > writes a large absolute value into WCV to push the timeout far > into the future. Without this, QEMU ignores the WCV write, > the short WOR expires, and the guest reboots unexpectedly. > > 1) ArmĀ® Server Base System Architecture 6.0 > Platform Design Document > DEN0029D 6.0 > "A.2 Watchdog Operation" > 2) under KVM system counter (CNTPCT) as read by guest apprears to > produce host's value, so watchdog timeout effectively gets > extended on host uptime offset. But that's a separate issue > to be fixed. > > Signed-off-by: Igor Mammedov <[email protected]>
Reviewed-by: Peter Maydell <[email protected]> thanks -- PMM
