linux/arch/x86/kvm/svm
Paolo Bonzini db105fab8d KVM: nSVM: remove useless kvm_clear_*_queue
For an event to be in injected state when nested_svm_vmrun executes,
it must have come from exitintinfo when svm_complete_interrupts ran:

  vcpu_enter_guest
   static_call(kvm_x86_run) -> svm_vcpu_run
    svm_complete_interrupts
     // now the event went from "exitintinfo" to "injected"
   static_call(kvm_x86_handle_exit) -> handle_exit
    svm_invoke_exit_handler
      vmrun_interception
       nested_svm_vmrun

However, no event could have been in exitintinfo before a VMRUN
vmexit.  The code in svm.c is a bit more permissive than the one
in vmx.c:

        if (is_external_interrupt(svm->vmcb->control.exit_int_info) &&
            exit_code != SVM_EXIT_EXCP_BASE + PF_VECTOR &&
            exit_code != SVM_EXIT_NPF && exit_code != SVM_EXIT_TASK_SWITCH &&
            exit_code != SVM_EXIT_INTR && exit_code != SVM_EXIT_NMI)

but in any case, a VMRUN instruction would not even start to execute
during an attempted event delivery.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-08-02 11:02:00 -04:00
..
avic.c KVM: SVM: use vmcb01 in svm_refresh_apicv_exec_ctrl 2021-07-27 16:59:01 -04:00
nested.c KVM: nSVM: remove useless kvm_clear_*_queue 2021-08-02 11:02:00 -04:00
pmu.c KVM: x86/vPMU: Forbid writing to MSR_F15H_PERF MSRs when guest doesn't have X86_FEATURE_PERFCTR_CORE 2021-03-30 13:07:10 -04:00
sev.c KVM: SVM: Stuff save->dr6 at during VMSA sync, not at RESET/INIT 2021-08-02 11:01:56 -04:00
svm_onhyperv.c KVM: SVM: hyper-v: Direct Virtual Flush support 2021-06-17 13:09:38 -04:00
svm_onhyperv.h KVM: SVM: delay svm_vcpu_init_msrpm after svm->vmcb is initialized 2021-07-27 16:59:00 -04:00
svm_ops.h KVM: SVM: use vmsave/vmload for saving/restoring additional host state 2021-02-04 05:27:34 -05:00
svm.c KVM: SVM: Drop redundant clearing of vcpu->arch.hflags at INIT/RESET 2021-08-02 11:01:59 -04:00
svm.h KVM: nSVM: Swap the parameter order for svm_copy_vmrun_state()/svm_copy_vmloadsave_state() 2021-07-26 08:09:46 -04:00
vmenter.S KVM/SVM: Move vmenter.S exception fixups out of line 2021-03-15 04:43:56 -04:00