LoongArch: KVM: Do not restart SW timer when it is expired
authorBibo Mao <maobibo@loongson.cn>
Wed, 6 Mar 2024 01:12:13 +0000 (09:12 +0800)
committerHuacai Chen <chenhuacai@loongson.cn>
Wed, 6 Mar 2024 01:12:13 +0000 (09:12 +0800)
commitf66228053e429bd926505c447d3af2d3d610ed92
tree59e66a290de2ff084a70c298b0b039c54675df68
parent8bc15d02d5fdff31bfeca02e58e22e26880dde39
LoongArch: KVM: Do not restart SW timer when it is expired

LoongArch VCPUs have their own separate HW timers. SW timer is to wake
up blocked vcpu thread, rather than HW timer emulation. When blocking
vcpu scheduled out, SW timer is used to wakeup blocked vcpu thread and
injects timer interrupt. It does not care about whether guest timer is
in period mode or oneshot mode, and SW timer needs not to be restarted
since vcpu has been woken.

This patch does not restart SW timer when it is expired.

Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
arch/loongarch/kvm/timer.c