Skip to contentSkip to conversation

SVM: inject high priority interrupts first

PATCH New Joerg Roedel 1 participant 1 message Dec 11, 2007 KVM

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 SVM: inject high priority interrupts first

This patch changes the order in which interrupts are injected when the in-kernel APIC is disabled. Now the IRQ with the highest priority is injected first.

---
 drivers/kvm/svm.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/kvm/svm.c +2 -2
index 839a75f..59ec261 100644
@@ -1389,8 +1389,8 @@ static void kvm_reput_irq(struct vcpu_svm *svm)
 static void svm_do_inject_vector(struct vcpu_svm *svm)
 {
 	struct kvm_vcpu *vcpu = &svm->vcpu;
-	int word_index = __ffs(vcpu->irq_summary);
-	int bit_index = __ffs(vcpu->irq_pending[word_index]);
+	int word_index = __fls(vcpu->irq_summary);
+	int bit_index = __fls(vcpu->irq_pending[word_index]);
 	int irq = word_index * BITS_PER_LONG + bit_index;
 
 	clear_bit(bit_index, &vcpu->irq_pending[word_index]);
Signature · 11 lines
1.5.2.5




-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php