Re: [PATCH 11/12] swiotlb: merge swiotlb-xen initialization into swiotlb
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: Stefano Stabellini <sstabellini@xxxxxxxxxx>
- Subject: Re: [PATCH 11/12] swiotlb: merge swiotlb-xen initialization into swiotlb
- From: Christoph Hellwig <hch@xxxxxx>
- Date: Fri, 4 Mar 2022 17:34:30 +0100
- Cc: Christoph Hellwig <hch@xxxxxx>, iommu@xxxxxxxxxxxxxxxxxxxxxxxxxx, x86@xxxxxxxxxx, Anshuman Khandual <anshuman.khandual@xxxxxxx>, Tom Lendacky <thomas.lendacky@xxxxxxx>, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>, Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Joerg Roedel <joro@xxxxxxxxxx>, David Woodhouse <dwmw2@xxxxxxxxxxxxx>, Lu Baolu <baolu.lu@xxxxxxxxxxxxxxx>, Robin Murphy <robin.murphy@xxxxxxx>, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, linux-ia64@xxxxxxxxxxxxxxx, linux-mips@xxxxxxxxxxxxxxx, linuxppc-dev@xxxxxxxxxxxxxxxx, linux-riscv@xxxxxxxxxxxxxxxxxxx, linux-s390@xxxxxxxxxxxxxxx, linux-hyperv@xxxxxxxxxxxxxxx, tboot-devel@xxxxxxxxxxxxxxxxxxxxx, linux-pci@xxxxxxxxxxxxxxx
- In-reply-to: <alpine.DEB.2.22.394.2203031447120.3261@ubuntu-linux-20-04-desktop>
- References: <20220301105311.885699-1-hch@lst.de> <20220301105311.885699-12-hch@lst.de> <alpine.DEB.2.22.394.2203011720150.3261@ubuntu-linux-20-04-desktop> <20220302081500.GB23075@lst.de> <alpine.DEB.2.22.394.2203021709470.3261@ubuntu-linux-20-04-desktop> <20220303105931.GA15137@lst.de> <alpine.DEB.2.22.394.2203031447120.3261@ubuntu-linux-20-04-desktop>
- User-agent: Mutt/1.5.17 (2007-11-01)
On Thu, Mar 03, 2022 at 02:49:29PM -0800, Stefano Stabellini wrote:
> On Thu, 3 Mar 2022, Christoph Hellwig wrote:
> > On Wed, Mar 02, 2022 at 05:25:10PM -0800, Stefano Stabellini wrote:
> > > Thinking more about it we actually need to drop the xen_initial_domain()
> > > check otherwise some cases won't be functional (Dom0 not 1:1 mapped, or
> > > DomU 1:1 mapped).
> >
> > Hmm, but that would be the case even before this series, right?
>
> Before this series we only have the xen_swiotlb_detect() check in
> xen_mm_init, we don't have a second xen_initial_domain() check.
>
> The issue is that this series is adding one more xen_initial_domain()
> check in xen_mm_init.
In current mainline xen_mm_init calls xen_swiotlb_init unconditionally.
But xen_swiotlb_init then calls xen_swiotlb_fixup after allocating
the memory, which in turn calls xen_create_contiguous_region.
xen_create_contiguous_region fails with -EINVAL for the
!xen_initial_domain() and thus caues xen_swiotlb_fixup and
xen_swiotlb_init to unwind and return -EINVAL.
So as far as I can tell there is no change in behavior, but maybe I'm
missing something subtle?
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]