]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: nVMX: Fix conditions for interrupt injection
authorJan Kiszka <jan.kiszka@siemens.com>
Sun, 14 Apr 2013 10:12:48 +0000 (12:12 +0200)
committerGleb Natapov <gleb@redhat.com>
Sun, 14 Apr 2013 15:27:09 +0000 (18:27 +0300)
commitd0bb374ac9dd702259c1f15ce4b9b501f1493561
tree31d8b6de0839c80fd31a0641fb60d6fdeacf74d7
parenta6b97e46c1a24e5c71e2be7a1285a42162720893
KVM: nVMX: Fix conditions for interrupt injection

If we are entering guest mode, we do not want L0 to interrupt this
vmentry with all its side effects on the vmcs. Therefore, injection
shall be disallowed during L1->L2 transitions, as in the previous
version. However, this check is conceptually independent of
nested_exit_on_intr, so decouple it.

If L1 traps external interrupts, we can kick the guest from L2 to L1,
also just like the previous code worked. But we no longer need to
consider L1's idt_vectoring_info_field. It will always be empty at this
point. Instead, if L2 has pending events, those are now found in the
architectural queues and will, thus, prevent vmx_interrupt_allowed from
being called at all.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Gleb Natapov <gleb@redhat.com>
arch/x86/kvm/vmx.c