[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v4 10/16] xen/mm: Switch map_pages_to_xen to use MFN typesafe
>>> On 05.03.18 at 15:07, <julien.grall@xxxxxxx> wrote: > On 02/03/18 15:06, Jan Beulich wrote: >>>>> On 21.02.18 at 15:02, <julien.grall@xxxxxxx> wrote: >>> --- a/xen/arch/x86/x86_64/mm.c >>> +++ b/xen/arch/x86/x86_64/mm.c >>> @@ -40,6 +40,10 @@ asm(".file \"" __FILE__ "\""); >>> #include <asm/mem_sharing.h> >>> #include <public/memory.h> >>> >>> +/* Override macros from asm/page.h to make them work with mfn_t */ >>> +#undef page_to_mfn >>> +#define page_to_mfn(pg) _mfn(__page_to_mfn(pg)) >> >> I can't spot where this is needed in this file. >> >>> @@ -234,7 +238,7 @@ void vunmap(const void *va) >>> #ifndef _PAGE_NONE >>> destroy_xen_mappings(addr, addr + PAGE_SIZE * pages); >>> #else /* Avoid tearing down intermediate page tables. */ >>> - map_pages_to_xen(addr, 0, pages, _PAGE_NONE); >>> + map_pages_to_xen(addr, _mfn(0), pages, _PAGE_NONE); >> >> INVALID_MFN? > > I can but then we end up to the same clumsiness as you mention in #8. So > what's your preference? My preference is to skip the increments for INVALID_MFN in patch 8. Since you don't want to do that, I guess we'll have to live with zero being used everywhere. Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |