public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@suse.de>
To: "Aravind Gopalakrishnan" <aravind.gopalakrishnan@amd.com>,
	"Jörg Rödel" <joro@8bytes.org>
Cc: Ingo Molnar <mingo@kernel.org>,
	tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com,
	x86@kernel.org, bhelgaas@google.com,
	linux-kernel@vger.kernel.org, Suravee.Suthikulpanit@amd.com
Subject: Re: [PATCH] x86, aperture: Check for GART before accessing GART registers
Date: Wed, 8 Apr 2015 09:25:48 +0200	[thread overview]
Message-ID: <20150408072548.GC3611@pd.tnic> (raw)
In-Reply-To: <55243F4B.2090307@amd.com>

On Tue, Apr 07, 2015 at 03:34:19PM -0500, Aravind Gopalakrishnan wrote:
> On 4/7/2015 9:57 AM, Borislav Petkov wrote:
> >On Tue, Apr 07, 2015 at 09:46:26AM -0500, Aravind Gopalakrishnan wrote:
> >>Okay. I'll do that and correct the typos Ingo pointed out earlier and
> >>resend.
> >Btw, I think you should do the same in early_gart_iommu_check() too.
> >
> >Doing the testing this way would mean that we first are testing for GART
> >hw presence and then do the rest of checks. If no GART hw, the rest of
> >the checks are meaningless.
> >
> >Also, when testing do a "pci=noearly" boot which should make
> >
> >	!early_pci_allowed()
> >
> >true and thus test that path too.
> >
> 
> Here are results from further testing:
> 1. on platforms with both iommu and gart
>     - with pci=noearly, we break out of init routines in aperture_64.c
> early. amd_iommu_init() will run through it's init routine.
>         - if amd_iommu_init() fails somewhere, we fall back to
> gart_iommu_init()
>         - gart_iommu_init() fails since gart_iommu_aperture is not set.
>         - fall back to swiotlb.
>     - with amd_iommu=off
>         - init routines in aperture_64.c run fine as both amd_gart_present()
> and early_pci_allowed() are true
>         -  amd_iommu_detect() fails due to command line arg.
>         - fall back to gart iommu
>     - with pci=noearly and amd_iommu=off
>         - break out of aperture_64.c init routines, and amd_iommu_detect()
> fails.
>         - fall back to swiotlb
> 
> 2. on platform with no gart but iommu present,
>     - pci=noearly option is not relevant as we break before that due to
> !amd_gart_present()
>     - if amd_iommu_init() fails somewhere, we fall back to swiotlb, else use
> iommu
> 
> 3. on platforms with no gart and no iommu
>     - use swiotlb regardless of any command line options passed

I don't see anything out of the ordinary but then again I don't know
this code so...

@joro, can you please double-check?

Thanks.

-- 
Regards/Gruss,
    Boris.

ECO tip #101: Trim your mails when you reply.
--

  reply	other threads:[~2015-04-08  7:28 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-01 14:32 [PATCH] x86, aperture: Check for GART before accessing GART registers Aravind Gopalakrishnan
2015-04-02  6:59 ` Borislav Petkov
2015-04-02 10:01 ` Ingo Molnar
2015-04-02 15:54   ` Aravind Gopalakrishnan
2015-04-02 16:06     ` Ingo Molnar
2015-04-02 16:23       ` Aravind Gopalakrishnan
2015-04-02 16:53         ` Borislav Petkov
2015-04-02 17:04           ` Aravind Gopalakrishnan
2015-04-02 17:17             ` Borislav Petkov
2015-04-02 18:19               ` Ingo Molnar
2015-04-06 23:10                 ` Aravind Gopalakrishnan
2015-04-07 12:34                   ` Borislav Petkov
2015-04-07 14:46                     ` Aravind Gopalakrishnan
2015-04-07 14:57                       ` Borislav Petkov
2015-04-07 20:34                         ` Aravind Gopalakrishnan
2015-04-08  7:25                           ` Borislav Petkov [this message]
2015-04-14 11:15               ` Jörg-Volker Peetz
2015-04-14 11:33                 ` Borislav Petkov
2015-04-14 18:22                   ` Jörg-Volker Peetz
2015-04-14 18:36                     ` Borislav Petkov
2015-05-04 11:11                       ` Joerg Roedel

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=20150408072548.GC3611@pd.tnic \
    --to=bp@suse.de \
    --cc=Suravee.Suthikulpanit@amd.com \
    --cc=aravind.gopalakrishnan@amd.com \
    --cc=bhelgaas@google.com \
    --cc=hpa@zytor.com \
    --cc=joro@8bytes.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=x86@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