From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH v3 1/2] IOMMU/spinlock: Fix a bug found in AMD IOMMU initialization Date: Wed, 9 Mar 2016 15:59:38 +0100 Message-ID: <1457535578.3102.394.camel@citrix.com> References: <1457529455-38314-1-git-send-email-quan.xu@intel.com> <1457529455-38314-2-git-send-email-quan.xu@intel.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7018100322942760894==" Return-path: In-Reply-To: <1457529455-38314-2-git-send-email-quan.xu@intel.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" To: Quan Xu , xen-devel@lists.xen.org Cc: Jan Beulich , Suravee Suthikulpanit List-Id: xen-devel@lists.xenproject.org --===============7018100322942760894== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-iJJuZ+IzxjVDjmZAULB5" --=-iJJuZ+IzxjVDjmZAULB5 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, 2016-03-09 at 21:17 +0800, Quan Xu wrote: > pcidevs_lock should be held with interrupt enabled.=20 > There's a message from Jan when he says: <> :-O > However there remains > an exception in AMD IOMMU code, where the lock is acquired with > interrupt > disabled. This inconsistency might lead to deadlock. >=20 I appreciate that 'might' is weaker than 'can'. Personally, I still dob't find this correct, or at least clear enough, referred to this patch, but I won't be in the way because of this. > The fix is straightforward to use spin_lock instead. Also interrupt > has been > enabled when this function is invoked, so we're sure consistency > around > pcidevs_lock can be guaranteed after this fix. >=20 And I also can't really get what "so we're sure consistency around pcidevs_lock can be guaranteed after this fix" actually means, but again, that's probably me, and it's fine. However, > Signed-off-by: Quan Xu > Reviewed-by: Dario Faggioli > This still stands **only** if the very first sentence "pcidevs_lock should be held with interrupt enabled" is changed to "pcidevs_lock doesn't require interrupts to be disabled while being acquired". Regards, Dario --=20 <> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) --=-iJJuZ+IzxjVDjmZAULB5 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 v2 iEYEABECAAYFAlbgOloACgkQk4XaBE3IOsQLXQCcC04FRFgFTQD6mNojWV1u2Y4W qlAAn325ZTC8h28mwgJKzNpYbrGB0Hh/ =AGSE -----END PGP SIGNATURE----- --=-iJJuZ+IzxjVDjmZAULB5-- --===============7018100322942760894== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVuLm9yZwpodHRwOi8vbGlzdHMueGVuLm9y Zy94ZW4tZGV2ZWwK --===============7018100322942760894==--