]> git.itanic.dy.fi Git - linux-stable/commit
KVM: PPC: Book3S HV: Context tracking exit guest context before enabling irqs
authorNicholas Piggin <npiggin@gmail.com>
Sat, 30 Jan 2021 13:08:12 +0000 (23:08 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 Sep 2022 12:16:55 +0000 (14:16 +0200)
commit6bae47548188ae957578e6d92d4b8753dec435e4
tree1b238b3c81c5f335279de96fbe07bbcb1ef3ac1c
parent99c2dfe47a9c6613e040f1721368c2c298383257
KVM: PPC: Book3S HV: Context tracking exit guest context before enabling irqs

[ Upstream commit 112665286d08c87e66d699e7cba43c1497ad165f ]

Interrupts that occur in kernel mode expect that context tracking
is set to kernel. Enabling local irqs before context tracking
switches from guest to host means interrupts can come in and trigger
warnings about wrong context, and possibly worse.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210130130852.2952424-3-npiggin@gmail.com
Stable-dep-of: 235cee162459 ("KVM: PPC: Tick accounting should defer vtime accounting 'til after IRQ handling")
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/powerpc/kvm/book3s_hv.c