aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/x86.c
diff options
context:
space:
mode:
authorFrederic Weisbecker <fweisbec@gmail.com>2009-11-10 05:03:12 -0500
committerFrederic Weisbecker <fweisbec@gmail.com>2009-11-10 05:23:43 -0500
commit59d8eb53ea9947db7cad8ebc31b0fb54f23a9851 (patch)
tree99a1e3f7e2ba5ccf139b46a5d120c47af17d79a1 /arch/x86/kvm/x86.c
parentf60d24d2ad04977b0bd9e3eb35dba2d2fa569af9 (diff)
hw-breakpoints: Wrap in the KVM breakpoint active state check
Wrap in the cpu dr7 check that tells if we have active breakpoints that need to be restored in the cpu. This wrapper makes the check more self-explainable and also reusable for any further other uses. Reported-by: Jan Kiszka <jan.kiszka@web.de> Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Cc: Avi Kivity <avi@redhat.com> Cc: "K. Prasad" <prasad@linux.vnet.ibm.com>
Diffstat (limited to 'arch/x86/kvm/x86.c')
-rw-r--r--arch/x86/kvm/x86.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 22dee7aa7813..3817220cc86b 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -3651,7 +3651,7 @@ static int vcpu_enter_guest(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)
3651 * care about the messed up debug address registers. But if 3651 * care about the messed up debug address registers. But if
3652 * we have some of them active, restore the old state. 3652 * we have some of them active, restore the old state.
3653 */ 3653 */
3654 if (__get_cpu_var(dr7) & DR_GLOBAL_ENABLE_MASK) 3654 if (hw_breakpoint_active())
3655 hw_breakpoint_restore(); 3655 hw_breakpoint_restore();
3656 3656
3657 set_bit(KVM_REQ_KICK, &vcpu->requests); 3657 set_bit(KVM_REQ_KICK, &vcpu->requests);