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

Re: [Xen-devel] FIXME question



On 27/06/16 10:32, Jan Beulich wrote:
>>>> On 27.06.16 at 11:23, <quan.xu@xxxxxxxxx> wrote:
>> Hi,
>>
>> When I read IOMMU code,
>> In xen/drivers/passthrough/vtd/intremap.c : pi_update_irte()..
>> There are a FIXME --
>> ''
>> * FIXME: For performance reasons we should store the 'iommu' pointer in
>> * 'struct msi_desc' in some other place, so we don't need to waste
>> * time searching it here.
>> "
>>
>> IMO, we are better to store the 'iommu' pointer in pci_dev, then
>> could I fix it as:
> Sounds reasonable.

I agree.

>
> Jan
>
>> 1. save a void *iommu  in pci_dev structure:
>>
>> --- a/xen/include/xen/pci.h
>> +++ b/xen/include/xen/pci.h
>> @@ -83,6 +83,8 @@ struct pci_dev {
>>  #define PT_FAULT_THRESHOLD 10
>>      } fault;
>>      u64 vf_rlen[6];
>> +
>> +   void *iommu; /* No common IOMMU struct so use void pointer */

Longer term, it would be nice to have concrete IOMMU type with
implementation specific fields hidden in a union, but void * will work
for now.

~Andrew

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