From: Lu Baolu <baolu.lu@linux.intel.com>
To: Huang Adrian <adrianhuang0701@gmail.com>
Cc: baolu.lu@linux.intel.com, David Woodhouse <dwmw2@infradead.org>,
Joerg Roedel <joro@8bytes.org>,
iommu@lists.linux-foundation.org,
Kevin Tian <kevin.tian@intel.com>, Liu Yi L <yi.l.liu@intel.com>,
Jacob Pan <jacob.jun.pan@linux.intel.com>,
Nirmal Patel <nirmal.patel@linux.intel.com>,
Jonathan Derrick <jonathan.derrick@linux.dev>,
stable@vger.kernel.org, Adrian Huang <ahuang12@lenovo.com>
Subject: Re: [PATCH v2 1/1] iommu/vt-d: Fix list_add double add when enabling VMD and scalable mode
Date: Mon, 21 Feb 2022 10:44:47 +0800 [thread overview]
Message-ID: <b762903c-adf9-67a0-df6d-a1212e12670e@linux.intel.com> (raw)
In-Reply-To: <CAHKZfL0dx8HuuB1AqN3fkcHjPZDJMTfPqRgW4XnuFVE8Cw4iFQ@mail.gmail.com>
On 2/18/22 4:21 PM, Huang Adrian wrote:
>> Another thing I am still concerned is about the context entry setup.
>> What does the context entries look like for both VMD and subdevices
>> after domain_context_mapping() being called?
> pasid_table in struct device_domain_info is NULL because the field
> pasid_table is configured in intel_pasid_alloc_table().
>
> The following statement in domain_context_mapping_one() is true for
> subdevices because the context is configured by the real VMD device
> 0000:59:00.5. So, domain_context_mapping() does nothing for
> subdevices.
> if (context_present(context))
> goto out_unlock;
>
> Here is the log for your reference with pr_debug() enabled.
>
> [ 19.063445] pci 0000:59:00.5: Adding to iommu group 42
> ...
> [ 22.673502] DMAR: Set context mapping for 59:00.5
> ..
> [ 32.089696] vmd 0000:59:00.5: PCI host bridge to bus 10000:80
> [ 32.119452] pci 10000:80:01.0: [8086:352a] type 01 class 0x060400
> [ 32.126302] pci 10000:80:01.0: reg 0x10: [mem 0x00000000-0x0001ffff 64bit]
> [ 32.134023] pci 10000:80:01.0: enabling Extended Tags
> [ 32.139730] pci 10000:80:01.0: PME# supported from D0 D3hot D3cold
> [ 32.160526] DMAR: Set context mapping for 59:00.5
> [ 32.171090] pci 10000:80:01.0: Adding to iommu group 42
> ...
That's clear to me now. Thank you very much!
Best regards,
baolu
prev parent reply other threads:[~2022-02-21 2:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-16 9:13 [PATCH v2 1/1] iommu/vt-d: Fix list_add double add when enabling VMD and scalable mode Adrian Huang
2022-02-18 2:29 ` Lu Baolu
2022-02-18 8:21 ` Huang Adrian
2022-02-21 2:44 ` Lu Baolu [this message]
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=b762903c-adf9-67a0-df6d-a1212e12670e@linux.intel.com \
--to=baolu.lu@linux.intel.com \
--cc=adrianhuang0701@gmail.com \
--cc=ahuang12@lenovo.com \
--cc=dwmw2@infradead.org \
--cc=iommu@lists.linux-foundation.org \
--cc=jacob.jun.pan@linux.intel.com \
--cc=jonathan.derrick@linux.dev \
--cc=joro@8bytes.org \
--cc=kevin.tian@intel.com \
--cc=nirmal.patel@linux.intel.com \
--cc=stable@vger.kernel.org \
--cc=yi.l.liu@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