From: Paolo Bonzini <pbonzini@redhat.com>
To: Xiao Guangrong <guangrong.xiao@linux.intel.com>,
linux-kernel@vger.kernel.org, kvm@vger.kernel.org
Cc: oleg@redhat.com, namit@cs.technion.ac.il, avagin@gmail.com,
stable@vger.kernel.org
Subject: Re: [PATCH] KVM: x86: fix missed hardware breakpoints
Date: Fri, 26 Feb 2016 12:40:33 +0100 [thread overview]
Message-ID: <56D039B1.2030309@redhat.com> (raw)
In-Reply-To: <56D02C01.2040400@linux.intel.com>
On 26/02/2016 11:42, Xiao Guangrong wrote:
>>
>> + vcpu->arch.switch_db_regs |= KVM_DEBUGREG_RELOAD;
>
> Er, i do not understand how it works. The BP is enabled in this test case so
> the debug registers are always reloaded before entering guest as
> KVM_DEBUGREG_BP_ENABLED bit is always set on switch_db_regs. What did i
> miss?
>
> Another impact of this fix is when vcpu is rescheduled we need to always
> reload debug registers even if guest does not enable it, it is really needed?
Hi,
I have looked further at the bug and the issue is that the lazy debug
register optimization doesn't call kvm_update_dr7 and thus does not set
KVM_DEBUGREG_BP_ENABLED. I will post a better patch shortly. However,
I still think this one is simpler to have in stable kernel releases,
because it doesn't have any dependencies.
Paolo
prev parent reply other threads:[~2016-02-26 11:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-19 10:56 [PATCH] KVM: x86: fix missed hardware breakpoints Paolo Bonzini
2016-02-26 10:42 ` Xiao Guangrong
2016-02-26 11:28 ` Nadav Amit
2016-02-26 11:42 ` Xiao Guangrong
2016-02-26 11:53 ` Paolo Bonzini
2016-02-26 11:40 ` Paolo Bonzini [this message]
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=56D039B1.2030309@redhat.com \
--to=pbonzini@redhat.com \
--cc=avagin@gmail.com \
--cc=guangrong.xiao@linux.intel.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=namit@cs.technion.ac.il \
--cc=oleg@redhat.com \
--cc=stable@vger.kernel.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 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).