qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 3/9] target-i386: Ensure bit 10 on DR7 is nev


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH v2 3/9] target-i386: Ensure bit 10 on DR7 is never cleared
Date: Sun, 18 Oct 2015 12:58:53 -1000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

On 10/16/2015 06:23 AM, Eduardo Habkost wrote:
Bit 10 of DR7 is documented as always set to 1, so ensure that's
always the case.

Signed-off-by: Eduardo Habkost <address@hidden>
---
  target-i386/bpt_helper.c | 2 ++
  1 file changed, 2 insertions(+)

diff --git a/target-i386/bpt_helper.c b/target-i386/bpt_helper.c
index 23ce828..493deba 100644
--- a/target-i386/bpt_helper.c
+++ b/target-i386/bpt_helper.c
@@ -113,6 +113,8 @@ void cpu_x86_update_dr7(CPUX86State *env, uint32_t new_dr7)
              hw_breakpoint_insert(env, i);
          }
      }
+
+    env->dr[7] |= DR7_FIXED_1;

Better to do this to new_dr7, above the xor test with old_dr7, so that we still pass the xor test.


r~




reply via email to

[Prev in Thread] Current Thread [Next in Thread]