[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v2] xen/arm: add lower-bound check in mfn_valid



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@xxxxxxxxxxx>
Acked-by: Julien Grall <julien.grall@xxxxxxxxxx>

> ---
>  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

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.