[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <56D039B1.2030309@redhat.com>
Date: Fri, 26 Feb 2016 12:40:33 +0100
From: Paolo Bonzini <pbonzini@...hat.com>
To: Xiao Guangrong <guangrong.xiao@...ux.intel.com>,
linux-kernel@...r.kernel.org, kvm@...r.kernel.org
Cc: oleg@...hat.com, namit@...technion.ac.il, avagin@...il.com,
stable@...r.kernel.org
Subject: Re: [PATCH] KVM: x86: fix missed hardware breakpoints
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
Powered by blists - more mailing lists