1. 22 4月, 2013 14 次提交
  2. 18 4月, 2013 2 次提交
  3. 17 4月, 2013 14 次提交
  4. 16 4月, 2013 7 次提交
  5. 14 4月, 2013 3 次提交
    • J
      KVM: nVMX: Avoid reading VM_EXIT_INTR_ERROR_CODE needlessly on nested exits · c0d1c770
      Jan Kiszka 提交于
      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: NJan Kiszka <jan.kiszka@siemens.com>
      Signed-off-by: NGleb Natapov <gleb@redhat.com>
      c0d1c770
    • J
      KVM: nVMX: Fix conditions for interrupt injection · e8457c67
      Jan Kiszka 提交于
      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: NJan Kiszka <jan.kiszka@siemens.com>
      Signed-off-by: NGleb Natapov <gleb@redhat.com>
      e8457c67
    • J
      KVM: nVMX: Rework event injection and recovery · 5f3d5799
      Jan Kiszka 提交于
      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: NJan Kiszka <jan.kiszka@siemens.com>
      Signed-off-by: NGleb Natapov <gleb@redhat.com>
      5f3d5799