From: Avi Kivity <avi@redhat.com>
To: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Roland McGrath <roland@redhat.com>,
Jan Kiszka <jan.kiszka@siemens.com>,
Oleg Nesterov <oleg@redhat.com>,
"K.Prasad" <prasad@linux.vnet.ibm.com>,
Alan Stern <stern@rowland.harvard.edu>,
Ingo Molnar <mingo@elte.hu>,
linux-kernel@vger.kernel.org, utrace-devel@redhat.com
Subject: Re: x86: do_debug && PTRACE_SINGLESTEP broken by 08d68323d1f0c34452e614263b212ca556dae47f
Date: Sun, 20 Dec 2009 10:30:33 +0200 [thread overview]
Message-ID: <4B2DE0A9.4090400@redhat.com> (raw)
In-Reply-To: <20091218231545.GA8803@nowhere>
On 12/19/2009 01:15 AM, Frederic Weisbecker wrote:
>
>> Apparently it does. You should hack some printks into do_debug() and see
>> how kvm is differing from real hardware. (Actually you can probably do
>> this with a notifier added by a module, not that you are shy about
>> recompiling!)
>>
>> Probably kvm's emulation of the hardware behavior wrt the DR6 bits is not
>> sufficiently faithful. Conceivably, kvm is being consistent with some
>> older hardware and we have encoded assumptions that only newer hardware
>> meets. But I'd guess it's just a plain kvm bug.
>>
>
A kvm bug is most likely.
> It looks like in kvm, before entering the guest, we restore its
> debug registers:
>
> vcpu_enter_guest():
> if (unlikely(vcpu->arch.switch_db_regs)) {
> set_debugreg(0, 7);
> set_debugreg(vcpu->arch.eff_db[0], 0);
> set_debugreg(vcpu->arch.eff_db[1], 1);
> set_debugreg(vcpu->arch.eff_db[2], 2);
> set_debugreg(vcpu->arch.eff_db[3], 3);
> }
>
>
> But what happens to dr6, I don't know.
>
That's done later, in vmx.c:vmx_vcpu_run():
if (vcpu->arch.switch_db_regs)
set_debugreg(vcpu->arch.dr6, 6);
Can you describe the failure? I'll try to construct a test case
reproducer and work with Jan to fix it.
--
error compiling committee.c: too many arguments to function
next prev parent reply other threads:[~2009-12-20 8:32 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-18 0:56 x86: do_debug && PTRACE_SINGLESTEP broken by 08d68323d1f0c34452e614263b212ca556dae47f Oleg Nesterov
2009-12-18 1:40 ` Roland McGrath
2009-12-18 2:10 ` Oleg Nesterov
2009-12-18 2:58 ` Frederic Weisbecker
2009-12-18 3:09 ` Frederic Weisbecker
2009-12-18 3:53 ` Roland McGrath
2009-12-18 3:06 ` Frederic Weisbecker
2009-12-18 17:27 ` Oleg Nesterov
2009-12-18 17:58 ` K.Prasad
2009-12-18 18:24 ` Oleg Nesterov
2009-12-18 20:05 ` Roland McGrath
2009-12-18 22:32 ` Oleg Nesterov
2009-12-21 10:22 ` Jan Kiszka
2009-12-21 16:53 ` Oleg Nesterov
2009-12-21 16:48 ` Jan Kiszka
2009-12-18 23:15 ` Frederic Weisbecker
2009-12-20 8:30 ` Avi Kivity [this message]
2009-12-18 17:37 ` K.Prasad
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=4B2DE0A9.4090400@redhat.com \
--to=avi@redhat.com \
--cc=fweisbec@gmail.com \
--cc=jan.kiszka@siemens.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=oleg@redhat.com \
--cc=prasad@linux.vnet.ibm.com \
--cc=roland@redhat.com \
--cc=stern@rowland.harvard.edu \
--cc=utrace-devel@redhat.com \
/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.