Re: [Nouveau] [PATCH 2/4] x86: always initialize xen-swiotlb when xen-pcifront is enabling

2023-05-18 Thread Christoph Hellwig
On Thu, May 18, 2023 at 08:18:39PM +0200, Marek Marczykowski-Górecki wrote: > On Thu, May 18, 2023 at 03:42:51PM +0200, Christoph Hellwig wrote: > > Remove the dangerous late initialization of xen-swiotlb in > > pci_xen_swiotlb_init_late and instead just always initialize > > xen-swiotlb in the

Re: [Nouveau] [PATCH 3/4] drm/nouveau: stop using is_swiotlb_active

2023-05-18 Thread Lyude Paul
Reviewed-by: Lyude Paul Thanks for getting to this! On Thu, 2023-05-18 at 15:42 +0200, Christoph Hellwig wrote: > Drivers have no business looking into dma-mapping internals and check > what backend is used. Unfortunstely the DRM core is still broken and > tries to do plain page allocations

[Nouveau] [PATCH 3/4] drm/nouveau: stop using is_swiotlb_active

2023-05-18 Thread Christoph Hellwig
Drivers have no business looking into dma-mapping internals and check what backend is used. Unfortunstely the DRM core is still broken and tries to do plain page allocations instead of using DMA API allocators by default and uses various bandaids on when to use dma_alloc_coherent. Switch nouveau

[Nouveau] unexport swiotlb_active

2023-05-18 Thread Christoph Hellwig
Hi all, this little series removes the last swiotlb API exposed to modules. Diffstat: arch/x86/include/asm/xen/swiotlb-xen.h |6 -- arch/x86/kernel/pci-dma.c | 28 drivers/gpu/drm/nouveau/nouveau_ttm.c | 10 +++---

[Nouveau] [PATCH 2/4] x86: always initialize xen-swiotlb when xen-pcifront is enabling

2023-05-18 Thread Christoph Hellwig
Remove the dangerous late initialization of xen-swiotlb in pci_xen_swiotlb_init_late and instead just always initialize xen-swiotlb in the boot code if CONFIG_XEN_PCIDEV_FRONTEND is enabled. Signed-off-by: Christoph Hellwig --- arch/x86/include/asm/xen/swiotlb-xen.h | 6 --

[Nouveau] [PATCH 1/4] x86: move a check out of pci_xen_swiotlb_init

2023-05-18 Thread Christoph Hellwig
Move the exact checks when to initialize the Xen swiotlb code out of pci_xen_swiotlb_init and into the caller so that is uses readable positive checks, rather than negative ones that will get even more confusing with another addition. Signed-off-by: Christoph Hellwig ---

[Nouveau] [PATCH 4/4] swiotlb: unexport is_swiotlb_active

2023-05-18 Thread Christoph Hellwig
Drivers have no business looking at dma-mapping or swiotlb internals. Signed-off-by: Christoph Hellwig --- kernel/dma/swiotlb.c | 1 - 1 file changed, 1 deletion(-) diff --git a/kernel/dma/swiotlb.c b/kernel/dma/swiotlb.c index af2e304c672c43..9f1fd28264a067 100644 --- a/kernel/dma/swiotlb.c