Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1675960
| From | Paolo Bonzini <pbonzini@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2] KVM: LAPIC: Fix lapic timer injection delay |
| Date | 2017-06-27 18:20 +0200 |
| Message-ID | <tX1nA-2Ys-25@gated-at.bofh.it> (permalink) |
| References | <tVvzs-1Yc-23@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 23/06/2017 13:59, Wanpeng Li wrote: > From: Wanpeng Li <wanpeng.li@hotmail.com> > > Linux as a guest will prevent to program the next event to the clock event > device when the event is in the past. However, it is not guaranteed by all > the guests, the guest like kvm-unit-tests/apic.flat will write current tsc > value visible in guest to MSR_IA32_TSCDEADLINE, lapic timer which is emulated > by vmx preemption timer will program the absolute target tsc value to vmcs > preemption timer field w/ delta == 0, then plays a vmentry and an upcoming > vmx preemption timer fire vmexit dance, the lapic timer injection is delayed > for this duration. Actually the lapic timer which is emulated by hrtimer can > handle this correctly. > > This patch fixes it by firing the lapic timer and injecting a timer interrupt > immediately during the next vmentry if guest programs an expired timer to > the emulated timer device. This saves ~300 cycles on the tsc_deadline_timer > test of apic.flat. If it doesn't matter for actual guests, I'd rather not complicate the logic. Paolo
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2] KVM: LAPIC: Fix lapic timer injection delay Wanpeng Li <kernellwp@gmail.com> - 2017-06-23 14:10 +0200
Re: [PATCH v2] KVM: LAPIC: Fix lapic timer injection delay Paolo Bonzini <pbonzini@redhat.com> - 2017-06-27 18:20 +0200
Re: [PATCH v2] KVM: LAPIC: Fix lapic timer injection delay Wanpeng Li <kernellwp@gmail.com> - 2017-06-28 00:10 +0200
Re: [PATCH v2] KVM: LAPIC: Fix lapic timer injection delay Wanpeng Li <kernellwp@gmail.com> - 2017-06-28 00:20 +0200
csiph-web