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

Re: [Xen-devel] [RFC PATCH v2 1/3] arch, arm: allow dom0 access to I/O memory of mapped devices



Hi Ian,

On 03/13/2014 03:27 PM, Ian Campbell wrote:
>> @@ -733,6 +734,15 @@ static int map_device(struct domain *d, const struct 
>> dt_device_node *dev)
>>          DPRINT("addr %u = 0x%"PRIx64" - 0x%"PRIx64"\n",
>>                 i, addr, addr + size - 1);
>>  
>> +        res = iomem_permit_access(d, paddr_to_pfn(addr & PAGE_MASK),
>> +                                  paddr_to_pfn(PAGE_ALIGN(addr + size - 
>> 1)));
>> +        if ( res )
>> +        {
>> +            printk(XENLOG_ERR "Unable to permit to dom0 access to"
>> +                   " 0x%"PRIx64" - 0x%"PRIx64"\n",
>> +                   addr & PAGE_MASK, PAGE_ALIGN(addr + size) - 1);
> 
> Not your fault but I wonder why we are using u64 here for addr and
> friends and not paddr_t.

dt_device_get_address is taken 2 pointers to u64 (e.g address and size)
in parameter. It was copy from Linux DT code.

I can send a patch to replace u64 by paddr_t for these calls.

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®.