[PATCH v2 4/4] swiotlb-xen: this is PV-only on x86

2021-09-17 Thread Jan Beulich via iommu
The code is unreachable for HVM or PVH, and it also makes little sense in auto-translated environments. On Arm, with xen_{create,destroy}_contiguous_region() both being stubs, I have a hard time seeing what good the Xen specific variant does - the generic one ought to be fine for all purposes

[PATCH v2 3/4] xen/pci-swiotlb: reduce visibility of symbols

2021-09-17 Thread Jan Beulich via iommu
xen_swiotlb and pci_xen_swiotlb_init() are only used within the file defining them, so make them static and remove the stubs. Otoh pci_xen_swiotlb_detect() has a use (as function pointer) from the main pci-swiotlb.c file - convert its stub to a #define to NULL. Signed-off-by: Jan Beulich

[PATCH v2 2/4] PCI: only build xen-pcifront in PV-enabled environments

2021-09-17 Thread Jan Beulich via iommu
The driver's module init function, pcifront_init(), invokes xen_pv_domain() first thing. That construct produces constant "false" when !CONFIG_XEN_PV. Hence there's no point building the driver in non-PV configurations. Drop the (now implicit and generally wrong) X86 dependency: At present,

[PATCH v2 1/4] swiotlb-xen: ensure to issue well-formed XENMEM_exchange requests

2021-09-17 Thread Jan Beulich via iommu
While the hypervisor hasn't been enforcing this, we would still better avoid issuing requests with GFNs not aligned to the requested order. Instead of altering the value also in the call to panic(), drop it there for being static and hence easy to determine without being part of the panic message.

[PATCH v2 0/4] swiotlb-xen: remaining fixes and adjustments

2021-09-17 Thread Jan Beulich via iommu
The primary intention really was the last patch, there you go (on top of what is already in xen/tip.git for-linus-5.15) ... 1: swiotlb-xen: ensure to issue well-formed XENMEM_exchange requests 2: PCI: only build xen-pcifront in PV-enabled environments 3: xen/pci-swiotlb: reduce visibility of

Re: [PATCH] swiotlb: set IO TLB segment size via cmdline

2021-09-17 Thread Jan Beulich via iommu
On 17.09.2021 11:36, Roman Skakun wrote: > I use Xen PV display. In my case, PV display backend(Dom0) allocates > contiguous buffer via DMA-API to > to implement zero-copy between Dom0 and DomU. Why does the buffer need to be allocated by Dom0? If it was allocated by DomU, it could use grants to

Re: [PATCH] swiotlb: set IO TLB segment size via cmdline

2021-09-15 Thread Jan Beulich via iommu
On 15.09.2021 15:37, Roman Skakun wrote: >>> From: Roman Skakun >>> >>> It is possible when default IO TLB size is not >>> enough to fit a long buffers as described here [1]. >>> >>> This patch makes a way to set this parameter >>> using cmdline instead of recompiling a kernel. >>> >>> [1]

Re: [PATCH] swiotlb: set IO TLB segment size via cmdline

2021-09-14 Thread Jan Beulich via iommu
On 14.09.2021 17:10, Roman Skakun wrote: > From: Roman Skakun > > It is possible when default IO TLB size is not > enough to fit a long buffers as described here [1]. > > This patch makes a way to set this parameter > using cmdline instead of recompiling a kernel. > > [1]