diff mbox

[1/30] mm: Export init_mm for MIPS KVM use of pgd_alloc()

Message ID a8df39719fb0570cb38e3fbb5c128fe2618e92d6.1483665879.git-series.james.hogan@imgtec.com (mailing list archive)
State New, archived
Headers show

Commit Message

James Hogan Jan. 6, 2017, 1:32 a.m. UTC
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(-)

Comments

Ralf Baechle Jan. 17, 2017, 4:23 p.m. UTC | #1
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
Ralf Baechle Jan. 17, 2017, 4:27 p.m. UTC | #2
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 mbox

Patch

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);