xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* Disable swiotlb for Dom0
@ 2021-08-10 15:38 Roman Skakun
  2021-08-10 16:16 ` Julien Grall
  0 siblings, 1 reply; 9+ messages in thread
From: Roman Skakun @ 2021-08-10 15:38 UTC (permalink / raw)
  To: sstabellini
  Cc: Bertrand Marquis, Andrii Anisov, Julien Grall, Volodymyr Babchuk,
	Oleksandr Tyshchenko, Oleksandr Andrushchenko, xen-devel,
	Roman Skakun, Roman Skakun, Jan Beulich

Hi, Stefano!

I have observed your patch here:

And I collided with the same issue, when Dom0 device trying to use
swiotlb fops for devices which are controlled by IOMMU.


Issue caused in xen_swiotlb_map_page():
 dev: rcar-fcp, cap: 0, dma_mask: ffffffff, page: fffffe00180c7400, page_to_phys: 64b1d0000, 
xen_phys_to_dma(phys): 64b1d0000

There is retrieved MFN(0x64b1d0000), which belongs to DomU. Dom0
swiotlb couldn't proceed to this address and throws the log:

[   99.504990] rcar-fcp fea2f000.fcp: swiotlb buffer is full (sz: 3686400 bytes), total 32768 (slots), used 64 (slots)

Temporary, I resolved this issue by disabling swiotlb for dom0 at all
because sure that all devices goes through IOMMU, but this mention can
be true only for me.

But, I think of a more reliable way is to declare a special IOMMU
property in xen dts for each device. If the device controlled by IOMMU
not need to set swiotlb fops in arch_setup_dma_ops.
What do you think about it?

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

end of thread, other threads:[~2021-08-13 16:00 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-10 15:38 Disable swiotlb for Dom0 Roman Skakun
2021-08-10 16:16 ` Julien Grall
2021-08-11  8:49   ` Roman Skakun
2021-08-11 10:30     ` Julien Grall
2021-08-11 14:13       ` Roman Skakun
2021-08-11 15:20         ` Julien Grall
2021-08-13  9:38           ` Roman Skakun
2021-08-13 10:51             ` Julien Grall
2021-08-13 15:59               ` Roman Skakun

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).