From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH 2/2] IOMMU/spinlock: Make the pcidevs_lock a recursive one Date: Tue, 8 Mar 2016 13:29:05 +0100 Message-ID: <1457440145.3102.184.camel@citrix.com> References: <1457435357-34073-1-git-send-email-quan.xu@intel.com> <1457435357-34073-3-git-send-email-quan.xu@intel.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8329450267780663930==" Return-path: In-Reply-To: <1457435357-34073-3-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: Kevin Tian , Feng Wu , Jan Beulich , Andrew Cooper , Aravind Gopalakrishnan , Suravee Suthikulpanit , Keir Fraser List-Id: xen-devel@lists.xenproject.org --===============8329450267780663930== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-lBJt/YmgRwbd8DLPTz3e" --=-lBJt/YmgRwbd8DLPTz3e Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, 2016-03-08 at 19:09 +0800, Quan Xu wrote: > Signed-off-by: Quan Xu > CC: Keir Fraser > CC: Jan Beulich > CC: Andrew Cooper > CC: Suravee Suthikulpanit > CC: Aravind Gopalakrishnan > CC: Feng Wu > CC: Kevin Tian > CC: Dario Faggioli > I've gone through the code, and it looks fine. However, when trying to apply the patch, on top of this morning's staging, I got this: [dario@Solace xen.git] $ patch -p1 < \[PATCH_2_2\]_IOMMU_spinlock\:_Make_th= e_pcidevs_lock_a_recursive_one.mbox=C2=A0 patching file xen/arch/x86/domctl.c Hunk #1 succeeded at 472 (offset 45 lines). Hunk #2 succeeded at 497 (offset 45 lines). patching file xen/arch/x86/hvm/vmsi.c Hunk #1 succeeded at 388 with fuzz 1. Hunk #2 succeeded at 446 with fuzz 1 (offset 3 lines). patching file xen/arch/x86/irq.c Hunk #1 succeeded at 1960 (offset 5 lines). Hunk #2 succeeded at 2105 (offset 5 lines). Hunk #3 succeeded at 2231 (offset 5 lines). Hunk #4 succeeded at 2239 (offset 5 lines). patching file xen/arch/x86/msi.c patching file xen/arch/x86/pci.c Hunk #1 succeeded at 88 (offset 6 lines). patching file xen/arch/x86/physdev.c patching file xen/common/sysctl.c patching file xen/drivers/passthrough/amd/iommu_init.c patching file xen/drivers/passthrough/amd/iommu_map.c patching file xen/drivers/passthrough/amd/pci_amd_iommu.c patching file xen/drivers/passthrough/pci.c Hunk #17 succeeded at 1226 with fuzz 1. Hunk #18 succeeded at 1262 (offset -6 lines). Hunk #19 succeeded at 1291 (offset -6 lines). Hunk #20 succeeded at 1340 (offset -6 lines). Hunk #21 succeeded at 1364 (offset -6 lines). Hunk #22 succeeded at 1401 (offset -6 lines). Hunk #23 succeeded at 1416 (offset -6 lines). Hunk #24 succeeded at 1471 (offset -6 lines). Hunk #25 succeeded at 1490 (offset -6 lines). Hunk #26 succeeded at 1625 (offset -6 lines). patching file xen/drivers/passthrough/vtd/iommu.c Hunk #1 succeeded at 1282 (offset -4 lines). Hunk #2 succeeded at 1424 (offset -4 lines). Hunk #3 succeeded at 1506 (offset -4 lines). Hunk #4 succeeded at 1816 (offset -4 lines). Hunk #5 succeeded at 1881 (offset -4 lines). Hunk #6 succeeded at 2109 (offset -4 lines). Hunk #7 succeeded at 2123 (offset -4 lines). patching file xen/drivers/video/vga.c patching file xen/include/xen/pci.h And, when building: gcc -O2 -fomit-frame-pointer -m64 -fno-strict-aliasing -std=3Dgnu99 -Wall -= Wstrict-prototypes -Wdeclaration-after-statement -Wno-unused-but-set-variab= le -Wno-unused-local-typedefs=C2=A0=C2=A0=C2=A0-DNDEBUG -I/home/SOURCES/xen= /xen/xen.git/xen/include -I/home/SOURCES/xen/xen/xen.git/xen/include/asm-x8= 6/mach-generic -I/home/SOURCES/xen/xen/xen.git/xen/include/asm-x86/mach-def= ault '-D__OBJECT_LABEL__=3Ddrivers$passthrough$vtd$intremap.o' -msoft-float= -fno-stack-protector -fno-exceptions -Wnested-externs -DHAVE_GAS_VMX -DHAV= E_GAS_EPT -DHAVE_GAS_FSGSBASE -U__OBJECT_LABEL__ -DHAVE_GAS_QUOTED_SYM '-D_= _OBJECT_LABEL__=3Ddrivers/passthrough/vtd/intremap.o' -mno-red-zone -mno-ss= e -fpic -fno-asynchronous-unwind-tables -DGCC_HAS_VISIBILITY_ATTRIBUTE -nos= tdinc -fno-builtin -fno-common -Werror -Wredundant-decls -Wno-pointer-arith= -pipe -g -D__XEN__ -include /home/SOURCES/xen/xen/xen.git/xen/include/xen/= config.h '-D__OBJECT_FILE__=3D"intremap.o"' -DPERF_COUNTERS -DPERF_ARRAYS -= MMD -MF ./.intremap.o.d -c intremap.c -o intremap.o In file included from /home/SOURCES/xen/xen/xen.git/xen/include/xen/bitmap.= h:6:0, =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0from /home/SOURCES/xen/xen/xen.git/xen/include/x= en/cpumask.h:78, =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0from /home/SOURCES/xen/xen/xen.git/xen/include/x= en/irq.h:4, =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0from intremap.c:20: intremap.c: In function 'pi_update_irte': intremap.c:987:27: error: passing argument 1 of '_spin_is_locked' from inco= mpatible pointer type [-Werror] =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0ASSERT(spin_is_locked(&pcidevs_lock)); =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0^ /home/SOURCES/xen/xen/xen.git/xen/include/xen/lib.h:35:35: note: in definit= ion of macro 'ASSERT' =C2=A0#define ASSERT(p) do { if ( 0 && (p) ) {} } while (0) =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0^ intremap.c:987:12: note: in expansion of macro 'spin_is_locked' =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0ASSERT(spin_is_locked(&pcidevs_lock)); =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0^ In file included from /home/SOURCES/xen/xen/xen.git/xen/include/xen/rcupdat= e.h:35:0, =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0from /home/SOURCES/xen/xen/xen.git/xen/include/x= en/irq.h:5, =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0from intremap.c:20: /home/SOURCES/xen/xen/xen.git/xen/include/xen/spinlock.h:163:5: note: expec= ted 'struct spinlock_t *' but argument is of type 'void (*)(void)' =C2=A0int _spin_is_locked(spinlock_t *lock); So, I think a refresh is necessary. Regards, Dario --=20 <> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) --=-lBJt/YmgRwbd8DLPTz3e 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 iEYEABECAAYFAlbexZIACgkQk4XaBE3IOsQR4wCeN5UnH5mXJ9KBvaztUmkWEwzj GCsAn0uQXZThOkR82NStXCOGpKVokQ6C =Ze7t -----END PGP SIGNATURE----- --=-lBJt/YmgRwbd8DLPTz3e-- --===============8329450267780663930== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVuLm9yZwpodHRwOi8vbGlzdHMueGVuLm9y Zy94ZW4tZGV2ZWwK --===============8329450267780663930==--