Message ID | 1445012619-23772-4-git-send-email-ehabkost@redhat.com |
---|---|
State | New |
Headers | show |
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 <ehabkost@redhat.com> > --- > 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~
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; } #endif
Bit 10 of DR7 is documented as always set to 1, so ensure that's always the case. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> --- target-i386/bpt_helper.c | 2 ++ 1 file changed, 2 insertions(+)