]> 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)
commit1d8f6147e28768d15e874c2bba2583d15dd357c9
tree31d8b6de0839c80fd31a0641fb60d6fdeacf74d7
parentc69f4060ea7b71b2a2ed332d6626ea71f3a9fce6
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