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

Re: [Xen-devel] [PATCH v3 06/13] xen/passthrough: iommu: Split generic IOMMU code



>>> On 11.03.14 at 18:09, Julien Grall <julien.grall@xxxxxxxxxx> wrote:
> On 03/11/2014 04:50 PM, Jan Beulich wrote:
>>>>> On 11.03.14 at 16:49, Julien Grall <julien.grall@xxxxxxxxxx> wrote:
>>> --- a/xen/drivers/passthrough/pci.c
>>> +++ b/xen/drivers/passthrough/pci.c
>>> ...
>>> +static int iommu_populate_page_table(struct domain *d)
>>> +{
>> 
>> I continue to be of the opinion that this is misplaced here. There's
>> nothing PCI-related in this function, and I doubt you can get away
>> on ARM without similar code (if you can, this should go into
>> .../x86/iommu.c imo).
> 
> On ARM, the page table is shared with the processor, we don't need to
> populate the page table. Furthermore, this function is using
> "arch.relmem_list", which is not implemented on ARM.
> 
> I can move it in x86/iommu.c and implemented the function is no-op on ARM.

Yes, please.

>>> --- /dev/null
>>> +++ b/xen/include/asm-x86/iommu.h
>>> ...
>>> +void iommu_set_dom0_mapping(struct domain *d);
>> 
>> How is this x86-specific?
> 
> iommu_set_dom0_mapping is implemented in vtd/x86/vtd.c and only used by
> vtd/iommu.c.
> 
> I think this function should be renamed to iommu_vtd_set_dom0_mapping.

Ah, indeed. But apart from naming the function properly, it being
VT-d only its declaration should be moved into
xen/drivers/passthrough/vtd/extern.h instead.

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