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

Re: [Xen-devel] [PATCH v6 4/6] xen: arm: map child MMIO and IRQs to dom0 for PCI bus DT nodes.



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.grall@xxxxxxxxxx>

Regards,

-- 
Julien Grall

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


 


Rackspace

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