Skip to content

Commit 150cd84

Browse files
bonzinigregkh
authored andcommitted
KVM: VMX: use cmpxchg64
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>
1 parent 90df2da commit 150cd84

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

arch/x86/kvm/vmx.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2029,8 +2029,8 @@ static void vmx_vcpu_pi_load(struct kvm_vcpu *vcpu, int cpu)
20292029

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

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

1071110711
return 0;
1071210712
}
@@ -10737,8 +10737,8 @@ static void vmx_post_block(struct kvm_vcpu *vcpu)
1073710737

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

1074310743
if(vcpu->pre_pcpu != -1) {
1074410744
spin_lock_irqsave(

0 commit comments

Comments
 (0)