Bits 4-11 and 16-31 on DR6 are documented as always 1, so ensure they
can't be cleared by software.

Signed-off-by: Eduardo Habkost <ehabk...@redhat.com>
---
 target-i386/bpt_helper.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target-i386/bpt_helper.c b/target-i386/bpt_helper.c
index 3cb4a09..0fbdc03 100644
--- a/target-i386/bpt_helper.c
+++ b/target-i386/bpt_helper.c
@@ -261,7 +261,7 @@ void helper_set_dr(CPUX86State *env, int reg, target_ulong 
t0)
         }
         /* fallthru */
     case 6:
-        env->dr[6] = t0;
+        env->dr[6] = t0 | DR6_FIXED_1;
         return;
     case 5:
         if (env->cr[4] & CR4_DE_MASK) {
-- 
2.1.0


Reply via email to