mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 05:39:54 -04:00
x86/kvm: virt_xxx memory barriers instead of mandatory barriers
virt_xxx memory barriers are implemented trivially using the low-level __smp_xxx macros, __smp_xxx is equal to a compiler barrier for strong TSO memory model, however, mandatory barriers will unconditional add memory barriers, this patch replaces the rmb() in kvm_steal_clock() by virt_rmb(). Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Radim Krčmář <rkrcmar@redhat.com> Signed-off-by: Wanpeng Li <wanpeng.li@hotmail.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
This commit is contained in:
parent
bd8fab39cd
commit
5a48a62271
1 changed files with 2 additions and 2 deletions
|
|
@ -396,9 +396,9 @@ static u64 kvm_steal_clock(int cpu)
|
|||
src = &per_cpu(steal_time, cpu);
|
||||
do {
|
||||
version = src->version;
|
||||
rmb();
|
||||
virt_rmb();
|
||||
steal = src->steal;
|
||||
rmb();
|
||||
virt_rmb();
|
||||
} while ((version & 1) || (version != src->version));
|
||||
|
||||
return steal;
|
||||
|
|
|
|||
Loading…
Reference in a new issue