From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH] KVM: x86: fix root cause for missed hardware breakpoints Date: Fri, 26 Feb 2016 13:48:47 +0100 Message-ID: <56D049AF.3070205@redhat.com> References: <1456487175-8648-1-git-send-email-pbonzini@redhat.com> <56D03E92.6080607@linux.intel.com> <88D39E57-59DC-4DC6-9C14-2C69D10DF9C8@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: Linux Kernel Mailing List , kvm , stable@vger.kernel.org, Nadav Amit , Andrey Wagin , Xiao Guangrong To: Nadav Amit Return-path: Received: from mx1.redhat.com ([209.132.183.28]:49202 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751555AbcBZMsx (ORCPT ); Fri, 26 Feb 2016 07:48:53 -0500 In-Reply-To: <88D39E57-59DC-4DC6-9C14-2C69D10DF9C8@gmail.com> Sender: kvm-owner@vger.kernel.org List-ID: On 26/02/2016 13:14, Nadav Amit wrote: > Seems correct. The code may be easier to follow if the following line: > > vcpu->arch.switch_db_regs &= ~KVM_DEBUGREG_WONT_EXIT > > would have been moved out of svm_sync_dirty_debug_regs and > vmx_sync_dirty_debug_regs into the flow of vcpu_enter_guest (above). It is there because removing the bit is tied to actually enabling debug register exits. On one hand it's bad to have duplicated code, on the other hand there's a reason for it... I'm a bit undecided on whether to move that duplicated line to x86.c. Paolo