diff options
author | Bibo Mao <maobibo@loongson.cn> | 2023-12-19 05:48:28 +0300 |
---|---|---|
committer | Huacai Chen <chenhuacai@loongson.cn> | 2023-12-19 05:48:28 +0300 |
commit | 1ab9c6099495f79bfbcd6058d02d7556034a89b0 (patch) | |
tree | 14e7f88e5d27e2cb1e221650393e80bb9d63c4a0 /arch/loongarch/include | |
parent | 0d2abe67029644741bf7400b0d00c2faa3e1c455 (diff) | |
download | linux-1ab9c6099495f79bfbcd6058d02d7556034a89b0.tar.xz |
LoongArch: KVM: Remove kvm_acquire_timer() before entering guest
Timer emulation method in VM is switch to SW timer, there are two
places where timer emulation is needed. One is during vcpu thread
context switch, the other is halt-polling with idle instruction
emulation. SW timer switching is removed during halt-polling mode,
so it is not necessary to disable SW timer before entering to guest.
This patch removes SW timer handling before entering guest mode, and
put it in HW timer restoring flow when vcpu thread is sched-in. With
this patch, vm timer emulation is simpler, there is SW/HW timer
switch only in vcpu thread context switch scenario.
Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Diffstat (limited to 'arch/loongarch/include')
-rw-r--r-- | arch/loongarch/include/asm/kvm_vcpu.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/arch/loongarch/include/asm/kvm_vcpu.h b/arch/loongarch/include/asm/kvm_vcpu.h index 553cfa2b2b1c..0e87652f780a 100644 --- a/arch/loongarch/include/asm/kvm_vcpu.h +++ b/arch/loongarch/include/asm/kvm_vcpu.h @@ -55,7 +55,6 @@ void kvm_save_fpu(struct loongarch_fpu *fpu); void kvm_restore_fpu(struct loongarch_fpu *fpu); void kvm_restore_fcsr(struct loongarch_fpu *fpu); -void kvm_acquire_timer(struct kvm_vcpu *vcpu); void kvm_init_timer(struct kvm_vcpu *vcpu, unsigned long hz); void kvm_reset_timer(struct kvm_vcpu *vcpu); void kvm_save_timer(struct kvm_vcpu *vcpu); |