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

Re: [Xen-devel] [PATCH 1/2] IOMMU/MMU: Adjust top level functions for VT-d Device-TLB flush error.



>>> On 17.03.16 at 08:32, <kevin.tian@xxxxxxxxx> wrote:
>>  From: Xu, Quan
>> Sent: Thursday, March 17, 2016 2:55 PM
>> --- a/xen/drivers/passthrough/vtd/x86/vtd.c
>> +++ b/xen/drivers/passthrough/vtd/x86/vtd.c
>> @@ -140,8 +140,11 @@ void __hwdom_init vtd_set_hwdom_mapping(struct domain 
>> *d)
>> 
>>          tmp = 1 << (PAGE_SHIFT - PAGE_SHIFT_4K);
>>          for ( j = 0; j < tmp; j++ )
>> -            iommu_map_page(d, pfn * tmp + j, pfn * tmp + j,
>> -                           IOMMUF_readable|IOMMUF_writable);
>> +            if ( iommu_map_page(d, pfn * tmp + j, pfn * tmp + j,
>> +                                IOMMUF_readable|IOMMUF_writable) )
>> +                printk(XENLOG_G_ERR
>> +                       "IOMMU: Map page gfn: 0x%lx(mfn: 0x%lx) failed.\n",
>> +                       pfn * tmp + j, pfn * tmp + j);
>> 
>>          if (!(i & (0xfffff >> (PAGE_SHIFT - PAGE_SHIFT_4K))))
>>              process_pending_softirqs();
> 
> Hi, Quan, this patch looks good to me in general. Just double confirm one
> thing. Above doesn't handle error from iommu_map_page, while only
> throwing out warning. Not sure whether it has been discussed before
> as the agreement or not.

For code paths involved in preparing the hardware domain only
I had specifically asked to handle such in a best effort manner,
instead of explicitly rendering a system unbootable.

Jan


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