From: Konrad Rzeszutek Wilk <konrad.wilk-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
To: j.glisse-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Cc: "Jérôme Glisse" <jglisse-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
"Joerg Roedel" <jroedel-l3A5Bk7waGM@public.gmane.org>,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
Subject: Re: [PATCH] iommu/amd: Fix amd_iommu_detect() (does not fix any issues).
Date: Mon, 26 Oct 2015 12:07:17 -0400 [thread overview]
Message-ID: <20151026160717.GF5618@l.oracle.com> (raw)
In-Reply-To: <1441059183-9023-1-git-send-email-j.glisse-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
On Mon, Aug 31, 2015 at 06:13:03PM -0400, j.glisse-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote:
> From: Jérôme Glisse <jglisse-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
>
> Fix amd_iommu_detect() to return positive value on success, like
> intended, and not zero. This will not change anything in the end
> as AMD IOMMU disable swiotlb and properly associate itself with
Not sure how it disables SWIOTLB? The AMD Vi does not seem to
change 'swiotlb'. While 'gart_iommu_init' does. Did you mean
the AMD GART code?
> devices even if detect() doesn't return a positive value.
Returning positive will mean that the pci_iommu_alloc will stop
processing _all_ other IOMMUs.
While returning 0 will let it detect the other IOMMUs.
Granted on an AMD machine there can be two 'IOMMU's - the GART
and the AMD Vi. The detection is always to call gart_iommu_hole_init
first, then amd_iommu_detect.
I presume if there was one more type on AMD we would run into trouble.
>
> Signed-off-by: Jérôme Glisse <jglisse-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> Cc: Joerg Roedel <jroedel-l3A5Bk7waGM@public.gmane.org>
> Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
> ---
> drivers/iommu/amd_iommu_init.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iommu/amd_iommu_init.c b/drivers/iommu/amd_iommu_init.c
> index a24495e..360a451 100644
> --- a/drivers/iommu/amd_iommu_init.c
> +++ b/drivers/iommu/amd_iommu_init.c
> @@ -2198,7 +2198,7 @@ int __init amd_iommu_detect(void)
> iommu_detected = 1;
> x86_init.iommu.iommu_init = amd_iommu_init;
>
> - return 0;
> + return 1;
> }
>
> /****************************************************************************
> --
> 1.8.3.1
>
> _______________________________________________
> iommu mailing list
> iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
> https://lists.linuxfoundation.org/mailman/listinfo/iommu
next prev parent reply other threads:[~2015-10-26 16:07 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-31 22:13 [PATCH] iommu/amd: Fix amd_iommu_detect() (does not fix any issues) j.glisse-Re5JQEeQqe8AvxtiuMwx3w
[not found] ` <1441059183-9023-1-git-send-email-j.glisse-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-09-24 14:50 ` Joerg Roedel
2015-10-26 16:07 ` Konrad Rzeszutek Wilk [this message]
2015-10-27 0:47 ` Jerome Glisse
[not found] ` <20151027004747.GA3569-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-10-27 0:53 ` Jerome Glisse
[not found] ` <20151027005329.GB3569-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-10-27 14:10 ` Konrad Rzeszutek Wilk
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=20151026160717.GF5618@l.oracle.com \
--to=konrad.wilk-qhclzuegtsvqt0dzr+alfa@public.gmane.org \
--cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
--cc=j.glisse-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=jglisse-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=jroedel-l3A5Bk7waGM@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.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