From 2e80a9eb15769443716ebd87eb2567cd0de9c84e Mon Sep 17 00:00:00 2001 From: Dor Laor <[EMAIL PROTECTED]> Date: Thu, 13 Dec 2007 15:07:08 +0200 Subject: [PATCH] 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. Noted by Joerg Roedel for SVM.
Signed-off-by: Dor Laor <[EMAIL PROTECTED]> --- drivers/kvm/vmx.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c index 8e43feb..8375eea 100644 --- a/drivers/kvm/vmx.c +++ b/drivers/kvm/vmx.c @@ -1736,8 +1736,8 @@ static void vmx_inject_irq(struct kvm_vcpu *vcpu, int irq) static void kvm_do_inject_irq(struct kvm_vcpu *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.3.3 ------------------------------------------------------------------------- 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://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace _______________________________________________ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel