From: Jan Beulich <jbeulich@suse.com>
To: Huang Rui <ray.huang@amd.com>
Cc: "Juergen Gross" <jgross@suse.com>,
"Huang, Honglei1" <Honglei1.Huang@amd.com>,
"amd-gfx@lists.freedesktop.org" <amd-gfx@lists.freedesktop.org>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Hildebrand, Stewart" <Stewart.Hildebrand@amd.com>,
"Oleksandr Tyshchenko" <oleksandr_tyshchenko@epam.com>,
"Chen, Jiqian" <Jiqian.Chen@amd.com>,
"Xenia Ragiadakou" <burzalodowa@gmail.com>,
"Deucher, Alexander" <Alexander.Deucher@amd.com>,
"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
"Boris Ostrovsky" <boris.ostrovsky@oracle.com>,
"Zhang, Julia" <Julia.Zhang@amd.com>,
"Roger Pau Monn�" <roger.pau@citrix.com>,
"Stefano Stabellini" <sstabellini@kernel.org>,
"Koenig, Christian" <Christian.Koenig@amd.com>
Subject: Re: [RFC PATCH 1/5] x86/xen: disable swiotlb for xen pvh
Date: Wed, 15 Mar 2023 07:52:21 +0100 [thread overview]
Message-ID: <d7ce665c-8fd9-30b4-bf86-8d6907a2c17a@suse.com> (raw)
In-Reply-To: <ZBFGJUE0ahA4R9gr@amd.com>
On 15.03.2023 05:14, Huang Rui wrote:
> On Wed, Mar 15, 2023 at 08:52:30AM +0800, Stefano Stabellini wrote:
>> On Mon, 13 Mar 2023, Jan Beulich wrote:
>>> On 12.03.2023 13:01, Huang Rui wrote:
>>>> Xen PVH is the paravirtualized mode and takes advantage of hardware
>>>> virtualization support when possible. It will using the hardware IOMMU
>>>> support instead of xen-swiotlb, so disable swiotlb if current domain is
>>>> Xen PVH.
>>>
>>> But the kernel has no way (yet) to drive the IOMMU, so how can it get
>>> away without resorting to swiotlb in certain cases (like I/O to an
>>> address-restricted device)?
>>
>> I think Ray meant that, thanks to the IOMMU setup by Xen, there is no
>> need for swiotlb-xen in Dom0. Address translations are done by the IOMMU
>> so we can use guest physical addresses instead of machine addresses for
>> DMA. This is a similar case to Dom0 on ARM when the IOMMU is available
>> (see include/xen/arm/swiotlb-xen.h:xen_swiotlb_detect, the corresponding
>> case is XENFEAT_not_direct_mapped).
>
> Hi Jan, sorry to late reply. We are using the native kernel amdgpu and ttm
> driver on Dom0, amdgpu/ttm would like to use IOMMU to allocate coherent
> buffers for userptr that map the user space memory to gpu access, however,
> swiotlb doesn't support this. In other words, with swiotlb, we only can
> handle the buffer page by page.
But how does outright disabling swiotlb help with this? There still wouldn't
be an IOMMU that your kernel has control over. Looks like you want something
like pvIOMMU, but that work was never completed. And even then the swiotlb
may continue to be needed for other purposes.
Jan
next prev parent reply other threads:[~2023-03-15 6:53 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-12 12:01 [RFC PATCH 0/5] Add Xen PVH dom0 support for GPU Huang Rui
2023-03-12 12:01 ` [RFC PATCH 1/5] x86/xen: disable swiotlb for xen pvh Huang Rui
2023-03-13 8:56 ` Jan Beulich
2023-03-15 0:52 ` Stefano Stabellini
2023-03-15 4:14 ` Huang Rui
2023-03-15 6:52 ` Jan Beulich [this message]
2023-03-15 6:49 ` Jan Beulich
2023-03-15 23:25 ` Stefano Stabellini
2023-03-16 7:50 ` Jan Beulich
2023-03-16 13:45 ` Alex Deucher
2023-03-16 13:48 ` Juergen Gross
2023-03-16 13:53 ` Alex Deucher
2023-03-16 13:58 ` Jan Beulich
2023-03-16 14:20 ` Juergen Gross
2023-03-16 23:09 ` Stefano Stabellini
2023-03-17 10:19 ` Roger Pau Monné
2023-03-17 14:45 ` Alex Deucher
2023-03-21 18:55 ` Christian König
2023-03-16 16:28 ` Roger Pau Monné
2023-03-12 12:01 ` [RFC PATCH 2/5] xen/grants: update initialization order of xen grant table Huang Rui
2023-03-15 12:31 ` Roger Pau Monné
2023-03-12 12:01 ` [RFC PATCH 3/5] drm/amdgpu: set passthrough mode for xen pvh/hvm Huang Rui
2023-03-15 12:42 ` Roger Pau Monné
2023-03-12 12:01 ` [RFC PATCH 4/5] x86/xen: acpi registers gsi for xen pvh Huang Rui
2023-03-15 14:00 ` Roger Pau Monné
2023-03-12 12:01 ` [RFC PATCH 5/5] xen/privcmd: add IOCTL_PRIVCMD_GSI_FROM_IRQ Huang Rui
2023-03-15 14:26 ` Roger Pau Monné
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=d7ce665c-8fd9-30b4-bf86-8d6907a2c17a@suse.com \
--to=jbeulich@suse.com \
--cc=Alexander.Deucher@amd.com \
--cc=Christian.Koenig@amd.com \
--cc=Honglei1.Huang@amd.com \
--cc=Jiqian.Chen@amd.com \
--cc=Julia.Zhang@amd.com \
--cc=Stewart.Hildebrand@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=boris.ostrovsky@oracle.com \
--cc=burzalodowa@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jgross@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=oleksandr_tyshchenko@epam.com \
--cc=ray.huang@amd.com \
--cc=roger.pau@citrix.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
all inboxes | Powered by JetHome®