All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@linaro.org>
To: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>,
	xen-devel <xen-devel@lists.xen.org>
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	[thread overview]
Message-ID: <545B68BB.8020205@linaro.org> (raw)
In-Reply-To: <alpine.DEB.2.02.1411061127280.22875@kaball.uk.xensource.com>



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

  reply	other threads:[~2014-11-06 12:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-05 17:32 xen/arm: kernel BUG at /local/home/julien/works/linux/drivers/xen/swiotlb-xen.c:102 Julien Grall
2014-11-06 11:46 ` Stefano Stabellini
2014-11-06 12:25   ` Julien Grall [this message]
2014-11-06 12:42     ` Stefano Stabellini
2014-11-06 12:56       ` Julien Grall
2014-11-06 13:01         ` Stefano Stabellini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=545B68BB.8020205@linaro.org \
    --to=julien.grall@linaro.org \
    --cc=ian.campbell@citrix.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.