diff options
author | Radim Krčmář <rkrcmar@redhat.com> | 2015-01-29 16:48:48 -0500 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2015-01-30 06:26:45 -0500 |
commit | 52c233a4405eef4f4dbbe2984e308871866db007 (patch) | |
tree | 04d84c396d0d3e0dcf914b4a2f7905bdd2cac85b | |
parent | 843e4330573cc5261ae260ce0b83dc570d8cdc05 (diff) |
KVM: x86: return bool from kvm_apic_match*()
And don't export the internal ones while at it.
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r-- | arch/x86/kvm/ioapic.h | 2 | ||||
-rw-r--r-- | arch/x86/kvm/lapic.c | 8 | ||||
-rw-r--r-- | arch/x86/kvm/lapic.h | 2 |
3 files changed, 5 insertions, 7 deletions
diff --git a/arch/x86/kvm/ioapic.h b/arch/x86/kvm/ioapic.h index 3c9195535ffc..c2e36d934af4 100644 --- a/arch/x86/kvm/ioapic.h +++ b/arch/x86/kvm/ioapic.h | |||
@@ -98,7 +98,7 @@ static inline struct kvm_ioapic *ioapic_irqchip(struct kvm *kvm) | |||
98 | } | 98 | } |
99 | 99 | ||
100 | void kvm_rtc_eoi_tracking_restore_one(struct kvm_vcpu *vcpu); | 100 | void kvm_rtc_eoi_tracking_restore_one(struct kvm_vcpu *vcpu); |
101 | int kvm_apic_match_dest(struct kvm_vcpu *vcpu, struct kvm_lapic *source, | 101 | bool kvm_apic_match_dest(struct kvm_vcpu *vcpu, struct kvm_lapic *source, |
102 | int short_hand, unsigned int dest, int dest_mode); | 102 | int short_hand, unsigned int dest, int dest_mode); |
103 | int kvm_apic_compare_prio(struct kvm_vcpu *vcpu1, struct kvm_vcpu *vcpu2); | 103 | int kvm_apic_compare_prio(struct kvm_vcpu *vcpu1, struct kvm_vcpu *vcpu2); |
104 | void kvm_ioapic_update_eoi(struct kvm_vcpu *vcpu, int vector, | 104 | void kvm_ioapic_update_eoi(struct kvm_vcpu *vcpu, int vector, |
diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c index a688fbffb34e..62f624656549 100644 --- a/arch/x86/kvm/lapic.c +++ b/arch/x86/kvm/lapic.c | |||
@@ -578,18 +578,18 @@ static void apic_set_tpr(struct kvm_lapic *apic, u32 tpr) | |||
578 | apic_update_ppr(apic); | 578 | apic_update_ppr(apic); |
579 | } | 579 | } |
580 | 580 | ||
581 | static int kvm_apic_broadcast(struct kvm_lapic *apic, u32 dest) | 581 | static bool kvm_apic_broadcast(struct kvm_lapic *apic, u32 dest) |
582 | { | 582 | { |
583 | return dest == (apic_x2apic_mode(apic) ? | 583 | return dest == (apic_x2apic_mode(apic) ? |
584 | X2APIC_BROADCAST : APIC_BROADCAST); | 584 | X2APIC_BROADCAST : APIC_BROADCAST); |
585 | } | 585 | } |
586 | 586 | ||
587 | int kvm_apic_match_physical_addr(struct kvm_lapic *apic, u32 dest) | 587 | static bool kvm_apic_match_physical_addr(struct kvm_lapic *apic, u32 dest) |
588 | { | 588 | { |
589 | return kvm_apic_id(apic) == dest || kvm_apic_broadcast(apic, dest); | 589 | return kvm_apic_id(apic) == dest || kvm_apic_broadcast(apic, dest); |
590 | } | 590 | } |
591 | 591 | ||
592 | int kvm_apic_match_logical_addr(struct kvm_lapic *apic, u32 mda) | 592 | static bool kvm_apic_match_logical_addr(struct kvm_lapic *apic, u32 mda) |
593 | { | 593 | { |
594 | int result = 0; | 594 | int result = 0; |
595 | u32 logical_id; | 595 | u32 logical_id; |
@@ -623,7 +623,7 @@ int kvm_apic_match_logical_addr(struct kvm_lapic *apic, u32 mda) | |||
623 | return result; | 623 | return result; |
624 | } | 624 | } |
625 | 625 | ||
626 | int kvm_apic_match_dest(struct kvm_vcpu *vcpu, struct kvm_lapic *source, | 626 | bool kvm_apic_match_dest(struct kvm_vcpu *vcpu, struct kvm_lapic *source, |
627 | int short_hand, unsigned int dest, int dest_mode) | 627 | int short_hand, unsigned int dest, int dest_mode) |
628 | { | 628 | { |
629 | int result = 0; | 629 | int result = 0; |
diff --git a/arch/x86/kvm/lapic.h b/arch/x86/kvm/lapic.h index 7054437944cd..c1ef25c89508 100644 --- a/arch/x86/kvm/lapic.h +++ b/arch/x86/kvm/lapic.h | |||
@@ -58,8 +58,6 @@ void kvm_apic_set_version(struct kvm_vcpu *vcpu); | |||
58 | 58 | ||
59 | void kvm_apic_update_tmr(struct kvm_vcpu *vcpu, u32 *tmr); | 59 | void kvm_apic_update_tmr(struct kvm_vcpu *vcpu, u32 *tmr); |
60 | void kvm_apic_update_irr(struct kvm_vcpu *vcpu, u32 *pir); | 60 | void kvm_apic_update_irr(struct kvm_vcpu *vcpu, u32 *pir); |
61 | int kvm_apic_match_physical_addr(struct kvm_lapic *apic, u32 dest); | ||
62 | int kvm_apic_match_logical_addr(struct kvm_lapic *apic, u32 mda); | ||
63 | int kvm_apic_set_irq(struct kvm_vcpu *vcpu, struct kvm_lapic_irq *irq, | 61 | int kvm_apic_set_irq(struct kvm_vcpu *vcpu, struct kvm_lapic_irq *irq, |
64 | unsigned long *dest_map); | 62 | unsigned long *dest_map); |
65 | int kvm_apic_local_deliver(struct kvm_lapic *apic, int lvt_type); | 63 | int kvm_apic_local_deliver(struct kvm_lapic *apic, int lvt_type); |