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

Re: [Xen-devel] [PATCH] AMD-Vi: allocate root table on demand



>>> On 20.03.17 at 12:49, <Suravee.Suthikulpanit@xxxxxxx> wrote:
>> @@ -648,6 +647,13 @@ int amd_iommu_map_page(struct domain *d,
>>
>>      spin_lock(&hd->arch.mapping_lock);
>>
>> +    rc = amd_iommu_alloc_root(hd);
>> +    if ( rc )
>> +    {
>> +        spin_unlock(&hd->arch.mapping_lock);
>> +        return rc;
> 
> Within function amd_iommu_map_page(), other failures seem to be
> calling AMD_IOMMU_DEBUG() with error message, then calling domain_crash().
> Wouldn't this also be needed for this case as the only error returned
> is -ENOMEM.

Hmm, for consistency I should do this, yet this seems pretty poor
error handling to me. But we can leave this for another time.

Jan


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

 


Rackspace

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