Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754050Ab1BVLOR (ORCPT ); Tue, 22 Feb 2011 06:14:17 -0500 Received: from am1ehsobe005.messaging.microsoft.com ([213.199.154.208]:7175 "EHLO AM1EHSOBE005.bigfish.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753213Ab1BVLOP (ORCPT ); Tue, 22 Feb 2011 06:14:15 -0500 X-SpamScore: -21 X-BigFish: VPS-21(zz1432N98dNzz1202hzz8275bh15d4Rz32i637h668h61h) X-Spam-TCS-SCL: 0:0 X-Forefront-Antispam-Report: KIP:(null);UIP:(null);IPVD:NLI;H:ausb3twp02.amd.com;RD:none;EFVD:NLI X-WSS-ID: 0LH0N7J-02-6BE-02 X-M-MSG: Date: Tue, 22 Feb 2011 12:14:08 +0100 From: "Roedel, Joerg" To: Avi Kivity , Marcelo Tosatti CC: "kvm@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Zachary Amsden Subject: Re: [PATCH 1/6] KVM: SVM: Advance instruction pointer in dr_intercept 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" Content-Disposition: inline In-Reply-To: <1297272584-22689-2-git-send-email-joerg.roedel@amd.com> Organization: Advanced Micro Devices =?iso-8859-1?Q?GmbH?= =?iso-8859-1?Q?=2C_Karl-Hammerschmidt-Str=2E_34=2C_85609_Dornach_bei_M=FC?= =?iso-8859-1?Q?nchen=2C_Gesch=E4ftsf=FChrer=3A_Thomas_M=2E_McCoy=2C_Giuli?= =?iso-8859-1?Q?ano_Meroni=2C_Andrew_Bowd=2C_Sitz=3A_Dornach=2C_Gemeinde_A?= =?iso-8859-1?Q?schheim=2C_Landkreis_M=FCnchen=2C_Registergericht_M=FCnche?= =?iso-8859-1?Q?n=2C?= HRB Nr. 43632 User-Agent: Mutt/1.5.20 (2009-06-14) X-OriginatorOrg: amd.com Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1424 Lines: 42 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/