mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Suthikulpanit, Suravee" <suravee.suthikulpanit@amd.com>
To: Jinhui Guo <guojinhui.liam@bytedance.com>, joro@8bytes.org
Cc: iommu@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iommu/amd: Enable PCIe ACS only if AMD IOMMU is on
Date: Fri, 10 Oct 2025 14:57:59 -0500	[thread overview]
Message-ID: <12e27a8a-3fea-4d33-b0a5-4ef0b38a28b7@amd.com> (raw)
In-Reply-To: <20250928075257.1542-1-guojinhui.liam@bytedance.com>



On 9/28/2025 2:52 AM, Jinhui Guo wrote:
> To preserve PCIe performance, ACS is enabled only when
> AMD IOMMU is not disabled.
> 
> Signed-off-by: Jinhui Guo <guojinhui.liam@bytedance.com>
> ---
>   drivers/iommu/amd/init.c | 6 ++++--
>   1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/iommu/amd/init.c b/drivers/iommu/amd/init.c
> index ba9e582a8bbe..6e9eab365123 100644
> --- a/drivers/iommu/amd/init.c
> +++ b/drivers/iommu/amd/init.c
> @@ -3212,8 +3212,10 @@ static bool __init detect_ivrs(void)
>   	}
>   
>   out:
> -	/* Make sure ACS will be enabled during PCI probe */
> -	pci_request_acs();
> +	if (!amd_iommu_disabled || amd_iommu_force_enable) {

You should not need to check the amd_iommu_force_enable since it is used 
only to skip a workaround logic within the same function. You can simply 
just do

	if (!amd_iommu_disabled)
		/* Make sure ACS will be enabled during PCI probe */
		pci_request_acs();

With that

Reviewed-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>

Thanks,
Suravee

> +		/* Make sure ACS will be enabled during PCI probe */
> +		pci_request_acs();
> +	}
>   
>   	return true;
>   }

      reply	other threads:[~2025-10-10 19:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-28  7:52 Jinhui Guo
2025-10-10 19:57 ` Suthikulpanit, Suravee [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=12e27a8a-3fea-4d33-b0a5-4ef0b38a28b7@amd.com \
    --to=suravee.suthikulpanit@amd.com \
    --cc=guojinhui.liam@bytedance.com \
    --cc=iommu@lists.linux.dev \
    --cc=joro@8bytes.org \
    --cc=linux-kernel@vger.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®