Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751231AbdHCFaV (ORCPT ); Thu, 3 Aug 2017 01:30:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40480 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751087AbdHCFaU (ORCPT ); Thu, 3 Aug 2017 01:30:20 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 20ECF859FA Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=pbonzini@redhat.com Date: Thu, 3 Aug 2017 01:30:19 -0400 (EDT) From: Paolo Bonzini To: Radim =?utf-8?B?S3LEjW3DocWZ?= Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, me@kylehuey.com Message-ID: <1586416935.1003490.1501738219700.JavaMail.zimbra@redhat.com> In-Reply-To: <20170802201338.GA32318@flask> References: <1501689810-20638-1-git-send-email-pbonzini@redhat.com> <20170802201338.GA32318@flask> Subject: Re: [PATCH] KVM: svm: support single stepping over emulated instructions MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [94.39.192.75, 10.4.196.7, 10.4.195.13] Thread-Topic: support single stepping over emulated instructions Thread-Index: COATOlzaXy+kd1CufOSczr+c9/ChqQ== X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Thu, 03 Aug 2017 05:30:20 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 714 Lines: 27 > We already have b742c1e6e79d ("KVM: SVM: handle singlestep exception > when skipping emulated instructions"), so the only applicable part of > this patch is Doh. :) > > diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c > > index 0e846f0cb83b..931ba449456e 100644 > > --- a/arch/x86/kvm/x86.c > > +++ b/arch/x86/kvm/x86.c > > @@ -5548,6 +5548,7 @@ static void kvm_vcpu_do_singlestep(struct kvm_vcpu > > *vcpu, int *r) > > */ > > vcpu->arch.dr6 &= ~15; > > vcpu->arch.dr6 |= DR6_BS | DR6_RTM; > > + kvm_update_dr6(vcpu); > > kvm_queue_exception(vcpu, DB_VECTOR); > > } > > } > > which makes sense. And shouldn't we do the same for > kvm_vcpu_check_breakpoint()? Yes, will send v2. Paolo