* [PATCH] SVM: inject high priority interrupts first
@ 2007-12-11 20:01 Joerg Roedel
0 siblings, 0 replies; only message in thread
From: Joerg Roedel @ 2007-12-11 20:01 UTC (permalink / raw)
To: Avi Kivity
Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, Joerg Roedel,
Markus Rechberger
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.
Signed-off-by: Joerg Roedel <joerg.roedel-5C7GfCeVMHo@public.gmane.org>
Signed-off-by: Markus Rechberger <markus.rechberger-5C7GfCeVMHo@public.gmane.org>
---
drivers/kvm/svm.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/kvm/svm.c b/drivers/kvm/svm.c
index 839a75f..59ec261 100644
--- a/drivers/kvm/svm.c
+++ b/drivers/kvm/svm.c
@@ -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]);
--
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2007-12-11 20:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-11 20:01 [PATCH] SVM: inject high priority interrupts first Joerg Roedel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox