Message ID | a8df39719fb0570cb38e3fbb5c128fe2618e92d6.1483665879.git-series.james.hogan@imgtec.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Fri, Jan 06, 2017 at 01:32:33AM +0000, James Hogan wrote: > Export the init_mm symbol to GPL modules so that MIPS KVM can use > pgd_alloc() to create GVA page directory tables for trap & emulate mode, > which runs guest code in user mode. On MIPS pgd_alloc() is implemented > inline and refers to init_mm in order to copy kernel address space > mappings into the new page directory. Ackedy-by: Ralf Baechle <ralf@linux-mips.org> Ralf -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Fri, Jan 06, 2017 at 01:32:33AM +0000, James Hogan wrote: > Export the init_mm symbol to GPL modules so that MIPS KVM can use > pgd_alloc() to create GVA page directory tables for trap & emulate mode, > which runs guest code in user mode. On MIPS pgd_alloc() is implemented > inline and refers to init_mm in order to copy kernel address space > mappings into the new page directory. >clickety-acky< error, once again for patchwork to pick this up correctly: Acked-by: Ralf Baechle <ralf@linux-mips.org> Ralf -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/mm/init-mm.c b/mm/init-mm.c index 975e49f00f34..94aae08b41e1 100644 --- a/mm/init-mm.c +++ b/mm/init-mm.c @@ -1,3 +1,4 @@ +#include <linux/export.h> #include <linux/mm_types.h> #include <linux/rbtree.h> #include <linux/rwsem.h> @@ -25,3 +26,4 @@ struct mm_struct init_mm = { .user_ns = &init_user_ns, INIT_MM_CONTEXT(init_mm) }; +EXPORT_SYMBOL_GPL(init_mm);
Export the init_mm symbol to GPL modules so that MIPS KVM can use pgd_alloc() to create GVA page directory tables for trap & emulate mode, which runs guest code in user mode. On MIPS pgd_alloc() is implemented inline and refers to init_mm in order to copy kernel address space mappings into the new page directory. Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: linux-mm@kvack.org Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: "Radim Krčmář" <rkrcmar@redhat.com> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org --- mm/init-mm.c | 2 ++ 1 file changed, 2 insertions(+), 0 deletions(-)