[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v2 1/5] iommu/vtd: cleanup vtd_set_hwdom_mapping after ia64 removal



> -----Original Message-----
> From: Xen-devel [mailto:xen-devel-bounces@xxxxxxxxxxxxxxxxxxxx] On Behalf
> Of Roger Pau Monne
> Sent: 01 August 2018 12:04
> To: xen-devel@xxxxxxxxxxxxxxxxxxxx
> Cc: Kevin Tian <kevin.tian@xxxxxxxxx>; Roger Pau Monne
> <roger.pau@xxxxxxxxxx>
> Subject: [Xen-devel] [PATCH v2 1/5] iommu/vtd: cleanup
> vtd_set_hwdom_mapping after ia64 removal
> 
> Remove the handling for different page sizes now that ia64 is gone.
> 
> No functional change.
> 
> Reported by: Jan Beulich <JBeulich@xxxxxxxx>
> Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>

Reviewed-by: Paul Durrant <paul.durrant@xxxxxxxxxx>

> ---
> Changes since v1:
>  - New in this version.
> ---
> Cc: Kevin Tian <kevin.tian@xxxxxxxxx>
> ---
>  xen/drivers/passthrough/vtd/x86/vtd.c | 17 ++++-------------
>  1 file changed, 4 insertions(+), 13 deletions(-)
> 
> diff --git a/xen/drivers/passthrough/vtd/x86/vtd.c
> b/xen/drivers/passthrough/vtd/x86/vtd.c
> index cc2bfea162..00a9891005 100644
> --- a/xen/drivers/passthrough/vtd/x86/vtd.c
> +++ b/xen/drivers/passthrough/vtd/x86/vtd.c
> @@ -110,7 +110,7 @@ void hvm_dpci_isairq_eoi(struct domain *d, unsigned
> int isairq)
> 
>  void __hwdom_init vtd_set_hwdom_mapping(struct domain *d)
>  {
> -    unsigned long i, j, tmp, top, max_pfn;
> +    unsigned long i, top, max_pfn;
> 
>      BUG_ON(!is_hardware_domain(d));
> 
> @@ -121,7 +121,7 @@ void __hwdom_init vtd_set_hwdom_mapping(struct
> domain *d)
>      {
>          unsigned long pfn = pdx_to_pfn(i);
>          bool map;
> -        int rc = 0;
> +        int rc;
> 
>          /*
>           * Set up 1:1 mapping for dom0. Default to include only
> @@ -152,21 +152,12 @@ void __hwdom_init
> vtd_set_hwdom_mapping(struct domain *d)
>               page_is_ram_type(pfn, RAM_TYPE_CONVENTIONAL) )
>              continue;
> 
> -        tmp = 1 << (PAGE_SHIFT - PAGE_SHIFT_4K);
> -        for ( j = 0; j < tmp; j++ )
> -        {
> -            int ret = iommu_map_page(d, pfn * tmp + j, pfn * tmp + j,
> -                                     IOMMUF_readable|IOMMUF_writable);
> -
> -            if ( !rc )
> -               rc = ret;
> -        }
> -
> +        rc = iommu_map_page(d, pfn, pfn,
> IOMMUF_readable|IOMMUF_writable);
>          if ( rc )
>              printk(XENLOG_WARNING VTDPREFIX " d%d: IOMMU mapping failed:
> %d\n",
>                     d->domain_id, rc);
> 
> -        if (!(i & (0xfffff >> (PAGE_SHIFT - PAGE_SHIFT_4K))))
> +        if (!(i & 0xfffff))
>              process_pending_softirqs();
>      }
>  }
> --
> 2.18.0
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxxx
> https://lists.xenproject.org/mailman/listinfo/xen-devel
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.