From: Ben Luo <bn0418@xxxxxxxxx> When pvtimer is enabled, KVM programs timer to a dedicated CPU through IPI. Whether the vCPU is on the dedicated CPU or any other CPU, the timer interrupt will be delivered properly. No need to migrate timer. Signed-off-by: Yang Zhang <yang.zhang.wz@xxxxxxxxx> Signed-off-by: Quan Xu <quan.xu0@xxxxxxxxx> Signed-off-by: Ben Luo <bn0418@xxxxxxxxx> --- arch/x86/kvm/lapic.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c index 5835a27..265efe6 100644 --- a/arch/x86/kvm/lapic.c +++ b/arch/x86/kvm/lapic.c @@ -2282,7 +2282,7 @@ void __kvm_migrate_apic_timer(struct kvm_vcpu *vcpu) { struct hrtimer *timer; - if (!lapic_in_kernel(vcpu)) + if (!lapic_in_kernel(vcpu) || pv_timer_enabled(vcpu)) return; timer = &vcpu->arch.apic->lapic_timer.timer; -- 1.7.1