From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH v6 4/6] xen: arm: map child MMIO and IRQs to dom0 for PCI bus DT nodes. Date: Mon, 6 Jul 2015 11:58:18 +0100 Message-ID: <559A5F4A.7020807@citrix.com> References: <1435938959.9447.171.camel@citrix.com> <1435938972-18288-4-git-send-email-ian.campbell@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1435938972-18288-4-git-send-email-ian.campbell@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell , xen-devel@lists.xen.org Cc: stefano.stabellini@eu.citrix.com List-Id: xen-devel@lists.xenproject.org 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 Regards, -- Julien Grall