public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCHv3] correctly trace irq injection on SVM.
@ 2010-05-23 11:28 Gleb Natapov
  2010-05-23 11:29 ` Avi Kivity
  0 siblings, 1 reply; 2+ messages in thread
From: Gleb Natapov @ 2010-05-23 11:28 UTC (permalink / raw)
  To: avi; +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.

 v2->v3:
  - Move also kvm_stat accounting of irq_injections to correct place.

diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index 4af2c12..ebc24b5 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -2919,9 +2919,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;
 	control->int_ctl &= ~V_INTR_PRIO_MASK;
@@ -2935,6 +2932,9 @@ static void svm_set_irq(struct kvm_vcpu *vcpu)
 
 	BUG_ON(!(gif_set(svm)));
 
+	trace_kvm_inj_virq(vcpu->arch.interrupt.nr);
+	++vcpu->stat.irq_injections;
+
 	svm->vmcb->control.event_inj = vcpu->arch.interrupt.nr |
 		SVM_EVTINJ_VALID | SVM_EVTINJ_TYPE_INTR;
 }
--
			Gleb.

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCHv3] correctly trace irq injection on SVM.
  2010-05-23 11:28 [PATCHv3] correctly trace irq injection on SVM Gleb Natapov
@ 2010-05-23 11:29 ` Avi Kivity
  0 siblings, 0 replies; 2+ messages in thread
From: Avi Kivity @ 2010-05-23 11:29 UTC (permalink / raw)
  To: Gleb Natapov; +Cc: kvm

On 05/23/2010 02:28 PM, Gleb Natapov wrote:
> On SVM interrupts are injected by svm_set_irq() not svm_inject_irq().
> The later is used only to wait for irq window.
>    

Applied, thanks.

-- 
error compiling committee.c: too many arguments to function


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-05-23 11:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-23 11:28 [PATCHv3] correctly trace irq injection on SVM Gleb Natapov
2010-05-23 11:29 ` Avi Kivity

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox