From patchwork Thu Aug 17 14:44:33 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Liu X-Patchwork-Id: 9906473 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 9BD8C6038C for ; Thu, 17 Aug 2017 14:47:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8D2C828B29 for ; Thu, 17 Aug 2017 14:47:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 81E8728B2D; Thu, 17 Aug 2017 14:47:31 +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=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 16A9728B29 for ; Thu, 17 Aug 2017 14:47:30 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1diM2k-0000yL-7V; Thu, 17 Aug 2017 14:45:06 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1diM2i-0000xS-IC for xen-devel@lists.xenproject.org; Thu, 17 Aug 2017 14:45:04 +0000 Received: from [85.158.139.211] by server-16.bemta-5.messagelabs.com id 33/ED-01712-FEBA5995; Thu, 17 Aug 2017 14:45:03 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprIIsWRWlGSWpSXmKPExsXitHRDpO671VM jDfbcsrH4vmUykwOjx+EPV1gCGKNYM/OS8isSWDM6Xk9lKfjKUTHrRF0D42X2LkZODgkBf4mf 53tZQGw2AWWJn529bCC2iICeRNOB54xdjFwczAJzGCWmzu1iBEkIC1hJzHsxG8xmEVCVeN24G GwQr4CFxI9jr9gghspL7Gq7yApicwpYShyatJgZxBYCqpn9oZ0dwlaQ6Jh+jAmiV1Di5MwnYE cwC0hIHHzxgnkCI+8sJKlZSFILGJlWMWoUpxaVpRbpGhnoJRVlpmeU5CZm5ugaGpjq5aYWFye mp+YkJhXrJefnbmIEBk89AwPjDsbG2X6HGCU5mJREeX/PmhIpxJeUn1KZkVicEV9UmpNafIhR hoNDSYLXfdXUSCHBotT01Iq0zBxgGMOkJTh4lER4D4CkeYsLEnOLM9MhUqcYdTleTfj/jUmIJ S8/L1VKnDcapEgApCijNA9uBCymLjHKSgnzMjIwMAjxFKQW5WaWoMq/YhTnYFQS5p0BMoUnM6 8EbtMroCOYgI640j4J5IiSRISUVANjzgKup99PaKteD80+5bfOLvH/lFu6p/a9WLy+K9bqaeE G2xnXjmhxsrX+znkVffqKZfvUd1WzBa3rjvJ1vp12Yd6u7R/MVTZ6Mr/8z3XvUI8F95zZ3Kfd zPkX/NKfEv79SeqBNFWFTep5elucuF+un3WTpS1DedEFvtC2LO97VdUu/CdbZk6IVWIpzkg01 GIuKk4EAPmihmCkAgAA X-Env-Sender: prvs=395e6b081=wei.liu2@citrix.com X-Msg-Ref: server-9.tower-206.messagelabs.com!1502981101!107827319!1 X-Originating-IP: [66.165.176.89] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni44OSA9PiAyMDMwMDc=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 9.4.45; banners=-,-,- X-VirusChecked: Checked Received: (qmail 19302 invoked from network); 17 Aug 2017 14:45:02 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-9.tower-206.messagelabs.com with RC4-SHA encrypted SMTP; 17 Aug 2017 14:45:02 -0000 X-IronPort-AV: E=Sophos;i="5.41,388,1498521600"; d="scan'208";a="435893164" From: Wei Liu To: Xen-devel Date: Thu, 17 Aug 2017 15:44:33 +0100 Message-ID: <20170817144456.18989-9-wei.liu2@citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170817144456.18989-1-wei.liu2@citrix.com> References: <20170817144456.18989-1-wei.liu2@citrix.com> MIME-Version: 1.0 Cc: George Dunlap , Andrew Cooper , Wei Liu , Jan Beulich Subject: [Xen-devel] [PATCH v4 08/31] x86/mm: export get_page_from_mfn X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP It will be used by different files later, so export it via asm-x86/mm.h. Signed-off-by: Wei Liu --- xen/arch/x86/mm.c | 2 +- xen/include/asm-x86/mm.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c index 7eb80ecaa3..d25d314673 100644 --- a/xen/arch/x86/mm.c +++ b/xen/arch/x86/mm.c @@ -666,7 +666,7 @@ int map_ldt_shadow_page(unsigned int off) } -static bool get_page_from_mfn(mfn_t mfn, struct domain *d) +bool get_page_from_mfn(mfn_t mfn, struct domain *d) { struct page_info *page = mfn_to_page(mfn_x(mfn)); diff --git a/xen/include/asm-x86/mm.h b/xen/include/asm-x86/mm.h index 2bf3f335ad..c6e1d01c7d 100644 --- a/xen/include/asm-x86/mm.h +++ b/xen/include/asm-x86/mm.h @@ -344,6 +344,7 @@ int put_old_guest_table(struct vcpu *); int get_page_from_l1e( l1_pgentry_t l1e, struct domain *l1e_owner, struct domain *pg_owner); void put_page_from_l1e(l1_pgentry_t l1e, struct domain *l1e_owner); +bool get_page_from_mfn(mfn_t mfn, struct domain *d); static inline void put_page_and_type(struct page_info *page) {