Messages in this thread Patch in this message | | | From | Quan Xu <> | Subject | [PATCH RFC 5/7] KVM: timer: ignore timer migration if pvtimer is enabled | Date | Fri, 8 Dec 2017 16:39:48 +0800 |
| |
From: Ben Luo <bn0418@gmail.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@gmail.com> Signed-off-by: Quan Xu <quan.xu0@gmail.com> Signed-off-by: Ben Luo <bn0418@gmail.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
| |