husy394 / rpms / kernel

Forked from rpms/kernel 3 years ago
Clone
6eda94
commit c0a1666bcb2a33e84187a15eabdcd54056be9a97
6eda94
Author: Paolo Bonzini <pbonzini@redhat.com>
6eda94
Date:   Thu Sep 28 17:58:41 2017 +0200
6eda94
6eda94
    KVM: VMX: use cmpxchg64
6eda94
6eda94
    This fixes a compilation failure on 32-bit systems.
6eda94
6eda94
    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
6eda94
6eda94
    Applied-by: Akemi Yagi <toracat@centos.org>
6eda94
6eda94
--- a/arch/x86/kvm/vmx.c	2019-07-18 12:58:03.000000000 -0700
6eda94
+++ b/arch/x86/kvm/vmx.c	2019-08-07 23:40:26.451829411 -0700
6eda94
@@ -2407,7 +2407,7 @@ static void vmx_vcpu_pi_load(struct kvm_
6eda94
 			new.ndst = (dest << 8) & 0xFF00;
6eda94
 
6eda94
 		new.sn = 0;
6eda94
-	} while (cmpxchg(&pi_desc->control, old.control,
6eda94
+	} while (cmpxchg64(&pi_desc->control, old.control,
6eda94
 			new.control) != old.control);
6eda94
 
6eda94
        /*
6eda94
@@ -12058,7 +12058,7 @@ static void __pi_post_block(struct kvm_v
6eda94
 
6eda94
 		/* set 'NV' to 'notification vector' */
6eda94
 		new.nv = POSTED_INTR_VECTOR;
6eda94
-	} while (cmpxchg(&pi_desc->control, old.control,
6eda94
+	} while (cmpxchg64(&pi_desc->control, old.control,
6eda94
 			new.control) != old.control);
6eda94
 
6eda94
 	if (!WARN_ON_ONCE(vcpu->pre_pcpu == -1)) {
6eda94
@@ -12128,7 +12128,7 @@ static int pi_pre_block(struct kvm_vcpu
6eda94
 
6eda94
 		/* set 'NV' to 'wakeup vector' */
6eda94
 		new.nv = POSTED_INTR_WAKEUP_VECTOR;
6eda94
-	} while (cmpxchg(&pi_desc->control, old.control,
6eda94
+	} while (cmpxchg64(&pi_desc->control, old.control,
6eda94
 			new.control) != old.control);
6eda94
 
6eda94
 	/* We should not block the vCPU if an interrupt is posted for it.  */