]> git.baikalelectronics.ru Git - kernel.git/commit
x86/kvm: virt_xxx memory barriers instead of mandatory barriers
authorWanpeng Li <wanpeng.li@hotmail.com>
Tue, 11 Apr 2017 09:49:21 +0000 (02:49 -0700)
committerRadim Krčmář <rkrcmar@redhat.com>
Wed, 12 Apr 2017 18:17:38 +0000 (20:17 +0200)
commit9985d9290f6d43eefd96b3a26a027853909cfd48
tree990d9f540cef822b9fba710169d8a9a6cf035747
parentd3649720d95a201679f97db6b5454f5546f4c095
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>
arch/x86/kernel/kvm.c