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

Re: [Xen-devel] [PATCH v3 20/24] xen/passthrough: Extend XEN_DOMCTL_assign_device to support DT device



Hi Stefano,

On 29/01/15 10:29, Stefano Stabellini wrote:
>> +static bool_t iommu_dt_device_is_assigned(const struct dt_device_node *dev)
>> +{
>> +    bool_t assigned = 0;
>> +
>> +    if ( !dt_device_is_protected(dev) )
>> +        return 1;
> 
> Why return true here?

Because any device not protected cannot be assigned to another guest.

This could be used by the toolstack to know whether the device is
assigned or not. IHMO, returning 0 would be a false negative.

Would a comment in the code suitable?

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