linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lu Baolu <baolu.lu@linux.intel.com>
To: Sai Praneeth Prakhya <sai.praneeth.prakhya@intel.com>,
	"Mehta, Sohil" <sohil.mehta@intel.com>,
	"joro@8bytes.org" <joro@8bytes.org>,
	"dwmw2@infradead.org" <dwmw2@infradead.org>
Cc: baolu.lu@linux.intel.com,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Raj, Ashok" <ashok.raj@intel.com>, "cai@lca.pw" <cai@lca.pw>,
	"jacob.jun.pan@linux.intel.com" <jacob.jun.pan@linux.intel.com>,
	"iommu@lists.linux-foundation.org"
	<iommu@lists.linux-foundation.org>,
	"Pan, Jacob jun" <jacob.jun.pan@intel.com>,
	"Tian, Kevin" <kevin.tian@intel.com>
Subject: Re: [PATCH 5/6] iommu/vt-d: Cleanup after delegating DMA domain to generic iommu
Date: Tue, 11 Jun 2019 13:43:41 +0800	[thread overview]
Message-ID: <e7e4af38-97ab-9f15-4072-654f704c9f31@linux.intel.com> (raw)
In-Reply-To: <dbd8a4dcc9de6e7b3232c6c90597939a794860b9.camel@intel.com>

Hi,

On 6/11/19 3:25 AM, Sai Praneeth Prakhya wrote:
> On Mon, 2019-06-10 at 11:45 -0700, Mehta, Sohil wrote:
>> On Sun, 2019-06-09 at 10:38 +0800, Lu Baolu wrote:
>>>   static int __init si_domain_init(int hw)
>>> @@ -3306,14 +3252,13 @@ static int __init init_dmars(void)
>>>                  if (pasid_supported(iommu))
>>>                          intel_svm_init(iommu);
>>>   #endif
>>> -       }
>>>   
>>> -       /*
>>> -        * Now that qi is enabled on all iommus, set the root entry
>>> and flush
>>> -        * caches. This is required on some Intel X58 chipsets,
>>> otherwise the
>>> -        * flush_context function will loop forever and the boot
>>> hangs.
>>> -        */
>>> -       for_each_active_iommu(iommu, drhd) {
>>> +               /*
>>> +                * Now that qi is enabled on all iommus, set the root
>>> entry and
>>> +                * flush caches. This is required on some Intel X58
>>> chipsets,
>>> +                * otherwise the flush_context function will loop
>>> forever and
>>> +                * the boot hangs.
>>> +                */
>>>                  iommu_flush_write_buffer(iommu);
>>>                  iommu_set_root_entry(iommu);
>>>                  iommu->flush.flush_context(iommu, 0, 0, 0,
>>> DMA_CCMD_GLOBAL_INVL);
>>
>> This changes the intent of the original code. As the comment says
>> enable QI on all IOMMUs, then flush the caches and set the root entry.
>> The order of setting the root entries has changed now.
>>
>> Refer:
>> Commit a4c34ff1c029 ('iommu/vt-d: Enable QI on all IOMMUs before
>> setting root entry')
> 
> Thanks Sohil! for catching the bug.
> Will send a V2 to Lu Baolu fixing this.

Okay, I will submit a v2 of this series later.

> 
> Regards,
> Sai

Best regards,
Baolu

  reply	other threads:[~2019-06-11  5:51 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-09  2:37 [PATCH 0/6] iommu/vt-d: Fixes and cleanups for linux-next Lu Baolu
2019-06-09  2:37 ` [PATCH 1/6] iommu/vt-d: Don't return error when device gets right domain Lu Baolu
2019-06-09  2:37 ` [PATCH 2/6] iommu/vt-d: Set domain type for a private domain Lu Baolu
2019-06-09  2:38 ` [PATCH 3/6] iommu/vt-d: Don't enable iommu's which have been ignored Lu Baolu
2019-06-09  2:38 ` [PATCH 4/6] iommu/vt-d: Fix suspicious RCU usage in probe_acpi_namespace_devices() Lu Baolu
2019-06-09  2:38 ` [PATCH 5/6] iommu/vt-d: Cleanup after delegating DMA domain to generic iommu Lu Baolu
2019-06-10 18:45   ` Mehta, Sohil
2019-06-10 19:25     ` Sai Praneeth Prakhya
2019-06-11  5:43       ` Lu Baolu [this message]
2019-06-09  2:38 ` [PATCH 6/6] iommu/vt-d: Consolidate domain_init() to avoid duplication Lu Baolu
2019-06-11 16:55 ` [PATCH 0/6] iommu/vt-d: Fixes and cleanups for linux-next Qian Cai
2019-06-11 23:40   ` 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=e7e4af38-97ab-9f15-4072-654f704c9f31@linux.intel.com \
    --to=baolu.lu@linux.intel.com \
    --cc=ashok.raj@intel.com \
    --cc=cai@lca.pw \
    --cc=dwmw2@infradead.org \
    --cc=iommu@lists.linux-foundation.org \
    --cc=jacob.jun.pan@intel.com \
    --cc=jacob.jun.pan@linux.intel.com \
    --cc=joro@8bytes.org \
    --cc=kevin.tian@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sai.praneeth.prakhya@intel.com \
    --cc=sohil.mehta@intel.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).