From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: [PATCH 0 of 3] Deal with IOMMU faults in softirq context. Date: Mon, 19 Dec 2011 19:34:21 +0100 Message-ID: <1324319661.2599.28.camel@Solace> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2650221521348332798==" 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 Cc: Wei Wang2 , "allen.m.kay@intel.com" , Tim Deegan , Jan Beulich List-Id: xen-devel@lists.xenproject.org --===============2650221521348332798== Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-uPzGRdN53Jz9tbzNc/9w" --=-uPzGRdN53Jz9tbzNc/9w Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello everyone, As already discussed here [1], dealing with IOMMU faults in interrupt context may cause nasty things to happen, up to being used as a form of DoS attack, e.g., by generating a "storm" of IOMMU faults that will livelock a pCPU. To avoid this, IOMMU faults handling is being moved from interrupt to softirq context. Basically, the inerrupt handler of the IRQ originated by an IOMMU (page) fault will raise a softirq-tasklet which will then deal with the actual fault records by clearing the logs and re-enabling interrupts from the offending IOMMU(s). A single tasklet is being used even if there are more than just one IOMMU in the system, as the event should be rare enough. The series introduces the described mechanism for both Intel VT-d and AMD-Vi, and has been tested on both platforms with an hacked DomU bnx2 network driver which was generating I/O page faults upon request. Thanks and Regards, Dario [1] http://old-list-archives.xen.org/archives/html/xen-devel/2011-08/msg006= 38.html -- 0 iommu-fault-tasklet_vtd.patch 1 iommu-fault-tasklet_amd.patch -- xen/drivers/passthrough/amd/iommu_init.c | 45 +++++++++++++++++++++++++++= +++++++++++++++--- xen/drivers/passthrough/vtd/iommu.c | 35 +++++++++++++++++++++++++++= +++++--- 2 files changed, 74 insertions(+), 6 deletions(-) --=20 <> (Raistlin Majere) ------------------------------------------------------------------- Dario Faggioli, http://retis.sssup.it/people/faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) PhD Candidate, ReTiS Lab, Scuola Superiore Sant'Anna, Pisa (Italy) --=-uPzGRdN53Jz9tbzNc/9w Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iEYEABECAAYFAk7vg60ACgkQk4XaBE3IOsRlRwCeNIZWx5iU7tsYcHsZWw8r5bfn fYwAnAgC95waYk9h4wL4psSAcA+tvAj4 =qYN3 -----END PGP SIGNATURE----- --=-uPzGRdN53Jz9tbzNc/9w-- --===============2650221521348332798== 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 --===============2650221521348332798==--