]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: add kvm_request_pending
authorRadim Krčmář <rkrcmar@redhat.com>
Sun, 4 Jun 2017 12:43:52 +0000 (14:43 +0200)
committerChristoffer Dall <cdall@linaro.org>
Sun, 4 Jun 2017 14:53:00 +0000 (16:53 +0200)
commit05d6f8b30f9f7afd31737733c9881f0c03925274
treee2c163ec4641fa294e39e5198ede51a74c927797
parent197bc55f9b1b3c88db1cf2d090aa3caaa865047e
KVM: add kvm_request_pending

A first step in vcpu->requests encapsulation.  Additionally, we now
use READ_ONCE() when accessing vcpu->requests, which ensures we
always load vcpu->requests when it's accessed.  This is important as
other threads can change it any time.  Also, READ_ONCE() documents
that vcpu->requests is used with other threads, likely requiring
memory barriers, which it does.

Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
[ Documented the new use of READ_ONCE() and converted another check
  in arch/mips/kvm/vz.c ]
Signed-off-by: Andrew Jones <drjones@redhat.com>
Acked-by: Christoffer Dall <cdall@linaro.org>
Signed-off-by: Christoffer Dall <cdall@linaro.org>
arch/mips/kvm/trap_emul.c
arch/mips/kvm/vz.c
arch/powerpc/kvm/booke.c
arch/powerpc/kvm/powerpc.c
arch/s390/kvm/kvm-s390.c
arch/x86/kvm/x86.c
include/linux/kvm_host.h