Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1344189

Re: [PATCH] KVM: x86: fix missed hardware breakpoints

From Paolo Bonzini <pbonzini@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH] KVM: x86: fix missed hardware breakpoints
Date 2016-02-26 12:50 +0100
Message-ID <r6p4e-2AD-5@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

Show all headers | View raw



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

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


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