Hi Ian,

Some minor comments:

On 03/07/15 16:56, Ian Campbell wrote:
> +static int map_range_to_domain(const struct dt_device_node *dev,
> +                               u64 addr, u64 len,
> +                               void *data)
> +{
> +    struct domain *d = data;
> +    bool_t need_mapping = !dt_device_for_passthrough(dev);
> +    int res;
> +
> +    res = iomem_permit_access(d, paddr_to_pfn(addr & PAGE_MASK),

the PAGE_MASK is not useful here.

> +                              paddr_to_pfn(PAGE_ALIGN(addr + len - 1)));
> +    if ( res )
> +    {
> +        printk(XENLOG_ERR "Unable to permit to dom%d access to"
> +               " 0x%"PRIx64" - 0x%"PRIx64"\n",
> +               d->domain_id,
> +               addr & PAGE_MASK, PAGE_ALIGN(addr + len) - 1);
> +        return res;
> +    }
> +
> +    if ( need_mapping )
> +    {
> +        res = map_mmio_regions(d,
> +                               paddr_to_pfn(addr & PAGE_MASK),

ditto

> +                               DIV_ROUND_UP(len, PAGE_SIZE),
> +                               paddr_to_pfn(addr & PAGE_MASK));

ditto

Other than that:

Reviewed-by: Julien Grall <julien.gr...@citrix.com>

Regards,

-- 
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

Reply via email to