lkml.org 
[lkml]   [2017]   [Dec]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH RFC 5/7] KVM: timer: ignore timer migration if pvtimer is enabled
    Date
    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
    \
     
     \ /
      Last update: 2017-12-08 09:42    [W:4.593 / U:0.016 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site