From: Jim Mattson <jmattson@google.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Lai Jiangshan <laijs@linux.alibaba.com>,
Lai Jiangshan <jiangshanlai@gmail.com>,
linux-kernel@vger.kernel.org,
Sean Christopherson <seanjc@google.com>,
Vitaly Kuznetsov <vkuznets@redhat.com>,
Wanpeng Li <wanpengli@tencent.com>,
Joerg Roedel <joro@8bytes.org>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
kvm@vger.kernel.org
Subject: Re: [PATCH] KVM: X86: Also reload the debug registers before kvm_x86->run() when the host is using them
Date: Fri, 9 Jul 2021 09:35:30 -0700 [thread overview]
Message-ID: <CALMp9eQWnUM-O7VmMWTGE2C2YraWxM2K0QcOQnbkctkzg_1pUA@mail.gmail.com> (raw)
In-Reply-To: <01946b5a-9912-3dfb-36f0-031f425432d2@redhat.com>
On Fri, Jul 9, 2021 at 8:52 AM Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> On 09/07/21 12:05, Lai Jiangshan wrote:
> >
> >
> > On 2021/7/9 17:49, Paolo Bonzini wrote:
> >> On 09/07/21 05:09, Lai Jiangshan wrote:
> >>> I just noticed that emulation.c fails to emulate with DBn.
> >>> Is there any problem around it?
> >>
> >> Just what you said, it's not easy and the needs are limited. I
> >> implemented kvm_vcpu_check_breakpoint because I was interested in
> >> using hardware breakpoints from gdb, even with unrestricted_guest=0
> >> and invalid guest state, but that's it.
> >
> > It seems kvm_vcpu_check_breakpoint() handles only for code breakpoint
> > and doesn't handle for data breakpoints.
>
> Correct, there's a comment above the call. But data breakpoint are much
> harder and relatively less useful.
Data breakpoints are actually quite useful. I/O breakpoints not so much.
> > And no code handles DR7_GD bit when the emulation is not resulted from
> > vm-exit. (for example, the non-first instruction when kvm emulates
> > instructions back to back and the instruction accesses to DBn).
>
> Good point, that should be fixed too.
>
> Paolo
>
next prev parent reply other threads:[~2021-07-09 16:36 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-28 17:26 [PATCH] KVM: X86: Also reload the debug registers before kvm_x86->run() when the host is using them Lai Jiangshan
2021-07-08 16:48 ` Paolo Bonzini
2021-07-09 3:09 ` Lai Jiangshan
2021-07-09 9:49 ` Paolo Bonzini
2021-07-09 10:05 ` Lai Jiangshan
2021-07-09 15:52 ` Paolo Bonzini
2021-07-09 16:35 ` Jim Mattson [this message]
2021-07-09 16:58 ` Paolo Bonzini
2021-07-09 17:01 ` Jim Mattson
2021-07-09 16:49 ` Sean Christopherson
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=CALMp9eQWnUM-O7VmMWTGE2C2YraWxM2K0QcOQnbkctkzg_1pUA@mail.gmail.com \
--to=jmattson@google.com \
--cc=bp@alien8.de \
--cc=hpa@zytor.com \
--cc=jiangshanlai@gmail.com \
--cc=joro@8bytes.org \
--cc=kvm@vger.kernel.org \
--cc=laijs@linux.alibaba.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=pbonzini@redhat.com \
--cc=seanjc@google.com \
--cc=tglx@linutronix.de \
--cc=vkuznets@redhat.com \
--cc=wanpengli@tencent.com \
--cc=x86@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).