All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: li guang <lig.fnst@cn.fujitsu.com>
Cc: Blue Swirl <blauwirbel@gmail.com>,
	"imammedo@redhat.com" <imammedo@redhat.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	"ehabkost@redhat.com" <ehabkost@redhat.com>,
	"afaerber@suse.de" <afaerber@suse.de>
Subject: Re: [Qemu-devel] [PATCH 3/3] target-i386:slightly refactor dr7 related function
Date: Wed, 05 Dec 2012 09:55:13 +0100	[thread overview]
Message-ID: <50BF0BF1.3020208@siemens.com> (raw)
In-Reply-To: <1354668990.4342.10.camel@liguang.fnst.cn.fujitsu.com>

On 2012-12-05 01:56, li guang wrote:
>>> @@ -1014,22 +1016,40 @@ void hw_breakpoint_remove(CPUX86State *env, int index)
>>>  int check_hw_breakpoints(CPUX86State *env, int force_dr6_update)
>>>  {
>>>      target_ulong dr6;
>>> -    int reg, type;
>>> +    int index;
>>>      int hit_enabled = 0;
>>> +    bool bp_match = false;
>>> +    bool wp_match = false;
>>>
>>>      dr6 = env->dr[6] & ~0xf;
>>> -    for (reg = 0; reg < 4; reg++) {
>>> -        type = hw_breakpoint_type(env->dr[7], reg);
>>> -        if ((type == 0 && env->dr[reg] == env->eip) ||
>>> -            ((type & 1) && env->cpu_watchpoint[reg] &&
>>> -             (env->cpu_watchpoint[reg]->flags & BP_WATCHPOINT_HIT))) {
>>> -            dr6 |= 1 << reg;
>>> -            if (hw_breakpoint_enabled(env->dr[7], reg))
>>> +       for (index = 0; index < DR7_MAX_BP; index++) {
>>> +        switch (hw_breakpoint_type(env->dr[7], index)) {
>>> +        case DR7_BP_INST:
>>> +            if (env->dr[index] == env->eip) {
>>> +                bp_match = true;
>>> +            }
>>> +            break;
>>> +        case DR7_DATA_WR:
>>> +        case DR7_DATA_RW:
>>> +            if (env->cpu_watchpoint[index] &&
>>> +                env->cpu_watchpoint[index]->flags & BP_WATCHPOINT_HIT) {
>>> +                wp_match = true;
>>> +            }
>>
>> Also here.
>>
> 
> No, just fall through.

I told you how to clearly mark such cases.

Jan

-- 
Siemens AG, Corporate Technology, CT RTC ITP SDP-DE
Corporate Competence Center Embedded Linux

  reply	other threads:[~2012-12-05  8:55 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-04  8:11 [Qemu-devel] [PATCH 1/3] target-i386:define name of breakpoint bit in dr7 liguang
2012-12-04  8:11 ` [Qemu-devel] [PATCH 2/3] target-i386:make hw_breakpoint_enabled return bool type liguang
2012-12-04 10:23   ` Peter Maydell
2012-12-04 11:11     ` Jan Kiszka
2012-12-04 11:26       ` Peter Maydell
2012-12-05  0:51         ` li guang
2012-12-05  8:53           ` Jan Kiszka
2012-12-06  2:08             ` li guang
2012-12-06  2:18               ` li guang
2012-12-04  8:11 ` [Qemu-devel] [PATCH 3/3] target-i386:slightly refactor dr7 related function liguang
2012-12-04 18:51   ` Blue Swirl
2012-12-05  0:56     ` li guang
2012-12-05  8:55       ` Jan Kiszka [this message]
2012-12-04 12:49 ` [Qemu-devel] [PATCH 1/3] target-i386:define name of breakpoint bit in dr7 Peter Maydell
2012-12-05  2:07   ` li guang
  -- strict thread matches above, loose matches on Subject: below --
2012-12-06  3:03 liguang
2012-12-06  3:03 ` [Qemu-devel] [PATCH 3/3] target-i386:slightly refactor dr7 related function liguang
2012-12-06  8:54   ` Peter Maydell
2012-12-06  9:16     ` li guang
2012-12-06  9:23       ` Peter Maydell
2012-12-06  9:27         ` li guang
2012-12-06  9:35           ` 陳韋任 (Wei-Ren Chen)
2012-12-06  9:36           ` Andreas Färber
2012-12-06  9:48             ` Peter Maydell
2012-12-06  9:57               ` Andreas Färber
2012-12-07  0:53               ` li guang
2012-12-06  9:44           ` Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50BF0BF1.3020208@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=afaerber@suse.de \
    --cc=blauwirbel@gmail.com \
    --cc=ehabkost@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=lig.fnst@cn.fujitsu.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.