[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 20/22] target/i386: add the tcg_enabled() in tar
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH 20/22] target/i386: add the tcg_enabled() in target/i386/ |
Date: |
Tue, 4 Jul 2017 11:58:42 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 |
On 03/07/2017 22:19, Richard Henderson wrote:
> On 07/03/2017 09:34 AM, Paolo Bonzini wrote:
>> @@ -215,10 +215,12 @@ void breakpoint_handler(CPUState *cs)
>> if (cs->watchpoint_hit) {
>> if (cs->watchpoint_hit->flags & BP_CPU) {
>> cs->watchpoint_hit = NULL;
>> - if (check_hw_breakpoints(env, false)) {
>> - raise_exception(env, EXCP01_DB);
>> - } else {
>> - cpu_loop_exit_noexc(cs);
>> + if (tcg_enabled()) {
>> + if (check_hw_breakpoints(env, false)) {
>> + raise_exception(env, EXCP01_DB);
>> + } else {
>> + cpu_loop_exit_noexc(cs);
>> + }
>
> This seems like an odd place for the tcg_enabled check. It seems like
> it should be much higher in the if/call chain.
>
> Why are we doing all these bp checks only to disable the final raising
> of an exception?
>
> Indeed, what in bpt_helper.c needs to be compiled in when !tcg_enabled?
Only cpu_x86_update_dr7, but it's not used by KVM (I was worried about
guest debug aka gdbstub mode). So that's my own brain fart; I'll wrap
the cpu_x86_update_dr7 with tcg_enabled and drop the file altogether.
Paolo
- Re: [Qemu-devel] [PATCH 18/22] target/i386: split cpu_set_mxcsr() and make cpu_set_fpuc() inline, (continued)