Skip to content
This repository was archived by the owner on Dec 10, 2017. It is now read-only.

Commit

Permalink
KVM: VMX: use cmpxchg64
Browse files Browse the repository at this point in the history
commit c0a1666bcb2a33e84187a15eabdcd54056be9a97 upstream.

This fixes a compilation failure on 32-bit systems.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
bonzini authored and nathanchance committed Oct 5, 2017
1 parent 6d0bbd0 commit 0d04bd6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions arch/x86/kvm/vmx.c
Original file line number Diff line number Diff line change
Expand Up @@ -2029,8 +2029,8 @@ static void vmx_vcpu_pi_load(struct kvm_vcpu *vcpu, int cpu)

/* Allow posting non-urgent interrupts */
new.sn = 0;
} while (cmpxchg(&pi_desc->control, old.control,
new.control) != old.control);
} while (cmpxchg64(&pi_desc->control, old.control,
new.control) != old.control);
}
/*
* Switches to specified vcpu, until a matching vcpu_put(), but assumes
Expand Down Expand Up @@ -10705,8 +10705,8 @@ static int vmx_pre_block(struct kvm_vcpu *vcpu)

/* set 'NV' to 'wakeup vector' */
new.nv = POSTED_INTR_WAKEUP_VECTOR;
} while (cmpxchg(&pi_desc->control, old.control,
new.control) != old.control);
} while (cmpxchg64(&pi_desc->control, old.control,
new.control) != old.control);

return 0;
}
Expand Down Expand Up @@ -10737,8 +10737,8 @@ static void vmx_post_block(struct kvm_vcpu *vcpu)

/* set 'NV' to 'notification vector' */
new.nv = POSTED_INTR_VECTOR;
} while (cmpxchg(&pi_desc->control, old.control,
new.control) != old.control);
} while (cmpxchg64(&pi_desc->control, old.control,
new.control) != old.control);

if(vcpu->pre_pcpu != -1) {
spin_lock_irqsave(
Expand Down

0 comments on commit 0d04bd6

Please sign in to comment.