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

Re: [Xen-devel] [PATCH v3 16/24] xen/passthrough: Introduce iommu_construct



Hi Jan,

On 19/01/15 17:02, Jan Beulich wrote:
>>>> On 13.01.15 at 15:25, <julien.grall@xxxxxxxxxx> wrote:
>> --- a/xen/drivers/passthrough/device_tree.c
>> +++ b/xen/drivers/passthrough/device_tree.c
>> @@ -41,6 +41,10 @@ int iommu_assign_dt_device(struct domain *d, struct 
>> dt_device_node *dev)
>>      if ( !list_empty(&dev->domain_list) )
>>          goto fail;
>>  
>> +    rc = iommu_construct(d);
>> +    if ( rc )
>> +        goto fail;
> 
> Considering that the only (current) caller of this it domain_build.c I'm
> afraid you're going to get into trouble if you get back -ERESTART
> here. Note that on x86 Dom0 setup works via iommu_hwdom_init(),
> which deals with the preemption needs (at that point in time) by
> calling process_pending_softirqs() every once in a while.

iommu_hwdom_init is also called for ARM (it's part of the common domain
creation code). So, I don't see any issue here as we match the same
behavior as PCI.

FWIW, on the previous version you asked to check the need_iommu(d) in
iommu_construct. For DOM0 it will return 0 and therefore never return
-ERESTART.

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