* Re: Question about hrtimer_restart apic_timer_fn in lapic.c [not found] <549319DD.1020908@gmail.com> @ 2014-12-19 11:28 ` Paolo Bonzini [not found] ` <5494304F.30802@gmail.com> 0 siblings, 1 reply; 3+ messages in thread From: Paolo Bonzini @ 2014-12-19 11:28 UTC (permalink / raw) To: nick, gleb; +Cc: tglx, mingo, hpa, x86, kvm, linux-kernel On 18/12/2014 19:15, nick wrote: > /* > * There is a race window between reading and incrementing, but we do > * not care about potentially losing timer events in the !reinject > * case anyway. Note: KVM_REQ_PENDING_TIMER is implicitly checked > * in vcpu_enter_guest. > */ > if (!atomic_read(&ktimer->pending)) { > atomic_inc(&ktimer->pending); > /* FIXME: this code should not know anything about vcpus */ > kvm_make_request(KVM_REQ_PENDING_TIMER, vcpu); > } > > if (waitqueue_active(q)) > wake_up_interruptible(q); > > if (lapic_is_periodic(apic)) { > hrtimer_add_expires_ns(&ktimer->timer, ktimer->period); > return HRTIMER_RESTART; > } else > return HRTIMER_NORESTART; > } > What is point of the comment, clearly we need access to vcpu in the call as it's a pointer to the apic structure's vcpu > and we need to call on that particular CPU a request of KVM_REQ_PENDING_TIMER? Please let me known if I am missing any > important information. The idea is that there should be a function in x86.c (something like kvm_vcpu_set_pending_timer) that calls kvm_make_request, instead of doing it in lapic.c. Paolo ^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <5494304F.30802@gmail.com>]
* Re: Question about hrtimer_restart apic_timer_fn in lapic.c [not found] ` <5494304F.30802@gmail.com> @ 2014-12-19 14:12 ` Paolo Bonzini [not found] ` <5494393D.3070904@gmail.com> 0 siblings, 1 reply; 3+ messages in thread From: Paolo Bonzini @ 2014-12-19 14:12 UTC (permalink / raw) To: nick, gleb; +Cc: tglx, mingo, hpa, x86, kvm, linux-kernel On 19/12/2014 15:03, nick wrote: > Paolo, > If that is the case why don't I just move this function over if we don't need it in this file into x86.c. > This seems to be the easiest solution from my understanding. > Regards, Only that line would have to be moved to x86.c. You can send a patch for that. Paolo ^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <5494393D.3070904@gmail.com>]
* Re: Question about hrtimer_restart apic_timer_fn in lapic.c [not found] ` <5494393D.3070904@gmail.com> @ 2014-12-19 14:42 ` Paolo Bonzini 0 siblings, 0 replies; 3+ messages in thread From: Paolo Bonzini @ 2014-12-19 14:42 UTC (permalink / raw) To: nick, gleb; +Cc: tglx, mingo, hpa, x86, kvm, linux-kernel On 19/12/2014 15:42, nick wrote: > Sorry Paolo, > I am confused of where you would want me to move it as I looked around and there seems to be no real place to > put it. To a new function called kvm_vcpu_set_pending_timer. Paolo ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-12-19 14:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <549319DD.1020908@gmail.com>
2014-12-19 11:28 ` Question about hrtimer_restart apic_timer_fn in lapic.c Paolo Bonzini
[not found] ` <5494304F.30802@gmail.com>
2014-12-19 14:12 ` Paolo Bonzini
[not found] ` <5494393D.3070904@gmail.com>
2014-12-19 14:42 ` Paolo Bonzini
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox