Re: [RFC PATCH 1/5] x86/xen: disable swiotlb for xen pvh

2023-03-16 Thread Stefano Stabellini
gt; > > > > > > > > > On 16.03.2023 00:25, Stefano Stabellini wrote: > > > > > > On Wed, 15 Mar 2023, Jan Beulich wrote: > > > > > > > On 15.03.2023 01:52, Stefano Stabellini wrote: > > > > > > > > On Mon, 13 Mar

Re: [RFC PATCH 1/5] x86/xen: disable swiotlb for xen pvh

2023-03-15 Thread Stefano Stabellini
On Wed, 15 Mar 2023, Jan Beulich wrote: > On 15.03.2023 01:52, Stefano Stabellini wrote: > > On Mon, 13 Mar 2023, Jan Beulich wrote: > >> On 12.03.2023 13:01, Huang Rui wrote: > >>> Xen PVH is the paravirtualized mode and takes advantage of hardware > >>

Re: [RFC PATCH 1/5] x86/xen: disable swiotlb for xen pvh

2023-03-14 Thread Stefano Stabellini
On Mon, 13 Mar 2023, Jan Beulich wrote: > On 12.03.2023 13:01, Huang Rui wrote: > > Xen PVH is the paravirtualized mode and takes advantage of hardware > > virtualization support when possible. It will using the hardware IOMMU > > support instead of xen-swiotlb, so disable swiotlb if current

Re: [PATCH v14 01/12] swiotlb: Refactor swiotlb init functions

2021-06-22 Thread Stefano Stabellini
On Sat, 19 Jun 2021, Claire Chang wrote: > Add a new function, swiotlb_init_io_tlb_mem, for the io_tlb_mem struct > initialization to make the code reusable. > > Signed-off-by: Claire Chang > Reviewed-by: Christoph Hellwig > Tested-by: Stefano Stabellini > Tested-by

Re: [PATCH v13 01/12] swiotlb: Refactor swiotlb init functions

2021-06-21 Thread Stefano Stabellini
On Fri, 18 Jun 2021, Christoph Hellwig wrote: > On Fri, Jun 18, 2021 at 09:09:17AM -0500, Tom Lendacky wrote: > > > swiotlb_init_with_tbl uses memblock_alloc to allocate the io_tlb_mem > > > and memblock_alloc[1] will do memset in memblock_alloc_try_nid[2], so > > > swiotlb_init_with_tbl is also

Re: [PATCH v13 09/12] swiotlb: Add restricted DMA alloc/free support

2021-06-17 Thread Stefano Stabellini
g, one must set up > another device coherent pool by shared-dma-pool and use > dma_alloc_from_dev_coherent instead for atomic coherent allocation. > > Signed-off-by: Claire Chang > Reviewed-by: Christoph Hellwig > Tested-by: Stefano Stabellini > Tested-by: Wil

Re: [PATCH v13 06/12] swiotlb: Use is_swiotlb_force_bounce for swiotlb data bouncing

2021-06-17 Thread Stefano Stabellini
by: Christoph Hellwig > Tested-by: Stefano Stabellini > Tested-by: Will Deacon Acked-by: Stefano Stabellini > --- > drivers/xen/swiotlb-xen.c | 2 +- > include/linux/swiotlb.h | 11 +++ > kernel/dma/direct.c | 2 +- > kernel/dma/direct.h | 2 +- &

Re: [PATCH v13 05/12] swiotlb: Update is_swiotlb_active to add a struct device argument

2021-06-17 Thread Stefano Stabellini
On Thu, 17 Jun 2021, Claire Chang wrote: > Update is_swiotlb_active to add a struct device argument. This will be > useful later to allow for different pools. > > Signed-off-by: Claire Chang > Reviewed-by: Christoph Hellwig > Tested-by: Stefano Stabellini > Tested-by

Re: [PATCH v13 04/12] swiotlb: Update is_swiotlb_buffer to add a struct device argument

2021-06-17 Thread Stefano Stabellini
On Thu, 17 Jun 2021, Claire Chang wrote: > Update is_swiotlb_buffer to add a struct device argument. This will be > useful later to allow for different pools. > > Signed-off-by: Claire Chang > Reviewed-by: Christoph Hellwig > Tested-by: Stefano Stabellini > Tested-by

Re: [PATCH v13 03/12] swiotlb: Set dev->dma_io_tlb_mem to the swiotlb pool used

2021-06-17 Thread Stefano Stabellini
On Thu, 17 Jun 2021, Claire Chang wrote: > Always have the pointer to the swiotlb pool used in struct device. This > could help simplify the code for other pools. > > Signed-off-by: Claire Chang > Reviewed-by: Christoph Hellwig > Tested-by: Stefano Stabellini > Tested-by

