]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: LAPIC: cap __delay at lapic_timer_advance_ns
authorMarcelo Tosatti <mtosatti@redhat.com>
Tue, 21 Jun 2016 01:33:48 +0000 (22:33 -0300)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 27 Jun 2016 13:30:41 +0000 (15:30 +0200)
commit1686b28cdb27b1549f14055ef54a01b0808fc505
tree20a06328aec2cbd036406e0e701cd21324a5f9fc
parentb34578f8a8a5c4a43c223988b45717346045f513
KVM: LAPIC: cap __delay at lapic_timer_advance_ns

The host timer which emulates the guest LAPIC TSC deadline
timer has its expiration diminished by lapic_timer_advance_ns
nanoseconds. Therefore if, at wait_lapic_expire, a difference
larger than lapic_timer_advance_ns is encountered, delay at most
lapic_timer_advance_ns.

This fixes a problem where the guest can cause the host
to delay for large amounts of time.

Reported-by: Alan Jenkins <alan.christopher.jenkins@gmail.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/lapic.c