From: Ian Campbell Subject: Re: [PATCH 7 of 7] KEXEC: correctly revert x2apic state when kexecing [Reformatted] Date: Wed, 15 Jun 2011 16:50:10 +0100 Message-ID: <1308153010.17937.212.camel@zakaz.uk.xensource.com> References: <4DF896CC0200007800047532@nat28.tlf.novell.com> <4DF87DF1.4000000@citrix.com> <4DF8A218020000780004756C@nat28.tlf.novell.com> <4DF88B1B.6090503@citrix.com> <4DF8A942020000780004758A@nat28.tlf.novell.com> <4DF89EB2.3000609@citrix.com> <4DF8D2A7.2070405@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4DF8D2A7.2070405@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Andrew Cooper Cc: "xen-devel@lists.xensource.com" , Jan Beulich List-Id: xen-devel@lists.xenproject.org On Wed, 2011-06-15 at 16:41 +0100, Andrew Cooper wrote: > Tweaked the patch to prevent IOMMU_WAIT_OP panicking on the kexec path. > Unfortunately, this has to rely on the kexecing variable. > > As with the other hacks in this patch, I cant see a better way of > solving the problem. > > @@ -99,8 +100,9 @@ do { > if ( cond ) \ > break; \ > if ( NOW() > start_time + DMAR_OPERATION_TIMEOUT ) \ > - panic("%s:%d:%s: DMAR hardware is malfunctional\n", \ > - __FILE__, __LINE__, __func__); \ > + if ( !kexecing ) \ > + panic("%s:%d:%s: DMAR hardware is malfunctional\n",\ > + __FILE__, __LINE__, __func__); \ > cpu_relax(); \ > } \ > } while (0) I think you want an "else break" here to cause it to struggle onwards rather than the infinite loop you get otherwise. Ian