diff options
author | Radim Krčmář <rkrcmar@redhat.com> | 2015-01-29 16:48:50 -0500 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2015-01-30 06:26:46 -0500 |
commit | 3697f302ab37000c109e2ab9f1763187853efb72 (patch) | |
tree | eaa9e4fa4f519c8689690c8f968088f5d2f334af /arch | |
parent | 9368b5676265304702419eb090deffc9faf9b08f (diff) |
KVM: x86: replace 0 with APIC_DEST_PHYSICAL
To make the code self-documenting.
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kvm/lapic.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c index caf5a8d82c18..99c536597332 100644 --- a/arch/x86/kvm/lapic.c +++ b/arch/x86/kvm/lapic.c | |||
@@ -628,11 +628,9 @@ bool kvm_apic_match_dest(struct kvm_vcpu *vcpu, struct kvm_lapic *source, | |||
628 | ASSERT(target); | 628 | ASSERT(target); |
629 | switch (short_hand) { | 629 | switch (short_hand) { |
630 | case APIC_DEST_NOSHORT: | 630 | case APIC_DEST_NOSHORT: |
631 | if (dest_mode == 0) | 631 | if (dest_mode == APIC_DEST_PHYSICAL) |
632 | /* Physical mode. */ | ||
633 | return kvm_apic_match_physical_addr(target, dest); | 632 | return kvm_apic_match_physical_addr(target, dest); |
634 | else | 633 | else |
635 | /* Logical mode. */ | ||
636 | return kvm_apic_match_logical_addr(target, dest); | 634 | return kvm_apic_match_logical_addr(target, dest); |
637 | case APIC_DEST_SELF: | 635 | case APIC_DEST_SELF: |
638 | return target == source; | 636 | return target == source; |
@@ -677,7 +675,7 @@ bool kvm_irq_delivery_to_apic_fast(struct kvm *kvm, struct kvm_lapic *src, | |||
677 | 675 | ||
678 | ret = true; | 676 | ret = true; |
679 | 677 | ||
680 | if (irq->dest_mode == 0) { /* physical mode */ | 678 | if (irq->dest_mode == APIC_DEST_PHYSICAL) { |
681 | if (irq->dest_id >= ARRAY_SIZE(map->phys_map)) | 679 | if (irq->dest_id >= ARRAY_SIZE(map->phys_map)) |
682 | goto out; | 680 | goto out; |
683 | 681 | ||