KVM: PPC: Book3S HV P9: Reduce irq_work vs guest decrementer races
authorNicholas Piggin <npiggin@gmail.com>
Fri, 28 May 2021 09:07:30 +0000 (19:07 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 10 Jun 2021 12:12:13 +0000 (22:12 +1000)
commit6ffe2c6e6dcefb971e4046f02086c4adadd0b310
tree43d7e2faab8483ebd512150de075fdcc3b1b2b46
parent413679e73bdfc2720dc2fa2172b65b7411185fa7
KVM: PPC: Book3S HV P9: Reduce irq_work vs guest decrementer races

irq_work's use of the DEC SPR is racy with guest<->host switch and guest
entry which flips the DEC interrupt to guest, which could lose a host
work interrupt.

This patch closes one race, and attempts to comment another class of
races.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210528090752.3542186-11-npiggin@gmail.com
arch/powerpc/include/asm/time.h
arch/powerpc/kernel/time.c
arch/powerpc/kvm/book3s_hv.c