[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.22.394.2303141747350.863724@ubuntu-linux-20-04-desktop>
Date: Tue, 14 Mar 2023 17:52:30 -0700 (PDT)
From: Stefano Stabellini <sstabellini@...nel.org>
To: Jan Beulich <jbeulich@...e.com>
cc: Huang Rui <ray.huang@....com>,
Alex Deucher <alexander.deucher@....com>,
Christian König <christian.koenig@....com>,
Stewart Hildebrand <Stewart.Hildebrand@....com>,
Xenia Ragiadakou <burzalodowa@...il.com>,
Honglei Huang <honglei1.huang@....com>,
Julia Zhang <julia.zhang@....com>,
Chen Jiqian <Jiqian.Chen@....com>,
Juergen Gross <jgross@...e.com>,
Stefano Stabellini <sstabellini@...nel.org>,
Oleksandr Tyshchenko <oleksandr_tyshchenko@...m.com>,
Boris Ostrovsky <boris.ostrovsky@...cle.com>,
Roger Pau Monné <roger.pau@...rix.com>,
xen-devel@...ts.xenproject.org, linux-kernel@...r.kernel.org,
dri-devel@...ts.freedesktop.org, amd-gfx@...ts.freedesktop.org
Subject: Re: [RFC PATCH 1/5] x86/xen: disable swiotlb for xen pvh
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).
Jurgen, what do you think? Would you rather make xen_swiotlb_detect
common between ARM and x86?
Powered by blists - more mailing lists