KVM: SVM: fix cr8 intercept window
authorRadim Krčmář <rkrcmar@redhat.com>
Tue, 11 Mar 2014 18:11:18 +0000 (19:11 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 24 Mar 2014 04:38:18 +0000 (21:38 -0700)
commitc516a4c127a90e5889b72f1ad1b9da4005bba65b
treefa9d5ff0df79c1dbd17d41e0beb8e0010a4df89a
parent0f8141267dce8a719b294b6fcade653eaae7aa54
KVM: SVM: fix cr8 intercept window

commit 596f3142d2b7be307a1652d59e7b93adab918437 upstream.

We always disable cr8 intercept in its handler, but only re-enable it
if handling KVM_REQ_EVENT, so there can be a window where we do not
intercept cr8 writes, which allows an interrupt to disrupt a higher
priority task.

Fix this by disabling intercepts in the same function that re-enables
them when needed. This fixes BSOD in Windows 2008.

Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
Reviewed-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kvm/svm.c