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)
commit5a48a622718cbd2d26d449f38ba40a2b5f7212cf
tree990d9f540cef822b9fba710169d8a9a6cf035747
parentbd8fab39cd4fe429f161dfc86bf64993d5c17320
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