Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 169701
b: refs/heads/master
c: 59d8eb5
h: refs/heads/master
i:
  169699: 74a967b
v: v3
  • Loading branch information
Frederic Weisbecker committed Nov 10, 2009
1 parent 3dfce8e commit a0aba39
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f60d24d2ad04977b0bd9e3eb35dba2d2fa569af9
refs/heads/master: 59d8eb53ea9947db7cad8ebc31b0fb54f23a9851
5 changes: 5 additions & 0 deletions trunk/arch/x86/include/asm/debugreg.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@ static inline void hw_breakpoint_disable(void)
set_debugreg(0UL, 3);
}

static inline int hw_breakpoint_active(void)
{
return __get_cpu_var(dr7) & DR_GLOBAL_ENABLE_MASK;
}

extern void aout_dump_debugregs(struct user *dump);

#ifdef CONFIG_KVM
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/x86/kvm/x86.c
Original file line number Diff line number Diff line change
Expand Up @@ -3651,7 +3651,7 @@ static int vcpu_enter_guest(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)
* care about the messed up debug address registers. But if
* we have some of them active, restore the old state.
*/
if (__get_cpu_var(dr7) & DR_GLOBAL_ENABLE_MASK)
if (hw_breakpoint_active())
hw_breakpoint_restore();

set_bit(KVM_REQ_KICK, &vcpu->requests);
Expand Down

0 comments on commit a0aba39

Please sign in to comment.