diff options
author | Sheng Yang <sheng@linux.intel.com> | 2009-02-11 03:03:39 -0500 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2009-06-10 04:48:22 -0400 |
commit | 110c2faeba1f1994bcb1de55b9c31f4147dbfdb6 (patch) | |
tree | 09e385a29bd2877a8099284ebbb225cf4da7eb64 /arch/x86 | |
parent | e5871be0f5d6847bc9585c997acb1b917c168f03 (diff) |
KVM: Update intr delivery func to accept unsigned long* bitmap
Would be used with bit ops, and would be easily extended if KVM_MAX_VCPUS is
increased.
Signed-off-by: Sheng Yang <sheng@linux.intel.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/kvm/lapic.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c index f0b67f2cdd69..6aa8d20f9eeb 100644 --- a/arch/x86/kvm/lapic.c +++ b/arch/x86/kvm/lapic.c | |||
@@ -409,7 +409,7 @@ static int __apic_accept_irq(struct kvm_lapic *apic, int delivery_mode, | |||
409 | } | 409 | } |
410 | 410 | ||
411 | static struct kvm_lapic *kvm_apic_round_robin(struct kvm *kvm, u8 vector, | 411 | static struct kvm_lapic *kvm_apic_round_robin(struct kvm *kvm, u8 vector, |
412 | unsigned long bitmap) | 412 | unsigned long *bitmap) |
413 | { | 413 | { |
414 | int last; | 414 | int last; |
415 | int next; | 415 | int next; |
@@ -421,7 +421,7 @@ static struct kvm_lapic *kvm_apic_round_robin(struct kvm *kvm, u8 vector, | |||
421 | do { | 421 | do { |
422 | if (++next == KVM_MAX_VCPUS) | 422 | if (++next == KVM_MAX_VCPUS) |
423 | next = 0; | 423 | next = 0; |
424 | if (kvm->vcpus[next] == NULL || !test_bit(next, &bitmap)) | 424 | if (kvm->vcpus[next] == NULL || !test_bit(next, bitmap)) |
425 | continue; | 425 | continue; |
426 | apic = kvm->vcpus[next]->arch.apic; | 426 | apic = kvm->vcpus[next]->arch.apic; |
427 | if (apic && apic_enabled(apic)) | 427 | if (apic && apic_enabled(apic)) |
@@ -437,7 +437,7 @@ static struct kvm_lapic *kvm_apic_round_robin(struct kvm *kvm, u8 vector, | |||
437 | } | 437 | } |
438 | 438 | ||
439 | struct kvm_vcpu *kvm_get_lowest_prio_vcpu(struct kvm *kvm, u8 vector, | 439 | struct kvm_vcpu *kvm_get_lowest_prio_vcpu(struct kvm *kvm, u8 vector, |
440 | unsigned long bitmap) | 440 | unsigned long *bitmap) |
441 | { | 441 | { |
442 | struct kvm_lapic *apic; | 442 | struct kvm_lapic *apic; |
443 | 443 | ||
@@ -508,7 +508,7 @@ static void apic_send_ipi(struct kvm_lapic *apic) | |||
508 | } | 508 | } |
509 | 509 | ||
510 | if (delivery_mode == APIC_DM_LOWEST) { | 510 | if (delivery_mode == APIC_DM_LOWEST) { |
511 | target = kvm_get_lowest_prio_vcpu(vcpu->kvm, vector, lpr_map); | 511 | target = kvm_get_lowest_prio_vcpu(vcpu->kvm, vector, &lpr_map); |
512 | if (target != NULL) | 512 | if (target != NULL) |
513 | __apic_accept_irq(target->arch.apic, delivery_mode, | 513 | __apic_accept_irq(target->arch.apic, delivery_mode, |
514 | vector, level, trig_mode); | 514 | vector, level, trig_mode); |