All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Kevin Tian <kevin.tian@intel.com>,
	Stefano Stabellini <sstabellini@kernel.org>,
	Wei Liu <wei.liu2@citrix.com>, Jan Beulich <JBeulich@suse.com>,
	Xen-devel <xen-devel@lists.xen.org>,
	Julien Grall <julien.grall@arm.com>,
	Jun Nakajima <jun.nakajima@intel.com>
Subject: Re: [PATCH v2 3/4] xen/dom0: Drop iommu_hwdom_inclusive entirely
Date: Fri, 4 Jan 2019 13:54:05 +0100	[thread overview]
Message-ID: <20190104125405.7hmaqqlspnzububd@mac.bytemobile.com> (raw)
In-Reply-To: <9e1bf9d2-fb98-55ac-174a-c5f585ac48f8@citrix.com>

On Fri, Jan 04, 2019 at 12:46:27PM +0000, Andrew Cooper wrote:
> On 04/01/2019 12:33, Roger Pau Monné wrote:
> > On Mon, Dec 31, 2018 at 03:16:22PM +0000, Andrew Cooper wrote:
> >> This option is unique to x86 PV dom0's, but it is not sensible to have a
> >> catch-all which blindly maps all non-RAM regions into the IOMMU.
> >>
> >> The map-reserved option remains, and covers all the buggy firmware issues that
> >> I am aware of.  The two common cases are legacy USB keyboard emulation, and
> >> the BMC mailbox used by vendor firmware in NICs/HBAs to report information
> >> back to the iLO/iDRAC/etc for remote remote management purposes.
> >>
> >> A specific advantage of removing this option is that x86 dom0's IOMMU setup is
> >> now consistent between PV and PVH.
> >>
> >> This removal is not expected to have any impact, due to map-reserved
> >> remaining.  In the unlikely case that it does cause an issue, we should
> >> introduce other map-$SPECIFIC options rather than re-introducing this
> >> catch-all.
> >>
> >> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
> >> ---
> >> CC: Jan Beulich <JBeulich@suse.com>
> >> CC: Wei Liu <wei.liu2@citrix.com>
> >> CC: Roger Pau Monné <roger.pau@citrix.com>
> >> CC: Stefano Stabellini <sstabellini@kernel.org>
> >> CC: Julien Grall <julien.grall@arm.com>
> >> CC: Jun Nakajima <jun.nakajima@intel.com>
> >> CC: Kevin Tian <kevin.tian@intel.com>
> >>
> >> v2:
> >>  * New
> >> ---
> >>  docs/misc/xen-command-line.markdown   | 19 +++----------------
> >>  xen/drivers/passthrough/arm/smmu.c    |  4 ----
> >>  xen/drivers/passthrough/iommu.c       |  3 ---
> >>  xen/drivers/passthrough/vtd/x86/vtd.c |  6 ------
> >>  xen/drivers/passthrough/x86/iommu.c   | 14 ++------------
> >>  xen/include/xen/iommu.h               |  2 +-
> >>  6 files changed, 6 insertions(+), 42 deletions(-)
> >>
> >> diff --git a/docs/misc/xen-command-line.markdown b/docs/misc/xen-command-line.markdown
> >> index 0aeb786..3a9af17 100644
> >> --- a/docs/misc/xen-command-line.markdown
> >> +++ b/docs/misc/xen-command-line.markdown
> >> @@ -664,8 +664,7 @@ Controls for how dom0 is constructed on x86 systems.
> >>      hardware is not HAP-capable.
> >>  
> >>  ### dom0-iommu
> >> -> `= List of [ passthrough=<bool>, strict=<bool>, map-inclusive=<bool>,
> >> ->              map-reserved=<bool> ]`
> >> +> `= List of [ passthrough=<bool>, strict=<bool>, map-reserved=<bool> ]`
> >>  
> >>  Controls for the dom0 IOMMU setup.
> >>  
> >> @@ -692,9 +691,8 @@ Controls for the dom0 IOMMU setup.
> >>      other domains in the system don't live in a compatible address space), and
> >>      is ignored for ARM.
> >>  
> >> -*   The `map-inclusive` boolean is applicable to x86 PV dom0's, and sets up
> >> -    identity IOMMU mappings for all non-RAM regions below 4GB except for
> >> -    unusable ranges, and ranges belonging to Xen.
> >> +*   The `map-reserved` boolean is applicable to x86, and sets up identity IOMMU
> >> +    mappings for all E820 reserved regions below 4GB.
> > Current code will map all reserved regions below max_pdx, but maybe
> > the code should be changed to only map reserved regions < 4GB?
> 
> Oh - no the code is correct.
> 
> If we want to map all E820 reserved regions, then we really want all of
> them, not just those below 4G.  I'll fix the wording next time around.

Sadly the code is not fully correct, since any reserved region past
the last RAM region will be ignored, since max_pdx only accounts for
RAM regions. Will send a patch to fix it.

Roger.

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

  reply	other threads:[~2019-01-04 12:54 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-31 15:16 [PATCH v2 0/4] Functional and documentation improvements to dom0 setup Andrew Cooper
2018-12-31 15:16 ` [PATCH v2 1/4] xen/dom0: Improve documentation for dom0= and dom0-iommu= Andrew Cooper
2019-01-04 12:15   ` Roger Pau Monné
2018-12-31 15:16 ` [PATCH v2 2/4] x86/dom0: Improve dom0= useability Andrew Cooper
2019-01-04 12:17   ` Roger Pau Monné
2018-12-31 15:16 ` [PATCH v2 3/4] xen/dom0: Drop iommu_hwdom_inclusive entirely Andrew Cooper
2019-01-04 12:33   ` Roger Pau Monné
2019-01-04 12:46     ` Andrew Cooper
2019-01-04 12:54       ` Roger Pau Monné [this message]
2019-01-04 14:03   ` Roger Pau Monné
2018-12-31 15:16 ` [PATCH v2 4/4] xen/dom0: Add a dom0-iommu=none option Andrew Cooper
2019-01-04 12:38   ` Roger Pau Monné
2018-12-31 17:51 ` [PATCH v2 0/4] Functional and documentation improvements to dom0 setup Andrew Cooper

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=20190104125405.7hmaqqlspnzububd@mac.bytemobile.com \
    --to=roger.pau@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=julien.grall@arm.com \
    --cc=jun.nakajima@intel.com \
    --cc=kevin.tian@intel.com \
    --cc=sstabellini@kernel.org \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.