@@ -4306,7 +4306,7 @@ void vmx_vmexit_handler(struct cpu_user_regs *regs)
__vmread(GUEST_PENDING_DBG_EXCEPTIONS, &pending_dbg);
__vmwrite(GUEST_PENDING_DBG_EXCEPTIONS,
- pending_dbg | DR_STEP);
+ pending_dbg | X86_DR6_BS);
}
}
@@ -1,15 +1,6 @@
#ifndef _X86_DEBUGREG_H
#define _X86_DEBUGREG_H
-
-/* Indicate the register numbers for a number of the specific
- debug registers. Registers 0-3 contain the addresses we wish to trap on */
-
-#define DR_FIRSTADDR 0
-#define DR_LASTADDR 3
-#define DR_STATUS 6
-#define DR_CONTROL 7
-
/*
* DR6 status bits.
* N.B. For backwards compatibility, X86_DR6_RTM has inverted polarity.
@@ -31,14 +22,6 @@
#define X86_DR6_DEFAULT 0xffff0ff0 /* Default %dr6 value. */
-#define DR_TRAP0 (0x1) /* db0 */
-#define DR_TRAP1 (0x2) /* db1 */
-#define DR_TRAP2 (0x4) /* db2 */
-#define DR_TRAP3 (0x8) /* db3 */
-#define DR_STEP (0x4000) /* single-step */
-#define DR_SWITCH (0x8000) /* task switch */
-#define DR_NOT_RTM (0x10000) /* clear: #BP inside RTM region */
-
/* Now define a bunch of things for manipulating the control register.
The top two bytes of the control register consist of 4 fields of 4
bits - each field corresponds to one of the four debug registers,
@@ -1359,7 +1359,7 @@ int pv_emulate_privileged_op(struct cpu_user_regs *regs)
{
case X86EMUL_OKAY:
if ( ctxt.ctxt.retire.singlestep )
- ctxt.bpmatch |= DR_STEP;
+ ctxt.bpmatch |= X86_DR6_BS;
if ( ctxt.bpmatch &&
!(curr->arch.pv.trap_bounce.flags & TBF_EXCEPTION) )
@@ -1955,7 +1955,7 @@ void do_debug(struct cpu_user_regs *regs)
* If however we do, safety measures need to be enacted. Use a big
* hammer and clear all debug settings.
*/
- if ( dr6 & (DR_TRAP3 | DR_TRAP2 | DR_TRAP1 | DR_TRAP0) )
+ if ( dr6 & X86_DR6_BP_MASK )
{
unsigned int bp, dr7 = read_debugreg(7);