From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A403DC77B61 for ; Thu, 27 Apr 2023 09:35:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243228AbjD0JfX (ORCPT ); Thu, 27 Apr 2023 05:35:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53720 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243047AbjD0JfT (ORCPT ); Thu, 27 Apr 2023 05:35:19 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 5598B35B8 for ; Thu, 27 Apr 2023 02:35:18 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id DC2D82F4; Thu, 27 Apr 2023 02:36:01 -0700 (PDT) Received: from [10.57.23.190] (unknown [10.57.23.190]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 9C48A3F64C; Thu, 27 Apr 2023 02:35:16 -0700 (PDT) Message-ID: Date: Thu, 27 Apr 2023 10:35:11 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [PATCH] iommu/vt-d: Remove unnecessary locking in intel_irq_remapping_alloc() To: Nicolin Chen , Baolu Lu Cc: Jason Gunthorpe , "iommu@lists.linux.dev" , Joerg Roedel , Will Deacon , Kevin Tian , "linux-kernel@vger.kernel.org" References: <20230314051836.23817-1-baolu.lu@linux.intel.com> <09e4ce6e-0341-8590-b933-795ee28326a3@linux.intel.com> Content-Language: en-GB From: Robin Murphy In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2023-04-27 04:37, Nicolin Chen wrote: > On Thu, Apr 27, 2023 at 11:20:40AM +0800, Baolu Lu wrote: > >>> Attaching WARNINGs: >>> [ 19.680725] ------------[ cut here ]------------ >>> [ 19.681083] WARNING: CPU: 0 PID: 561 at include/linux/mmap_lock.h:161 track_pfn_remap+0xf5/0x100 > >>> [ 19.684817] Call Trace: >>> [ 19.684893] >>> [ 19.684967] remap_pfn_range+0x3e/0xa0 >>> [ 19.685084] vfio_pci_mmap_fault+0x8a/0x160 [vfio_pci_core] > >> I took a quick look. It seems that above warnings are irrelevant to this >> commit. Can you please simply revert this commit and check whether there >> are any changes? > > I tried on top of the v6.3-rc5 tag. The warnings were triggered > constantly. And reverting the commit fixes it: > nicolinc@Asurada-Nvidia:~/work/mkt/images/nicolinc/src/kernel$ git log --oneline -2 > cb3dc9b2417e (HEAD -> v6.3-rc5) Revert "iommu/vt-d: Remove unnecessary locking in intel_irq_remapping_alloc()" > 7e364e56293b (tag: v6.3-rc5, jgg/linus) Linux 6.3-rc5 > > I don't think the commit is the causation yet there seems to be > a strong correlation here... The correlation is probably that you're now getting to see a genuine warning from lockdep_assert_held(), since intel-iommu is no longer causing debug_locks to be turned off earlier. Robin.