From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Roedel, Joerg" Subject: Re: [PATCH 1/6] KVM: SVM: Advance instruction pointer in dr_intercept Date: Tue, 22 Feb 2011 12:14:08 +0100 Message-ID: <20110222111408.GH16508@amd.com> References: <1297272584-22689-1-git-send-email-joerg.roedel@amd.com> <1297272584-22689-2-git-send-email-joerg.roedel@amd.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Cc: "kvm@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Zachary Amsden To: Avi Kivity , Marcelo Tosatti Return-path: Content-Disposition: inline In-Reply-To: <1297272584-22689-2-git-send-email-joerg.roedel@amd.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On Wed, Feb 09, 2011 at 12:29:39PM -0500, Joerg Roedel wrote: > In the dr_intercept function a new cpu-feature called > decode-assists is implemented and used when available. This > code-path does not advance the guest-rip causing the guest > to dead-loop over mov-dr instructions. This is fixed by this > patch. > > Signed-off-by: Joerg Roedel > --- > arch/x86/kvm/svm.c | 2 ++ > 1 files changed, 2 insertions(+), 0 deletions(-) > > diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c > index 73a8f1d..bfb4948 100644 > --- a/arch/x86/kvm/svm.c > +++ b/arch/x86/kvm/svm.c > @@ -2777,6 +2777,8 @@ static int dr_interception(struct vcpu_svm *svm) > kvm_register_write(&svm->vcpu, reg, val); > } > > + skip_emulated_instruction(&svm->vcpu); > + > return 1; > } Btw. Can you meanwhile apply this patch? It fixes a bug which sends the guest into an endless loop when decode assists is available on the host. Joerg -- AMD Operating System Research Center Advanced Micro Devices GmbH Einsteinring 24 85609 Dornach General Managers: Alberto Bozzo, Andrew Bowd Registration: Dornach, Landkr. Muenchen; Registerger. Muenchen, HRB Nr. 43632