|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v3] xen/arm: Do not allocate pte entries for MAP_SMALL_PAGES
Hi Vijay, Given the introduction of the new helper, the title looks wrong to me. On 09/03/2015 08:59, vijay.kilari@xxxxxxxxx wrote: As you have a new operation (only used by populate_pt_range), why do you need to check is_pte_present? void *vm_alloc(unsigned int nr, unsigned int align) diff --git a/xen/include/asm-arm/page.h b/xen/include/asm-arm/page.h index 3e7b0ae..f743003 100644 --- a/xen/include/asm-arm/page.h +++ b/xen/include/asm-arm/page.h @@ -61,10 +61,27 @@ #define DEV_WC BUFFERABLE #define DEV_CACHED WRITEBACK -#define PAGE_HYPERVISOR (WRITEALLOC) -#define PAGE_HYPERVISOR_NOCACHE (DEV_SHARED) -#define PAGE_HYPERVISOR_WC (DEV_WC) -#define MAP_SMALL_PAGES PAGE_HYPERVISOR +#define PAGE_PRESENT (0x1 << 16) +#define PAGE_NOT_PRESENT (0x0) + +/* bit[16] in the below representation can be used to know if + * PTE entry should be added or not. This is useful + * when ONLY non-leaf page table entries need to allocated. + * + * bits[2:0] of be below represent correponds to AttrIndx[2:0] + * i.e lpae_t.pt.ai[2:4] + * + * For readability purpose MAP_SMALL_PAGES is set with PAGE_NOT_PRESENT + * though PAGE_NOT_PRESENT is 0. + */ + +#define PAGE_HYPERVISOR (WRITEALLOC | PAGE_PRESENT) +#define PAGE_HYPERVISOR_NOCACHE (DEV_SHARED | PAGE_PRESENT) +#define PAGE_HYPERVISOR_WC (DEV_WC | PAGE_PRESENT) +#define MAP_SMALL_PAGES (WRITEALLOC | PAGE_NOT_PRESENT) Again, using WRITEALLOC for MAP_SMALL_PAGES doesn't make any sense.Given that you introduced a new helper populate_pt_range and a new operation (RESERVE), the flags PAGE{,_NOT}_PRESENT seems useless. And, therefore, MAP_SMALL_PAGES could be dropped. Regards, -- Julien Grall _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |