lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e7e4af38-97ab-9f15-4072-654f704c9f31@linux.intel.com>
Date:   Tue, 11 Jun 2019 13:43:41 +0800
From:   Lu Baolu <baolu.lu@...ux.intel.com>
To:     Sai Praneeth Prakhya <sai.praneeth.prakhya@...el.com>,
        "Mehta, Sohil" <sohil.mehta@...el.com>,
        "joro@...tes.org" <joro@...tes.org>,
        "dwmw2@...radead.org" <dwmw2@...radead.org>
Cc:     baolu.lu@...ux.intel.com,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "Raj, Ashok" <ashok.raj@...el.com>, "cai@....pw" <cai@....pw>,
        "jacob.jun.pan@...ux.intel.com" <jacob.jun.pan@...ux.intel.com>,
        "iommu@...ts.linux-foundation.org" <iommu@...ts.linux-foundation.org>,
        "Pan, Jacob jun" <jacob.jun.pan@...el.com>,
        "Tian, Kevin" <kevin.tian@...el.com>
Subject: Re: [PATCH 5/6] iommu/vt-d: Cleanup after delegating DMA domain to
 generic iommu

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