summaryrefslogtreecommitdiff
path: root/arch/x86/kvm
diff options
context:
space:
mode:
authorRadim Krčmář <rkrcmar@redhat.com>2015-01-30 00:48:50 +0300
committerPaolo Bonzini <pbonzini@redhat.com>2015-01-30 14:26:46 +0300
commit3697f302ab37000c109e2ab9f1763187853efb72 (patch)
treeeaa9e4fa4f519c8689690c8f968088f5d2f334af /arch/x86/kvm
parent9368b5676265304702419eb090deffc9faf9b08f (diff)
downloadlinux-3697f302ab37000c109e2ab9f1763187853efb72.tar.xz
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/x86/kvm')
-rw-r--r--arch/x86/kvm/lapic.c6
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,
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;
@@ -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;