]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: lapic: sync highest ISR to hardware apic on EOI
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 14 May 2014 15:40:58 +0000 (17:40 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 27 May 2014 08:21:09 +0000 (10:21 +0200)
commit144bddbc82a7dcd823b794e6583c21924fb82582
treea5147edd2bd218899d250860b5a3df199e3967a4
parent64d5135bbaa330e9371c879b3fc82a6d5761571a
KVM: lapic: sync highest ISR to hardware apic on EOI

When Hyper-V enlightenments are in effect, Windows prefers to issue an
Hyper-V MSR write to issue an EOI rather than an x2apic MSR write.
The Hyper-V MSR write is not handled by the processor, and besides
being slower, this also causes bugs with APIC virtualization.  The
reason is that on EOI the processor will modify the highest in-service
interrupt (SVI) field of the VMCS, as explained in section 29.1.4 of
the SDM; every other step in EOI virtualization is already done by
apic_send_eoi or on VM entry, but this one is missing.

We need to do the same, and be careful not to muck with the isr_count
and highest_isr_cache fields that are unused when virtual interrupt
delivery is enabled.

Cc: stable@vger.kernel.org
Reviewed-by: Yang Zhang <yang.z.zhang@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/lapic.c