All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC + Queries] Flow of PCI passthrough in ARM
@ 2014-09-18 11:34 manish jaggi
  2014-09-22 10:45 ` Stefano Stabellini
  0 siblings, 1 reply; 38+ messages in thread
From: manish jaggi @ 2014-09-18 11:34 UTC (permalink / raw)
  To: Julien Grall, xen-devel, Stefano Stabellini, Ian Campbell,
	manish.jaggi, Prasun Kapoor, Vijay Kilari

Hi,
Below is the flow I am working on, Please provide your comments, I
have a couple of queries as well..

a) Device tree has smmu nodes and each smmu node has the mmu-master property.
In our Soc DT the mmu-master is a pcie node in device tree.

b) Xen parses the device tree and prepares a list which stores the pci
device tree node pointers. The order in device tree is mapped to
segment number in subsequent calls. For eg 1st pci node found is
segment 0, 2nd segment 1

c) During SMMU init the pcie nodes in DT are saved as smmu masters.

d) Dom0 Enumerates PCI devices, calls hypercall PHYSDEVOP_pci_device_add.
 - In Xen the SMMU iommu_ops add_device is called. I have implemented
the add_device function.
- In the add_device function
 the segment number is used to locate the device tree node pointer of
the pcie node which helps to find out the corresponding smmu.
- In the same PHYSDEVOP the BAR regions are mapped to Dom0.

Note: The current SMMU driver maps the complete Domain's Address space
for the device in SMMU hardware.

The above flow works currently for us.

Now when I call pci-assignable-add I see that the iommu_ops
remove_device in smmu driver is not called. If that is not called the
SMMU would still have the dom0 address space mappings for that device

Can you please suggest the best place (kernel / xl-tools) to put the
code which would call the remove_device in iommu_opps in the control
flow from pci-assignable-add.

One way I see is to introduce a DOMCTL_iommu_remove_device in
pci-assignable-add / pci-detach and DOMCTL_iommu_add_device in
pci-attach. Is that a valid approach  ?

-Manish

^ permalink raw reply	[flat|nested] 38+ messages in thread

end of thread, other threads:[~2014-11-07 10:29 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-18 11:34 [RFC + Queries] Flow of PCI passthrough in ARM manish jaggi
2014-09-22 10:45 ` Stefano Stabellini
2014-09-22 11:09   ` Ian Campbell
2014-09-24 10:56     ` manish jaggi
2014-09-24 10:53   ` manish jaggi
2014-09-24 12:13     ` Jan Beulich
2014-09-24 14:10     ` Stefano Stabellini
2014-09-24 18:32       ` manish jaggi
2014-09-25 10:27         ` Stefano Stabellini
2014-10-01 10:37           ` manish jaggi
2014-10-02 16:41             ` Stefano Stabellini
2014-10-02 16:59               ` Stefano Stabellini
2014-10-03  9:01                 ` Ian Campbell
2014-10-03  9:33                   ` manish jaggi
2014-10-03  9:32                 ` manish jaggi
2014-10-06 11:05                   ` manish jaggi
2014-10-06 14:11                     ` Stefano Stabellini
2014-10-06 15:38                       ` Ian Campbell
2014-10-06 17:39                         ` manish jaggi
2014-10-06 17:39                       ` manish jaggi
2014-10-07 18:17                         ` Stefano Stabellini
2014-10-08 11:46                           ` manish jaggi
2014-10-08 12:46                             ` Konrad Rzeszutek Wilk
2014-10-08 13:37                               ` manish jaggi
2014-10-08 13:45                                 ` Ian Campbell
2014-10-08 13:47                                   ` manish jaggi
2014-10-08 13:58                                     ` Ian Campbell
2014-10-08 14:51                                     ` Konrad Rzeszutek Wilk
2014-10-20 13:30                                       ` manish jaggi
2014-10-20 14:54                                         ` Stefano Stabellini
2014-11-06 15:28                                           ` manish jaggi
2014-11-06 15:48                                             ` Stefano Stabellini
2014-11-06 15:55                                               ` manish jaggi
2014-11-06 16:02                                                 ` Julien Grall
2014-11-06 16:07                                                   ` Stefano Stabellini
2014-11-06 16:20                                                     ` manish jaggi
2014-11-07 10:29                                                       ` Julien Grall
2014-11-06 19:41                                             ` Konrad Rzeszutek Wilk

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.