From patchwork Fri Jan 6 01:32:33 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: James Hogan X-Patchwork-Id: 9499821 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 147FE606DE for ; Fri, 6 Jan 2017 01:33:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0664F28477 for ; Fri, 6 Jan 2017 01:33:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ED5902848B; Fri, 6 Jan 2017 01:33:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6A60B28477 for ; Fri, 6 Jan 2017 01:33:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752060AbdAFBdh (ORCPT ); Thu, 5 Jan 2017 20:33:37 -0500 Received: from mailapp01.imgtec.com ([195.59.15.196]:25284 "EHLO mailapp01.imgtec.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751978AbdAFBde (ORCPT ); Thu, 5 Jan 2017 20:33:34 -0500 Received: from HHMAIL01.hh.imgtec.org (unknown [10.100.10.19]) by Forcepoint Email with ESMTPS id 0EF0865455831; Fri, 6 Jan 2017 01:33:29 +0000 (GMT) Received: from jhogan-linux.le.imgtec.org (192.168.154.110) by HHMAIL01.hh.imgtec.org (10.100.10.21) with Microsoft SMTP Server (TLS) id 14.3.294.0; Fri, 6 Jan 2017 01:33:29 +0000 From: James Hogan To: CC: James Hogan , , Paolo Bonzini , =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= , Ralf Baechle , Subject: [PATCH 1/30] mm: Export init_mm for MIPS KVM use of pgd_alloc() Date: Fri, 6 Jan 2017 01:32:33 +0000 Message-ID: X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 In-Reply-To: References: X-Originating-IP: [192.168.154.110] Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Cc: linux-mm@kvack.org Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org Acked-by: Ralf Baechle --- mm/init-mm.c | 2 ++ 1 file changed, 2 insertions(+), 0 deletions(-) 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 #include #include #include @@ -25,3 +26,4 @@ struct mm_struct init_mm = { .user_ns = &init_user_ns, INIT_MM_CONTEXT(init_mm) }; +EXPORT_SYMBOL_GPL(init_mm);