[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v11 09/12] swiotlb: Add restricted DMA alloc/free support
 
- To: Christoph Hellwig <hch@xxxxxx>
 
- From: Claire Chang <tientzu@xxxxxxxxxxxx>
 
- Date: Wed, 16 Jun 2021 13:10:02 +0800
 
- Cc: Rob Herring <robh+dt@xxxxxxxxxx>, mpe@xxxxxxxxxxxxxx, Joerg Roedel <joro@xxxxxxxxxx>, 	Will Deacon <will@xxxxxxxxxx>, Frank Rowand <frowand.list@xxxxxxxxx>, 	Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>, boris.ostrovsky@xxxxxxxxxx, jgross@xxxxxxxx, 	Marek Szyprowski <m.szyprowski@xxxxxxxxxxx>, benh@xxxxxxxxxxxxxxxxxxx, paulus@xxxxxxxxx, 	"list@xxxxxxx:IOMMU DRIVERS" <iommu@xxxxxxxxxxxxxxxxxxxxxxxxxx>, sstabellini@xxxxxxxxxx, 	Robin Murphy <robin.murphy@xxxxxxx>, grant.likely@xxxxxxx, xypron.glpk@xxxxxx, 	Thierry Reding <treding@xxxxxxxxxx>, mingo@xxxxxxxxxx, bauerman@xxxxxxxxxxxxx, 	peterz@xxxxxxxxxxxxx, Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx>, 	Saravana Kannan <saravanak@xxxxxxxxxx>, "Rafael J . Wysocki" <rafael.j.wysocki@xxxxxxxxx>, 	heikki.krogerus@xxxxxxxxxxxxxxx, 	Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>, Randy Dunlap <rdunlap@xxxxxxxxxxxxx>, 	Dan Williams <dan.j.williams@xxxxxxxxx>, Bartosz Golaszewski <bgolaszewski@xxxxxxxxxxxx>, 	linux-devicetree <devicetree@xxxxxxxxxxxxxxx>, lkml <linux-kernel@xxxxxxxxxxxxxxx>, 	linuxppc-dev@xxxxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, 	Nicolas Boichat <drinkcat@xxxxxxxxxxxx>, Jim Quinlan <james.quinlan@xxxxxxxxxxxx>, 	Tomasz Figa <tfiga@xxxxxxxxxxxx>, bskeggs@xxxxxxxxxx, 	Bjorn Helgaas <bhelgaas@xxxxxxxxxx>, chris@xxxxxxxxxxxxxxxxxx, 	Daniel Vetter <daniel@xxxxxxxx>, airlied@xxxxxxxx, dri-devel@xxxxxxxxxxxxxxxxxxxxx, 	intel-gfx@xxxxxxxxxxxxxxxxxxxxx, jani.nikula@xxxxxxxxxxxxxxx, 	Jianxiong Gao <jxgao@xxxxxxxxxx>, joonas.lahtinen@xxxxxxxxxxxxxxx, 	linux-pci@xxxxxxxxxxxxxxx, maarten.lankhorst@xxxxxxxxxxxxxxx, 	matthew.auld@xxxxxxxxx, rodrigo.vivi@xxxxxxxxx, 	thomas.hellstrom@xxxxxxxxxxxxxxx
 
- Delivery-date: Wed, 16 Jun 2021 05:10:34 +0000
 
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
 
 
 
On Wed, Jun 16, 2021 at 12:59 PM Christoph Hellwig <hch@xxxxxx> wrote:
>
> On Wed, Jun 16, 2021 at 12:04:16PM +0800, Claire Chang wrote:
> > Just noticed that after propagating swiotlb_force setting into
> > io_tlb_default_mem->force, the memory allocation behavior for
> > swiotlb_force will change (i.e. always skipping arch_dma_alloc and
> > dma_direct_alloc_from_pool).
>
> Yes, I think we need to split a "use_for_alloc" flag from the force flag.
How about splitting is_dev_swiotlb_force into is_swiotlb_force_bounce
(io_tlb_mem->force_bounce) and is_swiotlb_force_alloc
(io_tlb_mem->force_alloc)?
 
 
    
     |