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

Re: [Xen-devel] Issue With Patch Compilation Fails ( xen/arm: Introduce a generic way to describe device) with HAS_PCI and HAS_PASSTHROUGH.





On 08/04/2015 10:31, Manish Jaggi wrote:
There are lot of issues with pci_to_dev approach
a) iommu_ops callbacks have a pci_dev parameter in x86 but have a device
parameter in arm (smmu.c)
b) hack is done to make device as pci_dev and that is not a good way
of doing.

I prefer having minimal/some redundancy of two functions rather than
changing
a lot of code.
Code duplication is harmful and it is not that minimal. In any case it
is good to have a common arch-independent infrastructure. However if you
don't like 6c5d3075d97ebe26661df063ee95b14168ad10f7, that's fine, you
can come up with a generalization that works better.

It is working now, I added a few changes in pci_dev->arch and device and
implemented pci_to_dev for arm.
For a short term this is ok, I have a generalization of individual
device.h to include/xen/device.h. Will send that after merging of PCI
passthrough patches.

The first version of the commit 6c5d307 [1] was using a generic solution lying in xen/device.h. Although it has been "Nack" by Jan Beulich because it was increasing the amount of memory used on x86.

The current solution fits the requirement for both x86 (RAM usage) and ARM (support 2 kind of device) without duplication the IOMMU ops.

Regards,

[1] http://lists.xenproject.org/archives/html/xen-devel/2014-12/msg01659.html

--
Julien Grall

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