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)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 12 Aug 2015 14:33:19 +0000 (16:33 +0200)
commit1fba7ba2fd5f40a09c39a2b8c39a199abc497790
tree2696bdd684e7c2dfe9ca91d8297a60bb35d1874a
parentf17199d80d11c26da96b1de81c8f7806ed7304f6
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>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/i8254.c
arch/x86/kvm/lapic.c