OSDN Git Service

KVM: x86: make vapics_in_nmi_mode atomic
authorRadim Krčmář <rkrcmar@redhat.com>
Wed, 1 Jul 2015 13:31:49 +0000 (15:31 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Jul 2015 16:45:42 +0000 (09:45 -0700)
commit2b86158378cba6c7fc2ee45d83cc3f218520d9f2
tree8228456938ecc0c772f6c7045b2cd7c3d4723b08
parentf5dadd1dd3c07964ab189c45418b96cc20c04bd5
KVM: x86: make vapics_in_nmi_mode atomic

commit 42720138b06301cc8a7ee8a495a6d021c4b6a9bc upstream.

Writes were a bit racy, but hard to turn into a bug at the same time.
(Particularly because modern Linux doesn't use this feature anymore.)

Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
[Actually the next patch makes it much, much easier to trigger the race
 so I'm including this one for stable@ as well. - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/i8254.c
arch/x86/kvm/lapic.c