WSL2-Linux-Kernel/arch/arm/xen
Stefano Stabellini 97729b653d xen/swiotlb: check if the swiotlb has already been initialized
xen_swiotlb_init calls swiotlb_late_init_with_tbl, which fails with
-ENOMEM if the swiotlb has already been initialized.

Add an explicit check io_tlb_default_mem != NULL at the beginning of
xen_swiotlb_init. If the swiotlb is already initialized print a warning
and return -EEXIST.

On x86, the error propagates.

On ARM, we don't actually need a special swiotlb buffer (yet), any
buffer would do. So ignore the error and continue.

CC: boris.ostrovsky@oracle.com
CC: jgross@suse.com
Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
Reviewed-by: Boris Ostrovsky <boris.ostrvsky@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20210512201823.1963-3-sstabellini@kernel.org
Signed-off-by: Juergen Gross <jgross@suse.com>
2021-05-14 15:52:11 +02:00
..
Makefile xen/efi: have a common runtime setup function 2019-10-02 10:31:07 -04:00
enlighten.c arm/xen: Don't probe xenbus as part of an early initcall 2021-02-11 07:49:37 +01:00
grant-table.c xen: re-introduce support for grant v2 interface 2017-11-06 15:50:17 -05:00
hypercall.S get rid of legacy 'get_ds()' function 2019-03-04 10:50:14 -08:00
mm.c xen/swiotlb: check if the swiotlb has already been initialized 2021-05-14 15:52:11 +02:00
p2m.c Xen/gnttab: introduce common INVALID_GRANT_{HANDLE,REF} 2021-03-10 16:39:29 -06:00