[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 Tue, 7 Apr 2015, Jaggi, Manish wrote:
> Hi Julien,
> 
> 
> Following patch generated compiler error when HAS_PCI adn HAS_PASSTHROUGH 
> enabled.
> Please advice how to fix this issue, or you can revert this patch.
> Should I add a device structure in pci_dev or there is another way.

Hello Manish,

we have never really built Xen on ARM with HAS_PCI=y so it is normal
that it won't compile out of the box, it is not just a problem caused by
the commit below.  I imagine that you'll need to do more than setting
HAS_PCI to y in order to get PCI and PCI passthrough working properly
with Xen on ARM.  Feel free to go ahead and propose any changes
necessary.

Cheers,

Stefano


> ÂÂÂ xen/arm: Introduce a generic way to describe device
> ÂÂ Â
> ÂÂÂ Currently, Xen is supporting PCI and Platform device (based on Device 
> Tree).
> ÂÂ 
> ÂÂÂ While Xen only supports Platform device on ARM, Xen will gain support of
> ÂÂÂ PCI soon.
> ÂÂ Â
> ÂÂÂ Some drivers, such as IOMMU drivers, may handle PCI and platform device in
> ÂÂÂ the same way. Only few lines of code differs.
> ÂÂ Â
> ÂÂÂ Rather than requesting to provide 2 set of functions (one for PCI and
> ÂÂÂ one for platform device), introduce a generic structure "device" which
> ÂÂÂ is embedded in each specialized device.
> ÂÂ Â
> ÂÂÂ As x86 only supports PCI, introduce a new type device_t which will be an
> ÂÂÂ alias to pci_dev for this architecture. It will avoid to add a new field
> ÂÂÂ for this place.
> ÂÂ Â
> ÂÂÂ Signed-off-by: Julien Grall <julien.grall@xxxxxxxxxx>
> ÂÂÂ Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
> ÂÂÂ Acked-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
> ÂÂÂ CC: Keir Fraser <keir@xxxxxxx>
> ÂÂÂ CC: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> 
> ----
> 
> Compilation error
> pci.c: In function âiommu_add_deviceâ:
> pci.c:1263:5: error: implicit declaration of function âpci_to_devâ 
> [-Werror=implicit-function-declaration]
> pci.c:1263:5: error: nested extern declaration of âpci_to_devâ 
> [-Werror=nested-externs]
> pci.c:1263:5: error: passing argument 2 of âhd->platform_ops->add_deviceâ 
> makes pointer from integer without a cast [-Werror]
> pci.c:1263:5: note: expected âstruct device_t *â but argument is of type âintâ
> pci.c:1272:9: error: passing argument 2 of âhd->platform_ops->add_deviceâ 
> makes pointer from integer without a cast [-Werror]
> pci.c:1272:9: note: expected âstruct device_t *â but argument is of type âintâ
> 
> 
> Regards,
> Manish Jaggi      
_______________________________________________
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®.