All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] xen/arm: add lower-bound check in mfn_valid
@ 2013-08-23  9:08 Jaeyong Yoo
  2013-08-23  9:17 ` Ian Campbell
  2013-08-26 14:45 ` Julien Grall
  0 siblings, 2 replies; 4+ messages in thread
From: Jaeyong Yoo @ 2013-08-23  9:08 UTC (permalink / raw)
  To: xen-devel; +Cc: Jaeyong Yoo

mfn_valid only checks the upper-bound of mfn (max_page).
Add the lower-bound check of mfn (frametable_base_mfn).

Signed-off-by: Jaeyong Yoo <jaeyong.yoo@samsung.com>
---
 xen/include/asm-arm/mm.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/include/asm-arm/mm.h b/xen/include/asm-arm/mm.h
index 27284d0..97c2ee0 100644
--- a/xen/include/asm-arm/mm.h
+++ b/xen/include/asm-arm/mm.h
@@ -190,7 +190,7 @@ static inline void __iomem *ioremap_wc(paddr_t start, size_t len)
 
 #define mfn_valid(mfn)        ({                                              \
     unsigned long __m_f_n = (mfn);                                            \
-    likely(__m_f_n < max_page);                                               \
+    likely(__m_f_n >= frametable_base_mfn && __m_f_n < max_page);             \
 })
 
 #define max_pdx                 max_page
-- 
1.8.1.2

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] xen/arm: add lower-bound check in mfn_valid
  2013-08-23  9:08 [PATCH v2] xen/arm: add lower-bound check in mfn_valid Jaeyong Yoo
@ 2013-08-23  9:17 ` Ian Campbell
  2013-08-26 14:45 ` Julien Grall
  1 sibling, 0 replies; 4+ messages in thread
From: Ian Campbell @ 2013-08-23  9:17 UTC (permalink / raw)
  To: Jaeyong Yoo; +Cc: xen-devel

On Fri, 2013-08-23 at 18:08 +0900, Jaeyong Yoo wrote:
> mfn_valid only checks the upper-bound of mfn (max_page).
> Add the lower-bound check of mfn (frametable_base_mfn).
> 
> Signed-off-by: Jaeyong Yoo <jaeyong.yoo@samsung.com>

Acked-by: Ian Campbell <ian.campbell@citrix.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] xen/arm: add lower-bound check in mfn_valid
  2013-08-23  9:08 [PATCH v2] xen/arm: add lower-bound check in mfn_valid Jaeyong Yoo
  2013-08-23  9:17 ` Ian Campbell
@ 2013-08-26 14:45 ` Julien Grall
  2013-08-27 13:46   ` Ian Campbell
  1 sibling, 1 reply; 4+ messages in thread
From: Julien Grall @ 2013-08-26 14:45 UTC (permalink / raw)
  To: Jaeyong Yoo; +Cc: Ian Campbell, Andre Przywara, xen-devel

On 08/23/2013 10:08 AM, Jaeyong Yoo wrote:
> mfn_valid only checks the upper-bound of mfn (max_page).
> Add the lower-bound check of mfn (frametable_base_mfn).

Thanks! This patch fixes Xen boot on different boards (Arndale and I
guess Midway) after the patch "xen: arm: reduce the size of the xen heap
to max 1/8 RAM size".

> Signed-off-by: Jaeyong Yoo <jaeyong.yoo@samsung.com>
Acked-by: Julien Grall <julien.grall@linaro.org>

> ---
>  xen/include/asm-arm/mm.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/xen/include/asm-arm/mm.h b/xen/include/asm-arm/mm.h
> index 27284d0..97c2ee0 100644
> --- a/xen/include/asm-arm/mm.h
> +++ b/xen/include/asm-arm/mm.h
> @@ -190,7 +190,7 @@ static inline void __iomem *ioremap_wc(paddr_t start, size_t len)
>  
>  #define mfn_valid(mfn)        ({                                              \
>      unsigned long __m_f_n = (mfn);                                            \
> -    likely(__m_f_n < max_page);                                               \
> +    likely(__m_f_n >= frametable_base_mfn && __m_f_n < max_page);             \
>  })
>  
>  #define max_pdx                 max_page
> 

-- 
Julien Grall

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] xen/arm: add lower-bound check in mfn_valid
  2013-08-26 14:45 ` Julien Grall
@ 2013-08-27 13:46   ` Ian Campbell
  0 siblings, 0 replies; 4+ messages in thread
From: Ian Campbell @ 2013-08-27 13:46 UTC (permalink / raw)
  To: Julien Grall; +Cc: Andre Przywara, Jaeyong Yoo, xen-devel

On Mon, 2013-08-26 at 15:45 +0100, Julien Grall wrote:
> On 08/23/2013 10:08 AM, Jaeyong Yoo wrote:
> > mfn_valid only checks the upper-bound of mfn (max_page).
> > Add the lower-bound check of mfn (frametable_base_mfn).
> 
> Thanks! This patch fixes Xen boot on different boards (Arndale and I
> guess Midway) after the patch "xen: arm: reduce the size of the xen heap
> to max 1/8 RAM size".
> 
> > Signed-off-by: Jaeyong Yoo <jaeyong.yoo@samsung.com>
> Acked-by: Julien Grall <julien.grall@linaro.org>

Applied, thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-08-27 13:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-23  9:08 [PATCH v2] xen/arm: add lower-bound check in mfn_valid Jaeyong Yoo
2013-08-23  9:17 ` Ian Campbell
2013-08-26 14:45 ` Julien Grall
2013-08-27 13:46   ` Ian Campbell

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.