aboutsummaryrefslogtreecommitdiff
path: root/hw/virtio/virtio-input-host-pci.c
diff options
context:
space:
mode:
authorNicholas Piggin <npiggin@gmail.com>2023-08-08 14:19:48 +1000
committerCédric Le Goater <clg@kaod.org>2023-09-06 11:19:33 +0200
commiteab0888418ab44344864965193cf6cd194ab6858 (patch)
treea517aca9e3cc6b66cb1073f51227b1566801a9ae /hw/virtio/virtio-input-host-pci.c
parent47de6c4c287079744ceb96f606b3c0457addf380 (diff)
downloadqemu-eab0888418ab44344864965193cf6cd194ab6858.zip
qemu-eab0888418ab44344864965193cf6cd194ab6858.tar.gz
qemu-eab0888418ab44344864965193cf6cd194ab6858.tar.bz2
hw/ppc: Round up the decrementer interval when converting to ns
The rule of timers is typically that they should never expire before the timeout, but some time afterward. Rounding timer intervals up when doing conversion is the right thing to do. Under most circumstances it is impossible observe the decrementer interrupt before the dec register has triggered. However with icount timing, problems can arise. For example setting DEC to 0 can schedule the timer for now, causing it to fire before any more instructions have been executed and DEC is still 0. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Cédric Le Goater <clg@kaod.org>
Diffstat (limited to 'hw/virtio/virtio-input-host-pci.c')
0 files changed, 0 insertions, 0 deletions