[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1512722390-3654-6-git-send-email-quan.xu0@gmail.com>
Date: Fri, 8 Dec 2017 16:39:48 +0800
From: Quan Xu <quan.xu0@...il.com>
To: pbonzini@...hat.com, rkrcmar@...hat.com
Cc: yang.zhang.wz@...il.com, kvm@...r.kernel.org,
linux-kernel@...r.kernel.org, Ben Luo <bn0418@...il.com>,
Quan Xu <quan.xu0@...il.com>
Subject: [PATCH RFC 5/7] KVM: timer: ignore timer migration if pvtimer is enabled
From: Ben Luo <bn0418@...il.com>
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@...il.com>
Signed-off-by: Quan Xu <quan.xu0@...il.com>
Signed-off-by: Ben Luo <bn0418@...il.com>
---
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
Powered by blists - more mailing lists