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: Juergen Gross <jgross@suse.com>,
	Kevin Tian <kevin.tian@intel.com>,
	Stefano Stabellini <sstabellini@kernel.org>,
	Wei Liu <wei.liu2@citrix.com>,
	Jun Nakajima <jun.nakajima@intel.com>,
	Xen-devel <xen-devel@lists.xen.org>,
	Julien Grall <julien.grall@arm.com>,
	Jan Beulich <JBeulich@suse.com>
Subject: Re: [PATCH v3 6/7] xen/dom0: Drop iommu_hwdom_inclusive entirely
Date: Wed, 16 Jan 2019 12:24:07 +0100	[thread overview]
Message-ID: <20190116112407.rehzbvwpzvmoejfg@mac> (raw)
In-Reply-To: <1547629250-1405-7-git-send-email-andrew.cooper3@citrix.com>

On Wed, Jan 16, 2019 at 09:00:49AM +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>

Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>

> diff --git a/xen/drivers/passthrough/x86/iommu.c b/xen/drivers/passthrough/x86/iommu.c
> index e40d7a7..9fe2329 100644
> --- a/xen/drivers/passthrough/x86/iommu.c
> +++ b/xen/drivers/passthrough/x86/iommu.c
> @@ -172,10 +172,10 @@ static bool __hwdom_init hwdom_iommu_map(const struct domain *d,
>      default:
>          if ( type & RAM_TYPE_RESERVED )
>          {
> -            if ( !iommu_hwdom_inclusive && !iommu_hwdom_reserved )
> +            if ( !iommu_hwdom_reserved )
>                  return false;
>          }
> -        else if ( is_hvm_domain(d) || !iommu_hwdom_inclusive || pfn > max_pfn )
> +        else if ( is_hvm_domain(d) || pfn > max_pfn )
>              return false;
>      }

AFAICT the logic in the switch above can be simplified if
iommu_hwdom_inclusive is dropped, I will prepare a patch do this as
soon as this is committed, since I don't want to delay this series.

Thanks, Roger.

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

  reply	other threads:[~2019-01-16 11:24 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-16  9:00 [PATCH v3 for-4.12 0/7] Docs improvements, and dom0 construction fixes Andrew Cooper
2019-01-16  9:00 ` [PATCH v3 1/7] docs: Improve documentation for dom0= and dom0-iommu= Andrew Cooper
2019-01-16 10:53   ` Roger Pau Monné
2019-01-16 19:54     ` Andrew Cooper
2019-01-16 11:52   ` Jan Beulich
2019-01-16 19:51     ` Andrew Cooper
2019-01-17  8:43       ` Roger Pau Monné
2019-01-17  9:08         ` Andrew Cooper
2019-01-17  9:14           ` Juergen Gross
2019-01-17 11:59             ` Jan Beulich
2019-01-17 12:11             ` Andrew Cooper
2019-01-17 11:20       ` Jan Beulich
2019-01-17 12:15         ` Andrew Cooper
2019-01-17 12:26           ` Jan Beulich
2019-01-21 17:24             ` Andrew Cooper
2019-01-16  9:00 ` [PATCH v3 2/7] docs: Improve documentation and parsing for iommu= Andrew Cooper
2019-01-16 11:06   ` Roger Pau Monné
2019-01-21 17:30     ` Andrew Cooper
2019-01-16 13:47   ` Jan Beulich
2019-01-16  9:00 ` [PATCH v3 3/7] docs: Improve documentation and parsing for pci= Andrew Cooper
2019-01-16 11:08   ` Roger Pau Monné
2019-01-16 13:52   ` Jan Beulich
2019-01-16  9:00 ` [PATCH v3 4/7] docs: Improve documentation and parsing for efi= Andrew Cooper
2019-01-16 14:00   ` Jan Beulich
2019-01-16  9:00 ` [PATCH v3 5/7] x86/dom0: Improve dom0= useability Andrew Cooper
2019-01-16 11:13   ` Roger Pau Monné
2019-01-16 14:08   ` Jan Beulich
2019-01-16 19:58     ` Andrew Cooper
2019-01-17 11:21       ` Jan Beulich
2019-01-16  9:00 ` [PATCH v3 6/7] xen/dom0: Drop iommu_hwdom_inclusive entirely Andrew Cooper
2019-01-16 11:24   ` Roger Pau Monné [this message]
2019-01-17 13:32   ` Jan Beulich
2019-01-17 14:51     ` Roger Pau Monné
2019-01-16  9:00 ` [PATCH v3 7/7] xen/dom0: Add a dom0-iommu=none option Andrew Cooper
2019-01-16 11:32   ` Roger Pau Monné
2019-01-17 10:55   ` Wei Liu
2019-01-17 13:35   ` Jan Beulich
2019-01-21 18:08     ` Andrew Cooper
2019-01-22  8:06       ` Jan Beulich
2019-01-22 13:42         ` Andrew Cooper
2019-01-16 11:38 ` [PATCH v3 for-4.12 0/7] Docs improvements, and dom0 construction fixes Juergen Gross

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=20190116112407.rehzbvwpzvmoejfg@mac \
    --to=roger.pau@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=jgross@suse.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.