xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: xen-devel <xen-devel@lists.xenproject.org>,
	Kevin Tian <kevin.tian@intel.com>,
	Dario Faggioli <dfaggioli@suse.com>
Subject: Re: [PATCH] intel/iommu: setup inclusive mappings before enabling iommu
Date: Fri, 14 Sep 2018 13:06:28 +0200	[thread overview]
Message-ID: <20180914110628.nlp2pys5jcgo5ce2@mac.bytemobile.com> (raw)
In-Reply-To: <5B9B924D02000078001E8977@prv1-mh.provo.novell.com>

On Fri, Sep 14, 2018 at 04:49:49AM -0600, Jan Beulich wrote:
> >>> On 14.09.18 at 11:54, <roger.pau@citrix.com> wrote:
> > On Fri, Sep 14, 2018 at 03:06:03AM -0600, Jan Beulich wrote:
> >> >>> On 14.09.18 at 10:02, <roger.pau@citrix.com> wrote:
> >> > This restores the behavior before commit 66a9274cc3435 that changed
> >> > the order and enabled the iommu without having the inclusive mappings
> >> > setup.
> >> > 
> >> > Note that in order to restore previous behavior a new enable hook is
> >> > added to the iommu_ops struct that's only used by VT-d.
> >> 
> >> But your earlier series also extends inclusive mapping support to AMD -
> >> why is there no similar change needed there in case someone overrides
> >> the default of off in that case?
> > 
> > I don't see any iommu enable related code in amd_iommu_hwdom_init, but
> > maybe I'm missing something (same applies to ARM SMMU). AFAICT for AMD
> > the iommu is initialized in iommu_setup which happens before Dom0
> > creation.
> 
> But isn't the problem here that the IOMMU gets enabled too early?

For Intel yes, my earlier series changed the order for Intel and the
IOMMU got initialized before setting the inclusive mappings.

> Who or what tells us this isn't a problem on AMD as well (which then
> would be another regression of your earlier series, not the patch
> here, but would presumably also want fixing here)?

My earlier series only changed the initialization order of the Intel
IOMMU, AMD IOMMU has always been initialized earlier in iommu_setup,
and that's not changed.

> >> While looking at this I also notice that dom0_construct_pvh()'s call to
> >> iommu_hwdom_init() is unconditional, while dom0_construct_pv()'s is
> >> conditional. Is this really intentional?
> > 
> > No, I don't think so. AFAICT it should have the same check also
> > present on the PV Dom0 builder.
> > 
> > But then other logic in the PVH Dom0 builder should also be moved
> > under such check. For example a PVH Dom0 that's not the hardware
> > domain shouldn't get a vIOAPIC, access to the native ACPI tables or
> > the low 1MB and it could even have a flat physmap, as a PVH DomU would
> > get.
> 
> Can I take it that you'll be looking into this, a part of your PVH Dom0
> work?

Sure, there's some work to be done there.

Thanks, Roger.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  reply	other threads:[~2018-09-14 11:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-14  8:02 [PATCH] intel/iommu: setup inclusive mappings before enabling iommu Roger Pau Monne
2018-09-14  9:06 ` Jan Beulich
2018-09-14  9:54   ` Roger Pau Monné
2018-09-14 10:49     ` Jan Beulich
2018-09-14 11:06       ` Roger Pau Monné [this message]
2018-09-14 11:13         ` Jan Beulich
2018-09-14 11:32           ` Roger Pau Monné
2018-09-14 13:07 ` Dario Faggioli

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=20180914110628.nlp2pys5jcgo5ce2@mac.bytemobile.com \
    --to=roger.pau@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=dfaggioli@suse.com \
    --cc=kevin.tian@intel.com \
    --cc=xen-devel@lists.xenproject.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;
as well as URLs for NNTP newsgroup(s).