diff options
author | Gleb Natapov <gleb@redhat.com> | 2009-03-22 06:37:05 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2009-06-10 04:48:30 -0400 |
commit | 61c50edfcd40be9126579f9cec68c789b6089998 (patch) | |
tree | c6d89f8b244ecbf6960c1a875700d0cc6ba94142 /arch/x86/kvm/svm.c | |
parent | 7fe29e0faacb650d31b9e9f538203a157bec821d (diff) |
KVM: SVM: Remove duplicate code in svm_do_inject_vector()
svm_do_inject_vector() reimplements pop_irq().
Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kvm/svm.c')
-rw-r--r-- | arch/x86/kvm/svm.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index 1f8510c51d6e..5b35ebd4ec88 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c | |||
@@ -2346,15 +2346,7 @@ static void kvm_reput_irq(struct vcpu_svm *svm) | |||
2346 | 2346 | ||
2347 | static void svm_do_inject_vector(struct vcpu_svm *svm) | 2347 | static void svm_do_inject_vector(struct vcpu_svm *svm) |
2348 | { | 2348 | { |
2349 | struct kvm_vcpu *vcpu = &svm->vcpu; | 2349 | svm_inject_irq(svm, pop_irq(&svm->vcpu)); |
2350 | int word_index = __ffs(vcpu->arch.irq_summary); | ||
2351 | int bit_index = __ffs(vcpu->arch.irq_pending[word_index]); | ||
2352 | int irq = word_index * BITS_PER_LONG + bit_index; | ||
2353 | |||
2354 | clear_bit(bit_index, &vcpu->arch.irq_pending[word_index]); | ||
2355 | if (!vcpu->arch.irq_pending[word_index]) | ||
2356 | clear_bit(word_index, &vcpu->arch.irq_summary); | ||
2357 | svm_inject_irq(svm, irq); | ||
2358 | } | 2350 | } |
2359 | 2351 | ||
2360 | static void do_interrupt_requests(struct kvm_vcpu *vcpu, | 2352 | static void do_interrupt_requests(struct kvm_vcpu *vcpu, |