From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: xen/arm: kernel BUG at /local/home/julien/works/linux/drivers/xen/swiotlb-xen.c:102 Date: Thu, 06 Nov 2014 12:25:31 +0000 Message-ID: <545B68BB.8020205@linaro.org> References: <545A5F1F.9030006@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Stefano Stabellini Cc: Ian Campbell , xen-devel List-Id: xen-devel@lists.xenproject.org On 06/11/2014 11:46, Stefano Stabellini wrote: > Hello Julien, Hi Stefano, > I didn't manage to reproduce the issue you are seeing but I think you > are right: non-LPAE kernels could get in trouble by calling > xen_bus_to_phys. This problem is not ARM specific per se, but it doesn't > occur on x86 because config XEN depends on X86_32 && X86_PAE. > > The following patch should fix the issue: > > > diff --git a/drivers/xen/swiotlb-xen.c b/drivers/xen/swiotlb-xen.c > index ac5d41b..489620d 100644 > --- a/drivers/xen/swiotlb-xen.c > +++ b/drivers/xen/swiotlb-xen.c > @@ -96,8 +96,6 @@ static inline phys_addr_t xen_bus_to_phys(dma_addr_t baddr) > dma_addr_t dma = (dma_addr_t)pfn << PAGE_SHIFT; > phys_addr_t paddr = dma; > > - BUG_ON(paddr != dma); /* truncation has occurred, should never happen */ > - Are you sure that removing this BUG_ON is safe? There is some of place where we pass a physical address rather than a DMA. See xen_swiotlb_sync_single. Regards, -- Julien Grall