1. 22 Apr, 2013 14 commits
  2. 18 Apr, 2013 2 commits
  3. 17 Apr, 2013 4 commits
  4. 16 Apr, 2013 17 commits
  5. 14 Apr, 2013 3 commits
    • Jan Kiszka's avatar
      KVM: nVMX: Avoid reading VM_EXIT_INTR_ERROR_CODE needlessly on nested exits · c0d1c770
      Jan Kiszka authored
      We only need to update vm_exit_intr_error_code if there is a valid exit
      interruption information and it comes with a valid error code.
      Signed-off-by: default avatarJan Kiszka <jan.kiszka@siemens.com>
      Signed-off-by: default avatarGleb Natapov <gleb@redhat.com>
      c0d1c770
    • Jan Kiszka's avatar
      KVM: nVMX: Fix conditions for interrupt injection · e8457c67
      Jan Kiszka authored
      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: default avatarJan Kiszka <jan.kiszka@siemens.com>
      Signed-off-by: default avatarGleb Natapov <gleb@redhat.com>
      e8457c67
    • Jan Kiszka's avatar
      KVM: nVMX: Rework event injection and recovery · 5f3d5799
      Jan Kiszka authored
      The basic idea is to always transfer the pending event injection on
      vmexit into the architectural state of the VCPU and then drop it from
      there if it turns out that we left L2 to enter L1, i.e. if we enter
      prepare_vmcs12.
      
      vmcs12_save_pending_events takes care to transfer pending L0 events into
      the queue of L1. That is mandatory as L1 may decide to switch the guest
      state completely, invalidating or preserving the pending events for
      later injection (including on a different node, once we support
      migration).
      
      This concept is based on the rule that a pending vmlaunch/vmresume is
      not canceled. Otherwise, we would risk to lose injected events or leak
      them into the wrong queues. Encode this rule via a WARN_ON_ONCE at the
      entry of nested_vmx_vmexit.
      Signed-off-by: default avatarJan Kiszka <jan.kiszka@siemens.com>
      Signed-off-by: default avatarGleb Natapov <gleb@redhat.com>
      5f3d5799