LoongArch: KVM: Fix PMU pass-through issue if VM exits to host finally
authorBibo Mao <maobibo@loongson.cn>
Thu, 24 Apr 2025 12:15:52 +0000 (20:15 +0800)
committerHuacai Chen <chenhuacai@loongson.cn>
Sat, 26 Apr 2025 01:58:13 +0000 (09:58 +0800)
commit5add0dbbebd60628b55e5eb8426612dedab7311a
tree6d0e9c3624fae827bb8818d6bbbe43bbcb6b4fef
parent9ea86232a5520d9d21832d06031ea80f055a6ff8
LoongArch: KVM: Fix PMU pass-through issue if VM exits to host finally

In function kvm_pre_enter_guest(), it prepares to enter guest and check
whether there are pending signals or events. And it will not enter guest
if there are, PMU pass-through preparation for guest should be cancelled
and host should own PMU hardware.

Cc: stable@vger.kernel.org
Fixes: f4e40ea9f78f ("LoongArch: KVM: Add PMU support for guest")
Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
arch/loongarch/kvm/vcpu.c