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

Re: [Xen-devel] [RFC for-4.5 06/12] xen/passthrough: rework dom0_pvh_reqs to use it also on ARM



>>> On 10.02.14 at 17:10, Julien Grall <julien.grall@xxxxxxxxxx> wrote:
> On 02/07/2014 05:43 PM, Julien Grall wrote:
>> DOM0 on ARM will have the same requirements as DOM0 PVH when iommu is 
> enabled.
>> Both PVH and ARM guest has paging mode translate enabled, so Xen can use it
>> to know if it needs to check the requirements.
>> 
>> Rename the function and remove "pvh" word in the commit message.
>> 
>> Signed-off-by: Julien Grall <julien.grall@xxxxxxxxxx>
>> Cc: Xiantao Zhang <xiantao.zhang@xxxxxxxxx>
>> Cc: Jan Beulich <jbeulich@xxxxxxxx>
>> ---
>>  xen/drivers/passthrough/iommu.c |   14 +++++++++-----
>>  1 file changed, 9 insertions(+), 5 deletions(-)
>> 
>> diff --git a/xen/drivers/passthrough/iommu.c 
>> b/xen/drivers/passthrough/iommu.c
>> index 19b0e23..26a5d91 100644
>> --- a/xen/drivers/passthrough/iommu.c
>> +++ b/xen/drivers/passthrough/iommu.c
>> @@ -130,13 +130,18 @@ int iommu_domain_init(struct domain *d)
>>      return hd->platform_ops->init(d);
>>  }
>>  
>> -static __init void check_dom0_pvh_reqs(struct domain *d)
>> +static __init void check_dom0_reqs(struct domain *d)
>>  {
>> +    if ( !paging_mode_translate(d) )
>> +        return;
>> +
>>      if ( !iommu_enabled )
>> -        panic("Presently, iommu must be enabled for pvh dom0\n");
>> +        panic("Presently, iommu must be enabled to use dom0 with translate 
> "
>> +              "paging mode\n");
> 
> Hmmm... this change is wrong. I forgot that iommu doesn't exist on some
> ARM platform (for instance Arndale).
> 
> Do we really this check for PVH? If yes, I will add replace the check
> by: is_pvh_domain(d) && !iommu_enabled.

Of course we need it: How would PVH Dom0 be able to do any kind
of DMA without an IOMMU?

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