Re: [PATCH v13 01/12] swiotlb: Refactor swiotlb init functions

2021-06-17 Thread Stefano Stabellini
On Thu, 17 Jun 2021, Claire Chang wrote: > Add a new function, swiotlb_init_io_tlb_mem, for the io_tlb_mem struct > initialization to make the code reusable. > > Signed-off-by: Claire Chang > Reviewed-by: Christoph Hellwig > Tested-by: Stefano Stabellini > T

Re: [PATCH v12 06/12] swiotlb: Use is_swiotlb_force_bounce for swiotlb data bouncing

2021-06-16 Thread Stefano Stabellini
On Wed, 16 Jun 2021, Claire Chang wrote: > Propagate the swiotlb_force into io_tlb_default_mem->force_bounce and > use it to determine whether to bounce the data or not. This will be > useful later to allow for different pools. > > Signed-off-by: Claire Chang > --- > include/linux/swiotlb.h |

Re: [PATCH v12 11/12] dt-bindings: of: Add restricted DMA pool

2021-06-16 Thread Stefano Stabellini
On Wed, 16 Jun 2021, Claire Chang wrote: > Introduce the new compatible string, restricted-dma-pool, for restricted > DMA. One can specify the address and length of the restricted DMA memory > region by restricted-dma-pool in the reserved-memory node. > > Signed-off-by: Claire Chang > --- >

Re: [PATCH RFC v1 5/6] xen-swiotlb: convert variables to arrays

2021-02-22 Thread Stefano Stabellini
On Fri, 19 Feb 2021, Konrad Rzeszutek Wilk wrote: > On Sun, Feb 07, 2021 at 04:56:01PM +0100, Christoph Hellwig wrote: > > On Thu, Feb 04, 2021 at 09:40:23AM +0100, Christoph Hellwig wrote: > > > So one thing that has been on my mind for a while: I'd really like > > > to kill the separate dma ops

Re: [Xen-devel] [PATCH v2 5/9] xen/gntdev: Allow mappings for DMA buffers

2018-06-11 Thread Stefano Stabellini
On Mon, 11 Jun 2018, Oleksandr Andrushchenko wrote: > On 06/08/2018 10:21 PM, Boris Ostrovsky wrote: > > On 06/08/2018 01:59 PM, Stefano Stabellini wrote: > > > > > > > > > >    @@ -325,6 +401,14 @@ static int map_grant_pages(struct > > >

Re: [Xen-devel] [PATCH v2 5/9] xen/gntdev: Allow mappings for DMA buffers

2018-06-08 Thread Stefano Stabellini
On Fri, 8 Jun 2018, Oleksandr Andrushchenko wrote: > On 06/08/2018 12:46 AM, Boris Ostrovsky wrote: > > (Stefano, question for you at the end) > > > > On 06/07/2018 02:39 AM, Oleksandr Andrushchenko wrote: > > > On 06/07/2018 12:19 AM, Boris Ostrovsky wrote: > > > > On 06/06/2018 04:14 AM,

Re: [Xen-devel] [PATCH 0/9] drm/xen-front: Add support for Xen PV display frontend

2018-02-28 Thread Stefano Stabellini
On Wed, 28 Feb 2018, Julien Grall wrote: > (+ Stefano and Wei) > > Hi, > > On 02/27/2018 12:40 PM, Oleksandr Andrushchenko wrote: > > Please find some more clarifications on VirtIO use with Xen > > (I would like to thank Xen community for helping with this) > > > > 1. Possible security issues -

Re: [PATCH 0/9] drm/xen-front: Add support for Xen PV display frontend

2018-02-28 Thread Stefano Stabellini
Hi all, just as a clarification, this patch series implements the frontend driver for the "vdispl" protocol, which was reviewed, approved and committed in xen.git back in April: https://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=xen/include/public/io/displif.h As Xen maintainer, if a competing

[RFC] add a struct page* parameter to dma_map_ops.unmap_page

2014-11-21 Thread Stefano Stabellini
On Mon, 17 Nov 2014, Stefano Stabellini wrote: > Hi all, > I am writing this email to ask for your advice. > > On architectures where dma addresses are different from physical > addresses, it can be difficult to retrieve the physical address of a > page from its dma address.

[RFC] add a struct page* parameter to dma_map_ops.unmap_page

2014-11-17 Thread Stefano Stabellini
Hi all, I am writing this email to ask for your advice. On architectures where dma addresses are different from physical addresses, it can be difficult to retrieve the physical address of a page from its dma address. Specifically this is the case for Xen on arm and arm64 but I think that other