On Wed, 12 May 2021, Christoph Hellwig wrote:
> > -int xen_swiotlb_detect(void)
> > -{
> > - if (!xen_domain())
> > - return 0;
> > - if (xen_feature(XENFEAT_direct_mapped))
> > - return 1;
> > - /* legacy case */
> > - if (!xen_feature(XENFEAT_not_direct_mapped) &&
> -int xen_swiotlb_detect(void)
> -{
> - if (!xen_domain())
> - return 0;
> - if (xen_feature(XENFEAT_direct_mapped))
> - return 1;
> - /* legacy case */
> - if (!xen_feature(XENFEAT_not_direct_mapped) && xen_initial_domain())
> - return 1;
> -
From: Stefano Stabellini
Although SWIOTLB_NO_FORCE is meant to allow later calls to swiotlb_init,
today dma_direct_map_page returns error if SWIOTLB_NO_FORCE.
For now, without a larger overhaul of SWIOTLB_NO_FORCE, the best we can
do is to avoid setting SWIOTLB_NO_FORCE in mem_init when we know