[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
Hi, On 05/03/18 14:39, Jan Beulich wrote: 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. It is not that I don't want. I don't have any x86 setup and not that confident to provide a change bigger than switch from plain unsigned int to typesafe and light clean-up. I can provide a patch if you really want. But likely it is going to be quicker for you to write it. Cheers, -- Julien Grall _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |