Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1344181
| From | Nadav Amit <nadav.amit@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] KVM: x86: fix missed hardware breakpoints |
| Date | 2016-02-26 12:30 +0100 |
| Message-ID | <r6oKS-2sN-7@gated-at.bofh.it> (permalink) |
| References | <r3QX0-3RC-13@gated-at.bofh.it> <r6o8a-1Sy-25@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Xiao Guangrong <guangrong.xiao@linux.intel.com> wrote: > On 02/19/2016 06:56 PM, Paolo Bonzini wrote: >> Sometimes when setting a breakpoint a process doesn't stop on it. >> This is because the debug registers are not loaded correctly on >> VCPU load. >> >> >> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c >> index 4244c2baf57d..f4891f2ece23 100644 >> --- a/arch/x86/kvm/x86.c >> +++ b/arch/x86/kvm/x86.c >> @@ -2752,6 +2752,7 @@ void kvm_arch_vcpu_load(struct kvm_vcpu *vcpu, int cpu) >> } >> >> kvm_make_request(KVM_REQ_STEAL_UPDATE, vcpu); >> + 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? Note that KVM_DEBUGREG_BP_ENABLED does not have to be set, since kvm_update_dr7() is not called once the guest has KVM_DEBUGREG_WONT_EXIT. Nadav
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH] KVM: x86: fix missed hardware breakpoints Xiao Guangrong <guangrong.xiao@linux.intel.com> - 2016-02-26 11:50 +0100
Re: [PATCH] KVM: x86: fix missed hardware breakpoints Nadav Amit <nadav.amit@gmail.com> - 2016-02-26 12:30 +0100
Re: [PATCH] KVM: x86: fix missed hardware breakpoints Xiao Guangrong <guangrong.xiao@linux.intel.com> - 2016-02-26 12:50 +0100
Re: [PATCH] KVM: x86: fix missed hardware breakpoints Paolo Bonzini <pbonzini@redhat.com> - 2016-02-26 13:00 +0100
Re: [PATCH] KVM: x86: fix missed hardware breakpoints Paolo Bonzini <pbonzini@redhat.com> - 2016-02-26 12:50 +0100
csiph-web