Skip to content

Commit

Permalink
KVM: VMX: use cmpxchg64
Browse files Browse the repository at this point in the history
commit c0a1666 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 gregkh committed Oct 5, 2017
1 parent d96820a commit 841453b
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 @@ -2223,8 +2223,8 @@ static void vmx_vcpu_pi_load(struct kvm_vcpu *vcpu, int cpu)
new.ndst = (dest << 8) & 0xFF00;

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);
}

static void decache_tsc_multiplier(struct vcpu_vmx *vmx)
Expand Down Expand Up @@ -11428,8 +11428,8 @@ static void __pi_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 (!WARN_ON_ONCE(vcpu->pre_pcpu == -1)) {
spin_lock(&per_cpu(blocked_vcpu_on_cpu_lock, vcpu->pre_pcpu));
Expand Down Expand Up @@ -11498,8 +11498,8 @@ static int pi_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);

/* We should not block the vCPU if an interrupt is posted for it. */
if (pi_test_on(pi_desc) == 1)
Expand Down

0 comments on commit 841453b

Please sign in to comment.