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

Re: [Xen-devel] [PATCH 1/1] xen:vtd: missing RMRR mapping while share EPT



>>> On 24.07.14 at 10:28, <tiejun.chen@xxxxxxxxx> wrote:
> On 2014/7/24 15:45, Jan Beulich wrote:
>>>>> On 24.07.14 at 09:00, <tiejun.chen@xxxxxxxxx> wrote:
>>> On 2014/7/24 14:14, Jan Beulich wrote:
>>>>>>> On 24.07.14 at 03:23, <tiejun.chen@xxxxxxxxx> wrote:
>>>>> @@ -1867,7 +1869,21 @@ static int rmrr_identity_mapping(struct domain *d,
>>>>>
>>>>>         while ( base_pfn < end_pfn )
>>>>>         {
>>>>> -        if ( intel_iommu_map_page(d, base_pfn, base_pfn,
>>>>> +        if ( iommu_use_hap_pt(d) )
>>>>
>>>> Don't you, btw, need to extend this condition by
>>>> && (!iommu_passthrough || !is_hardware_domain(d))?
>>>
>>> Why do we need these checks here?
>>
>> At least for documentation purposes: It would be wrong to try to
>> establish these mappings. I reckon iommu_use_hap_pt() implies the
>> combined other condition, so an ASSERT() would presumably be fine
>> as well (and get even closer to the intended documentation purpose).
>>
> 
> I think if() should be reasonable here. Because
> 
> intel_iommu_map_page()
> {
>       ...
>      /* do nothing if dom0 and iommu supports pass thru */
>      if ( iommu_passthrough && is_hardware_domain(d) )
>          return 0;
> 
> We just do nothing to return simply. But if ASSERT will cause abort.

Then tell me the scenario where iommu_use_hap_pt(d) is true and
both iommu_passthrough and is_hardware_domain(d) are true too.
Remember that for Dom0 iommu_use_hap_pt() can be true only for
PVH, and PVH implies !iommu_passthrough.

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