Skip to content

Commit

Permalink
KVM: x86: replace 0 with APIC_DEST_PHYSICAL
Browse files Browse the repository at this point in the history
To make the code self-documenting.

Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
  • Loading branch information
Radim Krčmář authored and Paolo Bonzini committed Jan 30, 2015
1 parent 9368b56 commit 3697f30
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions arch/x86/kvm/lapic.c
Original file line number Diff line number Diff line change
Expand Up @@ -628,11 +628,9 @@ bool kvm_apic_match_dest(struct kvm_vcpu *vcpu, struct kvm_lapic *source,
ASSERT(target);
switch (short_hand) {
case APIC_DEST_NOSHORT:
if (dest_mode == 0)
/* Physical mode. */
if (dest_mode == APIC_DEST_PHYSICAL)
return kvm_apic_match_physical_addr(target, dest);
else
/* Logical mode. */
return kvm_apic_match_logical_addr(target, dest);
case APIC_DEST_SELF:
return target == source;
Expand Down Expand Up @@ -677,7 +675,7 @@ bool kvm_irq_delivery_to_apic_fast(struct kvm *kvm, struct kvm_lapic *src,

ret = true;

if (irq->dest_mode == 0) { /* physical mode */
if (irq->dest_mode == APIC_DEST_PHYSICAL) {
if (irq->dest_id >= ARRAY_SIZE(map->phys_map))
goto out;

Expand Down

0 comments on commit 3697f30

Please sign in to comment.