[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2 02/10] xen: arm: Add zeroeth level page table macros and defines
On Thu, 2013-08-08 at 11:09 +0100, Tim Deegan wrote: > At 14:31 +0100 on 07 Aug (1375885891), Ian Campbell wrote: > > --- a/xen/include/asm-arm/page.h > > +++ b/xen/include/asm-arm/page.h > > @@ -337,7 +337,15 @@ static inline int gva_to_ipa(vaddr_t va, paddr_t > > *paddr) > > #define second_table_offset(va) TABLE_OFFSET(second_linear_offset(va)) > > #define third_table_offset(va) TABLE_OFFSET(third_linear_offset(va)) > > > > -#define clear_page(page)memset((void *)(page), 0, PAGE_SIZE) > > +#ifdef CONFIG_ARM_64 > > +#define ZEROETH_SHIFT (FIRST_SHIFT + LPAE_SHIFT) > > +#define ZEROETH_SIZE (1u << ZEROETH_SHIFT) > > +#define ZEROETH_MASK (~(ZEROETH_SIZE - 1)) > > +#define zeroeth_linear_offset(va) ((va) >> ZEROETH_SHIFT) > > +#define zeroeth_table_offset(va) TABLE_OFFSET(zeroeth_linear_offset(va)) > > +#endif > > I'd prefer to see these defined alongside the other levels. There's no > harm in defining them on 32-bit builds. My worry was that they would get used on 32-bit code paths by mistake, which is a build error with this version but a (possibly obscure) runtime error with the alternative. > Also, please update the comment above LPAE_SHIFT to describe the 4-level > alternative. Will do. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |