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

Re: [Xen-devel] [PATCH RFC 1/2] xen: refactor physical address space compression support into common code



Hi Ian,

On 07/31/2014 12:01 PM, Ian Campbell wrote:
> diff --git a/xen/include/xen/pdx.h b/xen/include/xen/pdx.h
> new file mode 100644
> index 0000000..bcda9e6
> --- /dev/null
> +++ b/xen/include/xen/pdx.h
> @@ -0,0 +1,47 @@
> +#ifndef __XEN_PDX_H__
> +#define __XEN_PDX_H__
> +
> +#ifdef HAS_PDX
> +
> +extern unsigned long max_pdx;
> +extern unsigned long pfn_pdx_bottom_mask, ma_va_bottom_mask;
> +extern unsigned int pfn_pdx_hole_shift;
> +extern unsigned long pfn_hole_mask;
> +extern unsigned long pfn_top_mask, ma_top_mask;
> +
> +#define PDX_GROUP_COUNT ((1 << PDX_GROUP_SHIFT) / \
> +                         (sizeof(*frame_table) & -sizeof(*frame_table)))
> +extern unsigned long pdx_group_valid[];
> +
> +extern void set_pdx_range(unsigned long smfn, unsigned long emfn);
> +
> +#define page_to_pdx(pg)  ((pg) - frame_table)
> +#define pdx_to_page(pdx) (frame_table + (pdx))
> +
> +extern int __mfn_valid(unsigned long mfn);
> +
> +static inline unsigned long pfn_to_pdx(unsigned long pfn)
> +{
> +    return (pfn & pfn_pdx_bottom_mask) |
> +           ((pfn & pfn_top_mask) >> pfn_pdx_hole_shift);
> +}
> +
> +static inline unsigned long pdx_to_pfn(unsigned long pdx)
> +{
> +    return (pdx & pfn_pdx_bottom_mask) |
> +           ((pdx << pfn_pdx_hole_shift) & pfn_top_mask);
> +}
> +
> +extern void pfn_pdx_hole_setup(unsigned long);
> +
> +#endif /* HAVE_PDX */
> +#endif /* __XEN_PAGING_H__ */

NIT: I think the comment should be /* __XEN_PDX_H__ */

Regards,

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