Re: [PATCH 1/2] xen/arm64: do not set SWIOTLB_NO_FORCE when swiotlb is required

2021-05-12 Thread Stefano Stabellini
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) &&

Re: [PATCH 1/2] xen/arm64: do not set SWIOTLB_NO_FORCE when swiotlb is required

2021-05-12 Thread Christoph Hellwig
> -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; > -

[PATCH 1/2] xen/arm64: do not set SWIOTLB_NO_FORCE when swiotlb is required

2021-05-11 Thread Stefano Stabellini
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