From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wei Wang2 Subject: [PATCH] svm: Avoid VINTR injection during NMI shadow Date: Fri, 7 May 2010 16:41:49 +0200 Message-ID: <201005071641.50013.wei.wang2@amd.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Boundary-00=_uaC5LCP1O5RNHHE" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --Boundary-00=_uaC5LCP1O5RNHHE Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi, I had observed that if xen injects and intercepts VINTR during NMI shadow, = and=20 if the xen injects NMI into guest at a very hight frequency, guest vcpu wil= l=20 hang. Attached patch avoids VINTR injection when guest is handling a NMI. Thanks, Wei Signed-off-by: Wei Wang Reviewed-by: Wei Huang =2D- Legal Information: Advanced Micro Devices GmbH Karl-Hammerschmidt-Str. 34 85609 Dornach b. M=FCnchen Gesch=E4ftsf=FChrer: Andrew Bowd, Thomas M. McCoy, Giuliano Meroni Sitz: Dornach, Gemeinde Aschheim, Landkreis M=FCnchen Registergericht M=FCnchen, HRB Nr. 43632 --Boundary-00=_uaC5LCP1O5RNHHE Content-Type: text/x-diff; charset="iso-8859-1"; name="fix_nmi.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="fix_nmi.patch" diff -r e6f751ed8e38 xen/arch/x86/hvm/svm/intr.c --- a/xen/arch/x86/hvm/svm/intr.c Tue Mar 09 10:00:37 2010 +0000 +++ b/xen/arch/x86/hvm/svm/intr.c Fri May 07 16:15:58 2010 +0200 @@ -92,6 +92,10 @@ static void enable_intr_window(struct vc * track 'NMI blocking' from NMI injection until IRET. This can be done * quite easily in software by intercepting the unblocking IRET. */ + + if ( vmcb->general1_intercepts & GENERAL1_INTERCEPT_IRET ) + return; + intr = vmcb->vintr; intr.fields.irq = 1; intr.fields.vector = 0; --Boundary-00=_uaC5LCP1O5RNHHE Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --Boundary-00=_uaC5LCP1O5RNHHE--