Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp384674rwr; Thu, 27 Apr 2023 02:45:23 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4FQegzpeR/J+YTHF/Jps+Vg1brfb9UMt0VrFd6KyfoCxKrak+atgZuRDskPliTfl3CACD0 X-Received: by 2002:a17:902:e5c7:b0:1a9:665f:8a19 with SMTP id u7-20020a170902e5c700b001a9665f8a19mr1089396plf.5.1682588722709; Thu, 27 Apr 2023 02:45:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682588722; cv=none; d=google.com; s=arc-20160816; b=JyAlatq7giH8xmJELSgSKuqNO1mwtX9g5xf7NdoIchZs/vZ8NBvoT5te49BLPynacm vdK9siyVEAwmJxfpygrQrjFeJ1zPhF9qzLsQlDK7oQmIgroEkda3uwb9DbJjZU55s2sq CCFJz3rZu/nHOPl7ME7ZqasmOfpxdjPm5KRCrsVFR82KxbFdEYHR4nRA96LNjILtIvuo xxoaGGoReIQgb85Vxum+NzGTPgUgML9BA4vKCNt2rdAhnUJJCuAJ3naTCx8DbkI2JXig bts6YrF5aSj71GP70rqDN8C6EkYAsEvh0aNFIJzisYp8yRn0GObKLlY9K7XPYY749W26 LHgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id; bh=5eLR77qv5ONuowoiNDxhYbgPlFYsxQCx0nrbPcY+KiU=; b=Vw/b5yO4Tw3jm2YaS2A/30vtEwKVQeUlj2ZxCG8nHscXNdTZzAyms9HH/KCwARdptK 6AvwSJEHUWGg9uHWqkvb0FuABXRvG3923SJp4QKqk6Iuc6c7eaSpKwO5QXUch4AFrwie F7EIeE7DZKUnK/IzDZyfHaxS9vvSP8C1uGmYNIaDuJ8Sjkdv/Su8XF07bp5SNKCP3EKX UrpbfNDelwzP+I3Q8jbKuWqZgw9884gso/4ACYb+bt9Goo6AumqpVjxEAKnyK5F0ThtT vl/0J289c0HtDvaFsDkRhsi/haA2Rpvokap5FzrMoRbopQVa/q30gMGMDVuUAGJ9Eynb x7JA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u12-20020a17090341cc00b001a664075202si19418507ple.542.2023.04.27.02.45.07; Thu, 27 Apr 2023 02:45:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243365AbjD0JfV (ORCPT + 99 others); Thu, 27 Apr 2023 05:35:21 -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 X-Spam-Status: No, score=-5.6 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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.