All of lore.kernel.org
 help / color / mirror / Atom feed
From: Baolu Lu <baolu.lu@linux.intel.com>
To: "Tian, Kevin" <kevin.tian@intel.com>,
	"iommu@lists.linux.dev" <iommu@lists.linux.dev>
Cc: baolu.lu@linux.intel.com, Joerg Roedel <joro@8bytes.org>,
	Will Deacon <will@kernel.org>,
	Robin Murphy <robin.murphy@arm.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/1] iommu/vt-d: Fix possible recursive locking in intel_iommu_init()
Date: Mon, 25 Jul 2022 17:39:11 +0800	[thread overview]
Message-ID: <c24bd222-9356-0564-414d-d54ca1e2b79b@linux.intel.com> (raw)
In-Reply-To: <BN9PR11MB52765FEEC0ED0EAB5D691FA38C959@BN9PR11MB5276.namprd11.prod.outlook.com>

On 2022/7/25 15:40, Tian, Kevin wrote:
>> From: Baolu Lu <baolu.lu@linux.intel.com>
>> Sent: Sunday, July 24, 2022 11:00 AM
>>
>> Hi Kevin,
>>
>> On 2022/7/21 15:39, Tian, Kevin wrote:
>>>> From: Lu Baolu <baolu.lu@linux.intel.com>
>>>> Sent: Tuesday, July 19, 2022 7:53 AM
>>>>
>>>> @@ -88,7 +89,8 @@ extern struct list_head dmar_drhd_units;
>>>>    static inline bool dmar_rcu_check(void)
>>>>    {
>>>>    	return rwsem_is_locked(&dmar_global_lock) ||
>>>> -	       system_state == SYSTEM_BOOTING;
>>>> +	       system_state == SYSTEM_BOOTING ||
>>>> +	       (IS_ENABLED(CONFIG_INTEL_IOMMU)
>>>> && !intel_iommu_enabled);
>>>>    }
>>>
>>> intel_iommu_enabled is 0 if CONFIG_INTEL_IOMMU is not set.
>>>
>>> same for other similar checks.
>>
>> Sorry that I didn't get your point. If CONFIG_INTEL_IOMMU is not set,
>> IS_ENABLED(CONFIG_INTEL_IOMMU) is 0. The adding check has no effect.
>> Did
>> I miss anything?
>>
> 
> My point was that the check on CONFIG_INTEL_IOMMU is unnecessary.

Oh, if INTEL_IOMMU is not configured, the interrupt remapping could also
be supported, so we still need the rcu protection. We only relax the rcu
check when INTEL_IOMMU is configured, but not enabled yet.

Best regards,
baolu


  reply	other threads:[~2022-07-25  9:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-18 23:53 [PATCH 1/1] iommu/vt-d: Fix possible recursive locking in intel_iommu_init() Lu Baolu
2022-07-21  7:39 ` Tian, Kevin
2022-07-24  2:59   ` Baolu Lu
2022-07-25  7:40     ` Tian, Kevin
2022-07-25  9:39       ` Baolu Lu [this message]
2022-09-08  6:13         ` Baolu Lu
2022-09-08  6:31           ` Tian, Kevin
2022-09-11  3:18 [PATCH 0/1] iommu/vt-d: Fixes for v6.0-rc5 Lu Baolu
2022-09-11  3:18 ` [PATCH 1/1] iommu/vt-d: Fix possible recursive locking in intel_iommu_init() Lu Baolu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c24bd222-9356-0564-414d-d54ca1e2b79b@linux.intel.com \
    --to=baolu.lu@linux.intel.com \
    --cc=iommu@lists.linux.dev \
    --cc=joro@8bytes.org \
    --cc=kevin.tian@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robin.murphy@arm.com \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.