From: Roman Skakun <Roman_Skakun@epam.com>
To: "sstabellini@kernel.org" <sstabellini@kernel.org>
Cc: Bertrand Marquis <bertrand.marquis@arm.com>,
Andrii Anisov <Andrii_Anisov@epam.com>,
Julien Grall <julien@xen.org>,
Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>,
Oleksandr Tyshchenko <Oleksandr_Tyshchenko@epam.com>,
Oleksandr Andrushchenko <Oleksandr_Andrushchenko@epam.com>,
"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
Roman Skakun <Roman_Skakun@epam.com>,
Roman Skakun <rm.skakun@gmail.com>,
Jan Beulich <jbeulich@suse.com>
Subject: Disable swiotlb for Dom0
Date: Tue, 10 Aug 2021 15:38:42 +0000 [thread overview]
Message-ID: <AM7PR03MB6593B4461B99297C8650CF1C85F79@AM7PR03MB6593.eurprd03.prod.outlook.com> (raw)
Hi, Stefano!
I have observed your patch here:
https://patchwork.kernel.org/project/xen-devel/patch/alpine.DEB.2.21.2102161333090.3234@sstabellini-ThinkPad-T480s/
And I collided with the same issue, when Dom0 device trying to use
swiotlb fops for devices which are controlled by IOMMU.
Prerequisites:
https://github.com/xen-project/xen/tree/stable-4.15
https://github.com/torvalds/linux/tree/v5.10
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?
next reply other threads:[~2021-08-10 15:39 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-10 15:38 Roman Skakun [this message]
2021-08-10 16:16 ` Disable swiotlb for Dom0 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AM7PR03MB6593B4461B99297C8650CF1C85F79@AM7PR03MB6593.eurprd03.prod.outlook.com \
--to=roman_skakun@epam.com \
--cc=Andrii_Anisov@epam.com \
--cc=Oleksandr_Andrushchenko@epam.com \
--cc=Oleksandr_Tyshchenko@epam.com \
--cc=Volodymyr_Babchuk@epam.com \
--cc=bertrand.marquis@arm.com \
--cc=jbeulich@suse.com \
--cc=julien@xen.org \
--cc=rm.skakun@gmail.com \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).