* [PATCHv2] correctly trace irq injection on SVM.
@ 2010-05-20 10:31 Gleb Natapov
0 siblings, 0 replies; only message in thread
From: Gleb Natapov @ 2010-05-20 10:31 UTC (permalink / raw)
To: avi, mtosatti; +Cc: kvm
On SVM interrupts are injected by svm_set_irq() not svm_inject_irq().
The later is used only to wait for irq window.
Signed-off-by: Gleb Natapov <gleb@redhat.com>
ChangeLog:
v1->v2:
- fix stupid cut&paste error.
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index 58c91f5..69b16a7 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -2831,8 +2831,6 @@ static inline void svm_inject_irq(struct vcpu_svm *svm, int irq)
{
struct vmcb_control_area *control;
- trace_kvm_inj_virq(irq);
-
++svm->vcpu.stat.irq_injections;
control = &svm->vmcb->control;
control->int_vector = irq;
@@ -2847,6 +2845,8 @@ static void svm_set_irq(struct kvm_vcpu *vcpu)
BUG_ON(!(gif_set(svm)));
+ trace_kvm_inj_virq(vcpu->arch.interrupt.nr);
+
svm->vmcb->control.event_inj = vcpu->arch.interrupt.nr |
SVM_EVTINJ_VALID | SVM_EVTINJ_TYPE_INTR;
}
--
Gleb.
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2010-05-20 10:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-20 10:31 [PATCHv2] correctly trace irq injection on SVM Gleb Natapov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox