From: Paolo Bonzini <pbonzini@redhat.com>
To: Eduardo Habkost <ehabkost@redhat.com>
Cc: qemu-devel@nongnu.org, Richard Henderson <rth@twiddle.net>
Subject: Re: [Qemu-devel] [PATCH 0/8] target-i386: Implement debug extensions
Date: Mon, 21 Sep 2015 16:11:22 +0200 [thread overview]
Message-ID: <5600100A.90806@redhat.com> (raw)
In-Reply-To: <20150921140531.GA4004@thinpad.lan.raisama.net>
On 21/09/2015 16:05, Eduardo Habkost wrote:
> On Mon, Sep 21, 2015 at 02:05:52PM +0200, Paolo Bonzini wrote:
>> On 15/09/2015 20:45, Richard Henderson wrote:
>>> Best guess, since I can't find any code that actually uses them.
>>> Linux actively turns them off at boot...
>>
>> I've sent a kvm-unit-tests patch to test debug extensions. It shows
>> that debug extensions work, but the following needs to be squashed in
>> patch 4:
>>
>> diff --git a/target-i386/bpt_helper.c b/target-i386/bpt_helper.c
>> index c258598..b24e446 100644
>> --- a/target-i386/bpt_helper.c
>> +++ b/target-i386/bpt_helper.c
>> @@ -134,14 +134,14 @@ void cpu_x86_update_dr7(CPUX86State *env, uint32_t new_dr7)
>> int mod = ((old_dr7 | old_dr7 * 2) ^ (new_dr7 | new_dr7 * 2)) & 0xff;
>>
>> for (i = 0; i < DR7_MAX_BP; i++) {
>> - if (mod & (2 << i * 2)) {
>> - /* We know that register i has changed enable state;
>> - recheck what that state should be and apply. */
>> - if (hw_breakpoint_enabled(new_dr7, i)) {
>> - iobpt |= hw_breakpoint_insert(env, i);
>> - } else {
>> - hw_breakpoint_remove(env, i);
>> - }
>> + if ((mod & (2 << i * 2)) && !hw_breakpoint_enabled(new_dr7, i)) {
>> + hw_breakpoint_remove(env, i);
>> + }
>> + }
>> + env->dr[7] = new_dr7 | DR7_FIXED_1;
>> + for (i = 0; i < DR7_MAX_BP; i++) {
>> + if (mod & (2 << i * 2) && hw_breakpoint_enabled(new_dr7, i)) {
>> + iobpt |= hw_breakpoint_insert(env, i);
>> } else if (hw_breakpoint_type(new_dr7, i) == DR7_TYPE_IO_RW
>> && hw_breakpoint_enabled(new_dr7, i)) {
>> iobpt |= HF_IOBPT_MASK;
>
> Thanks! If that's the only change needed in the series, I can squash it
> when applying. I just need your Signed-off-by line.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
:)
but perhaps wait a little for Richard to chime in.
Paolo
next prev parent reply other threads:[~2015-09-21 14:11 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-15 18:45 [Qemu-devel] [PATCH 0/8] target-i386: Implement debug extensions Richard Henderson
2015-09-15 18:45 ` [Qemu-devel] [PATCH 1/8] target-i386: Move breakpoint related functions to new file Richard Henderson
2015-09-18 18:27 ` Eduardo Habkost
2015-09-15 18:45 ` [Qemu-devel] [PATCH 2/8] target-i386: Make check_hw_breakpoints static Richard Henderson
2015-09-18 18:29 ` Eduardo Habkost
2015-09-15 18:45 ` [Qemu-devel] [PATCH 3/8] target-i386: Introduce cpu_x86_update_dr7 Richard Henderson
2015-09-15 18:45 ` [Qemu-devel] [PATCH 4/8] target-i386: Re-introduce optimal breakpoint removal Richard Henderson
2015-09-16 8:57 ` Paolo Bonzini
2015-09-16 14:57 ` Richard Henderson
2015-09-16 14:59 ` Paolo Bonzini
2015-09-18 18:38 ` Eduardo Habkost
2015-09-15 18:45 ` [Qemu-devel] [PATCH 5/8] target-i386: Move hw_*breakpoint_* functions Richard Henderson
2015-09-15 18:45 ` [Qemu-devel] [PATCH 6/8] target-i386: Optimize setting dr[0-3] Richard Henderson
2015-09-15 18:45 ` [Qemu-devel] [PATCH 7/8] target-i386: Handle I/O breakpoints Richard Henderson
2015-09-15 18:45 ` [Qemu-devel] [PATCH 8/8] target-i386: Check CR4[DE] for processing DR4/DR5 Richard Henderson
2015-09-21 12:05 ` [Qemu-devel] [PATCH 0/8] target-i386: Implement debug extensions Paolo Bonzini
2015-09-21 14:05 ` Eduardo Habkost
2015-09-21 14:11 ` Paolo Bonzini [this message]
2015-09-28 18:26 ` Eduardo Habkost
2015-09-28 18:48 ` Eduardo Habkost
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=5600100A.90806@redhat.com \
--to=pbonzini@redhat.com \
--cc=ehabkost@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).