mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Baolu Lu <baolu.lu@linux.intel.com>
To: j.granados@samsung.com, David Woodhouse <dwmw2@infradead.org>,
	Joerg Roedel <joro@8bytes.org>, Will Deacon <will@kernel.org>,
	Robin Murphy <robin.murphy@arm.com>
Cc: baolu.lu@linux.intel.com, iommu@lists.linux.dev,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iommu/intel: Enable pci capabilities before assigning cache tags
Date: Wed, 26 Jun 2024 09:09:04 +0800	[thread overview]
Message-ID: <33c93a17-b888-47a8-be54-8fb0f7fee0ec@linux.intel.com> (raw)
In-Reply-To: <20240625-jag-ats_cache_tag_fix-v1-1-67f956e3fa93@samsung.com>

On 6/25/24 9:49 PM, Joel Granados via B4 Relay wrote:
> From: Joel Granados<j.granados@samsung.com>
> 
> Enable the pci capabilities by calling iommu_enable_pci_caps before we
> assign a cache tag. The cache_tag_assign_domain call in
> dmar_domain_attach_device uses the device_domain_info->ats_enabled
> element to decide on the cache_tag_type value. Therefore ats_enabled
> needs to be evaluated before the call to the tag cache assignment.
> 
> Signed-off-by: Joel Granados<j.granados@samsung.com>
> ---
> The "what" and "why" are included in the commit message.
> 
> Tried to place cache_tag_assign_domain before the early return in
> "if(dev_is_real_dma_subdevice(dev))". This means that the call to
> iommu_enable_pci_caps landed before the setup functions [1] which is not
> an issue as they seem to be orthogonal (I would like to be proven wrong
> here).
> 
> An alternative to this patch would be to use a different way of checking
> if the device is ATS enabled in __cache_tag_assign_domain.
> 
> Comments greatly appreciated

Thank you very much for the patch. But we already have a similar patch
which has been picked by Joerg for 6.10-rc.

https://lore.kernel.org/linux-iommu/20240620062940.201786-1-baolu.lu@linux.intel.com/

Can you please check whether above patch works for you?

Best regards,
baolu

  reply	other threads:[~2024-06-26  1:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-25 13:49 Joel Granados via B4 Relay
2024-06-26  1:09 ` Baolu Lu [this message]
2024-06-26 13:43   ` Joel Granados

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=33c93a17-b888-47a8-be54-8fb0f7fee0ec@linux.intel.com \
    --to=baolu.lu@linux.intel.com \
    --cc=dwmw2@infradead.org \
    --cc=iommu@lists.linux.dev \
    --cc=j.granados@samsung.com \
    --cc=joro@8bytes.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®