[Xen-devel] [PATCH] xen: Add __GFP_DMA flag when xen_swiotlb_init gets free pages on ARM

2015-04-23 Thread Stefano Stabellini
Make sure that xen_swiotlb_init allocates buffers that are DMA capable when at least one memblock is available below 4G. Otherwise we assume that all devices on the SoC can cope with 4G addresses. No functional changes on x86. From: Chen Baozi baoz...@gmail.com Signed-off-by: Chen Baozi

Re: [Xen-devel] [PATCH] xen: Add __GFP_DMA flag when xen_swiotlb_init gets free pages on ARM

2015-04-23 Thread David Vrabel
On 23/04/15 10:47, Stefano Stabellini wrote: Make sure that xen_swiotlb_init allocates buffers that are DMA capable when at least one memblock is available below 4G. Otherwise we assume that all devices on the SoC can cope with 4G addresses. This commit message must explain why the PFNs (IPAs)

Re: [Xen-devel] [PATCH] xen: Add __GFP_DMA flag when xen_swiotlb_init gets free pages.

2015-04-22 Thread Chen Baozi
On Tue, Apr 21, 2015 at 12:11:01PM +0100, Stefano Stabellini wrote: Chen, could you please try the patch below in your repro scenario? I have only build tested it. --- xen: Add __GFP_DMA flag when xen_swiotlb_init gets free pages on ARM From: Chen Baozi baoz...@gmail.com Make sure

Re: [Xen-devel] [PATCH] xen: Add __GFP_DMA flag when xen_swiotlb_init gets free pages.

2015-04-21 Thread Ian Campbell
On Tue, 2015-04-21 at 11:36 +0100, Stefano Stabellini wrote: On Tue, 21 Apr 2015, Ian Campbell wrote: On Mon, 2015-04-20 at 18:54 +0100, Stefano Stabellini wrote: This should definitely be done only on ARM and ARM64, as on x86 PVH assumes the presence of an IOMMU. We need an ifdef.

Re: [Xen-devel] [PATCH] xen: Add __GFP_DMA flag when xen_swiotlb_init gets free pages.

2015-04-21 Thread Stefano Stabellini
On Tue, 21 Apr 2015, Ian Campbell wrote: On Mon, 2015-04-20 at 18:54 +0100, Stefano Stabellini wrote: This should definitely be done only on ARM and ARM64, as on x86 PVH assumes the presence of an IOMMU. We need an ifdef. Also we need to figure out a way to try without GFP_DMA in case no

Re: [Xen-devel] [PATCH] xen: Add __GFP_DMA flag when xen_swiotlb_init gets free pages.

2015-04-21 Thread Stefano Stabellini
On Tue, 21 Apr 2015, Stefano Stabellini wrote: On Tue, 21 Apr 2015, Ian Campbell wrote: On Mon, 2015-04-20 at 18:54 +0100, Stefano Stabellini wrote: This should definitely be done only on ARM and ARM64, as on x86 PVH assumes the presence of an IOMMU. We need an ifdef. Also we need

Re: [Xen-devel] [PATCH] xen: Add __GFP_DMA flag when xen_swiotlb_init gets free pages.

2015-04-20 Thread Konrad Rzeszutek Wilk
On Mon, Apr 20, 2015 at 06:48:24PM +0800, Chen Baozi wrote: Make sure that xen_swiotlb_init allocates buffers that is DMA capable. Signed-off-by: Chen Baozi baoz...@gmail.com --- drivers/xen/swiotlb-xen.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

Re: [Xen-devel] [PATCH] xen: Add __GFP_DMA flag when xen_swiotlb_init gets free pages.

2015-04-20 Thread David Vrabel
On 20/04/15 12:07, Chen Baozi wrote: On Mon, Apr 20, 2015 at 11:53:47AM +0100, David Vrabel wrote: On 20/04/15 11:48, Chen Baozi wrote: Make sure that xen_swiotlb_init allocates buffers that is DMA capable. Signed-off-by: Chen Baozi baoz...@gmail.com --- drivers/xen/swiotlb-xen.c | 3 ++-

[Xen-devel] [PATCH] xen: Add __GFP_DMA flag when xen_swiotlb_init gets free pages.

2015-04-20 Thread Chen Baozi
Make sure that xen_swiotlb_init allocates buffers that is DMA capable. Signed-off-by: Chen Baozi baoz...@gmail.com --- drivers/xen/swiotlb-xen.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/xen/swiotlb-xen.c b/drivers/xen/swiotlb-xen.c index 810ad41..7345afd

Re: [Xen-devel] [PATCH] xen: Add __GFP_DMA flag when xen_swiotlb_init gets free pages.

2015-04-20 Thread David Vrabel
On 20/04/15 11:48, Chen Baozi wrote: Make sure that xen_swiotlb_init allocates buffers that is DMA capable. Signed-off-by: Chen Baozi baoz...@gmail.com --- drivers/xen/swiotlb-xen.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/xen/swiotlb-xen.c

Re: [Xen-devel] [PATCH] xen: Add __GFP_DMA flag when xen_swiotlb_init gets free pages.

2015-04-20 Thread Stefano Stabellini
On Mon, 20 Apr 2015, David Vrabel wrote: On 20/04/15 12:07, Chen Baozi wrote: On Mon, Apr 20, 2015 at 11:53:47AM +0100, David Vrabel wrote: On 20/04/15 11:48, Chen Baozi wrote: Make sure that xen_swiotlb_init allocates buffers that is DMA capable. Signed-off-by: Chen Baozi