]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86: fix root cause for missed hardware breakpoints
authorPaolo Bonzini <pbonzini@redhat.com>
Fri, 26 Feb 2016 11:28:40 +0000 (12:28 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 26 Feb 2016 12:03:39 +0000 (13:03 +0100)
commit46a6ff2cb49173b6c3a5c7c5b0d5d8563bf098eb
treef5e3b9eb0a03dc3655eb492748c45d2e19abd315
parentada1a31b87b2757cd2fab880341e8c30bff12e42
KVM: x86: fix root cause for missed hardware breakpoints

Commit 3c71f0241728 ("KVM: x86: fix missed hardware breakpoints",
2016-02-10) worked around a case where the debug registers are not loaded
correctly on preemption and on the first entry to KVM_RUN.

However, Xiao Guangrong pointed out that the root cause must be that
KVM_DEBUGREG_BP_ENABLED is not being set correctly.  This can indeed
happen due to the lazy debug exit mechanism, which does not call
kvm_update_dr7.  Fix it by replacing the existing loop (more or less
equivalent to kvm_update_dr0123) with calls to all the kvm_update_dr*
functions.

Cc: stable@vger.kernel.org # 4.1+
Fixes: 3c71f024172818c0f1bc2ef7b68386ab43cc0c5b
Reviewed-by: Xiao Guangrong <guangrong.xiao@linux.intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/x86.c