From: "Jan Beulich" Subject: Re: [PATCH] IOMMU: don't disable bus mastering on faults for devices used by Xen or Dom0 Date: Tue, 06 Nov 2012 12:51:09 +0000 Message-ID: <509915CD02000078000A6ABF@nat28.tlf.novell.com> References: <5097FD2902000078000A66BF@nat28.tlf.novell.com> <5098E19D02000078000A697A@nat28.tlf.novell.com> <20121106094456.GA45690@ocelot.phlegethon.org> <1352203585.505.5.camel@Solace> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1352203585.505.5.camel@Solace> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Dario Faggioli , Tim Deegan Cc: wei.huang2@amd.com, Keir Fraser , weiwang.dd@gmail.com, xiantao.zhang@intel.com, xen-devel List-Id: xen-devel@lists.xenproject.org >>> On 06.11.12 at 13:06, Dario Faggioli wrote: > On Tue, 2012-11-06 at 09:44 +0000, Tim Deegan wrote: >> > In the context of analyzing the situation described in >> > "iommu=dom0-passthrough behavior" >> > (http://lists.xen.org/archives/html/xen-devel/2012-11/msg00140.html) >> > I suppressed the IOMMU setup for some device in Dom0, and >> > was quite puzzled to find that only a single fault would occur. >> >> I think it would be better to allow some small number of faults per >> device before disabling it rather than give dom0 carte blanche. >> >> This check is really there to stop a mad device from hosing the system >> rather than to contain a malicious OS, and a properly out-of-control >> device needs to be stopped or it will livelock Xen with iommu faults. >> In a uniprocessor system, dom0 might never get the chance to fix it. >> > Right. But moving the fault handling code to softirq should have already > helped solving/mitigating that, hasn't it? It helps keeping Xen alive, but doesn't for any specific domain (including Dom0). > When implementing and testing that, I wasn't able to reproduce any > livelock situation (although I can't exclude that to be at least partly > due to my inexperience, especially at the time, with I/O > virtualization)... Jan, have you (after killing the 'disable > bus-mastering part' of course)? No, I haven't - you'd have to have a device that doesn't stop I/O after a finite amount was done (or program one that way, e.g. by handing it a cyclic list of SG descriptors or alike). Wasn't it at your (Citrix) end that the problem was actually observed/reported? Jan