[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <12d7651f-868e-aaec-6e91-a53f9819d817@redhat.com>
Date: Fri, 6 Oct 2017 16:51:57 +0200
From: Paolo Bonzini <pbonzini@...hat.com>
To: Wanpeng Li <kernellwp@...il.com>, linux-kernel@...r.kernel.org,
kvm@...r.kernel.org
Cc: Radim Krčmář <rkrcmar@...hat.com>,
Wanpeng Li <wanpeng.li@...mail.com>
Subject: Re: [PATCH v8] KVM: LAPIC: Apply change to TDCR right away to the
timer
On 06/10/2017 16:38, Wanpeng Li wrote:
> + now = ktime_get();
> + remaining = ktime_sub(apic->lapic_timer.target_expiration, now);
Still need to compare against zero here. I guess Radim can do it.
Paolo
> + ns_remaining_old = ktime_to_ns(remaining);
> + ns_remaining_new = mul_u64_u32_div(ns_remaining_old,
> + apic->divide_count, old_divisor);
> +
> + apic->lapic_timer.tscdeadline += nsec_to_cycles(apic->vcpu, ns_remaining_new) -
> + nsec_to_cycles(apic->vcpu, ns_remaining_old);
> + apic->lapic_timer.target_expiration = ktime_add_ns(now, ns_remaining_new);
Powered by blists - more mailing lists