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

[BUG]Add PCIE devie to SMMUv3 fail



Hi,

I try to run XEN on my ARM board(Sorry, for some commercial reasons, I can't tell you on which platform I run XEN)  and add PCIE device passthrough to DomU.But an error
occurred while adding the PCIE device to SMMUv3.

Through reading the code and tracing debugging, the error is found in the function arm_smmu_add_device, which will obtain and determine whether the fwspec of the device to be added to SMMU exists.But for the XEN of arm, the fwspec of the device is created and added by judging whether the iommu field exists in the device node when XEN parses the device tree.However, the PCIE device does not appear in the device tree, so there will be no fwspec for all PCIE devices. When attempting to add a PCIE device to
SMMU, a ENODEV error will be returned.

In addition, the code at xen/drivers/passthrough/pci.c also verifies the above view. For PCIE devices, pdev is alloc in function pci_add_device by alloc_pdev.However, the function alloc_pdev does not create and add fwspec to the PCIE device.Therefore, when function pci_add_device executes to iommu_add_device,it will get the error
return of ENODEV.

How can I resolve the above errors?

The XEN version I am running is RELEASE-4.16.2.

English is not my native language; please excuse typing errors.

Cheers,

--
Sisyphean




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.