linux/arch
Andrew Jones cde9af6e79 KVM: add explicit barrier to kvm_vcpu_kick
kvm_vcpu_kick() must issue a general memory barrier prior to reading
vcpu->mode in order to ensure correctness of the mutual-exclusion
memory barrier pattern used with vcpu->requests.  While the cmpxchg
called from kvm_vcpu_kick():

 kvm_vcpu_kick
   kvm_arch_vcpu_should_kick
     kvm_vcpu_exiting_guest_mode
       cmpxchg

implies general memory barriers before and after the operation, that
implication is only valid when cmpxchg succeeds.  We need an explicit
barrier for when it fails, otherwise a VCPU thread on its entry path
that reads zero for vcpu->requests does not exclude the possibility
the requesting thread sees !IN_GUEST_MODE when it reads vcpu->mode.

kvm_make_all_cpus_request already had a barrier, so we remove it, as
now it would be redundant.

Signed-off-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2017-04-27 14:16:17 +02:00
..
alpha
arc arch, mm: convert all architectures to use 5level-fixup.h 2017-03-09 11:48:47 -08:00
arm KVM: mark requests that do not need a wakeup 2017-04-27 14:13:57 +02:00
arm64 KVM: mark requests that do not need a wakeup 2017-04-27 14:13:57 +02:00
avr32 arch, mm: convert all architectures to use 5level-fixup.h 2017-03-09 11:48:47 -08:00
blackfin
c6x
cris Merge branch 'prep-for-5level' 2017-03-10 08:59:07 -08:00
frv arch, mm: convert all architectures to use 5level-fixup.h 2017-03-09 11:48:47 -08:00
h8300 arch, mm: convert all architectures to use 5level-fixup.h 2017-03-09 11:48:47 -08:00
hexagon arch, mm: convert all architectures to use 5level-fixup.h 2017-03-09 11:48:47 -08:00
ia64 arch, mm: convert all architectures to use 5level-fixup.h 2017-03-09 11:48:47 -08:00
m32r
m68k
metag arch, mm: convert all architectures to use 5level-fixup.h 2017-03-09 11:48:47 -08:00
microblaze arch, mm: convert all architectures to use 5level-fixup.h 2017-03-09 11:48:47 -08:00
mips KVM: add kvm_{test,clear}_request to replace {test,clear}_bit 2017-04-27 14:12:22 +02:00
mn10300 arch, mm: convert all architectures to use 5level-fixup.h 2017-03-09 11:48:47 -08:00
nios2 arch, mm: convert all architectures to use 5level-fixup.h 2017-03-09 11:48:47 -08:00
openrisc openrisc: Export symbols needed by modules 2017-03-16 00:12:57 +09:00
parisc parisc: Fix system shutdown halt 2017-03-18 17:27:45 +01:00
powerpc KVM: add kvm_{test,clear}_request to replace {test,clear}_bit 2017-04-27 14:12:22 +02:00
s390 KVM: add kvm_{test,clear}_request to replace {test,clear}_bit 2017-04-27 14:12:22 +02:00
score Fixup for arch/score after extable.h introduction 2017-03-11 14:16:50 -08:00
sh Merge branch 'prep-for-5level' 2017-03-10 08:59:07 -08:00
sparc arch, mm: convert all architectures to use 5level-fixup.h 2017-03-09 11:48:47 -08:00
tile arch, mm: convert all architectures to use 5level-fixup.h 2017-03-09 11:48:47 -08:00
um x86/arch_prctl/64: Rename do_arch_prctl() to do_arch_prctl_64() 2017-03-20 16:10:32 +01:00
unicore32 arch, mm: convert all architectures to use 5level-fixup.h 2017-03-09 11:48:47 -08:00
x86 KVM: add explicit barrier to kvm_vcpu_kick 2017-04-27 14:16:17 +02:00
xtensa arch, mm: convert all architectures to use 5level-fixup.h 2017-03-09 11:48:47 -08:00
.gitignore
Kconfig