On Fri, Aug 16, 2019 at 06:20:00PM +0100, Paul Durrant wrote:
> Thes macros really ought to live in the common xen/iommu.h header rather
> then being distributed amongst architecture specific iommu headers and
> xen/sched.h. This patch moves them there.
> 
> NOTE: Disabling 'sharept' in the command line iommu options should really
>       be hard error on ARM (as opposed to just being ignored), so avoid
>       parsing that option if CONFIG_ARM is set.
> 
> Signed-off-by: Paul Durrant <paul.durr...@citrix.com>
> ---
> Cc: Jan Beulich <jbeul...@suse.com>
> Cc: Andrew Cooper <andrew.coop...@citrix.com>
> Cc: George Dunlap <george.dun...@eu.citrix.com>
> Cc: Ian Jackson <ian.jack...@eu.citrix.com>
> Cc: Julien Grall <julien.gr...@arm.com>
> Cc: Konrad Rzeszutek Wilk <konrad.w...@oracle.com>
> Cc: Stefano Stabellini <sstabell...@kernel.org>
> Cc: Tim Deegan <t...@xen.org>
> Cc: Wei Liu <w...@xen.org>
> Cc: Volodymyr Babchuk <volodymyr_babc...@epam.com>
> Cc: "Roger Pau Monné" <roger....@citrix.com>
> 
> Previously part of 
> https://lists.xenproject.org/archives/html/xen-devel/2019-07/msg02267.html
> ---
>  xen/drivers/passthrough/iommu.c |  2 ++
>  xen/include/asm-arm/iommu.h     |  3 ---
>  xen/include/asm-x86/iommu.h     |  4 ----
>  xen/include/xen/iommu.h         | 11 +++++++++++
>  xen/include/xen/sched.h         |  6 ------
>  5 files changed, 13 insertions(+), 13 deletions(-)
> 
> diff --git a/xen/drivers/passthrough/iommu.c b/xen/drivers/passthrough/iommu.c
> index dc7b75fab6..b24be5ffa6 100644
> --- a/xen/drivers/passthrough/iommu.c
> +++ b/xen/drivers/passthrough/iommu.c
> @@ -102,8 +102,10 @@ static int __init parse_iommu_param(const char *s)
>              iommu_hwdom_passthrough = val;
>          else if ( (val = parse_boolean("dom0-strict", s, ss)) >= 0 )
>              iommu_hwdom_strict = val;
> +#ifndef CONFIG_ARM
>          else if ( (val = parse_boolean("sharept", s, ss)) >= 0 )
>              iommu_hap_pt_share = val;
> +#endif
I would prefer if you would print a warning message in iommu_setup if
iommu_hap_pt_share is set to false on ARM, and set it to true.

The rest LGTM.

Thanks, Roger.

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

Reply via email to