From patchwork Thu Aug 17 14:44:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Liu X-Patchwork-Id: 9906475 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 54CAC6038C for ; Thu, 17 Aug 2017 14:47:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4707B28B29 for ; Thu, 17 Aug 2017 14:47:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3B27428B2D; Thu, 17 Aug 2017 14:47:32 +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 E96E928B29 for ; Thu, 17 Aug 2017 14:47:31 +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 1diM2i-0000xW-Ll; Thu, 17 Aug 2017 14:45:04 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1diM2g-0000x8-Qs for xen-devel@lists.xenproject.org; Thu, 17 Aug 2017 14:45:02 +0000 Received: from [85.158.137.68] by server-17.bemta-3.messagelabs.com id 8C/75-01859-EEBA5995; Thu, 17 Aug 2017 14:45:02 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprAIsWRWlGSWpSXmKPExsXitHRDpO7b1VM jDR780Lb4vmUykwOjx+EPV1gCGKNYM/OS8isSWDP27VnBXtDBXTFhqV4D43eOLkZODgkBf4lb q/+xg9hsAsoSPzt72UBsEQE9iaYDzxm7GLk4mAXmMEpMndvFCJIQFgiWWHjpBlARBweLgKrEi 8dRIGFeAQuJ27ePskPMlJfY1XaRFcTmFLCUODRpMTOILQRUM/tDOzuErSDRMf0YE0SvoMTJmU 9YQGxmAQmJgy9eME9g5J2FJDULSWoBI9MqRo3i1KKy1CJdYwO9pKLM9IyS3MTMHF1DA2O93NT i4sT01JzEpGK95PzcTYzA0KlnYGDcwdh5wu8QoyQHk5Io7+9ZUyKF+JLyUyozEosz4otKc1KL DzHKcHAoSfC6r5oaKSRYlJqeWpGWmQMMYpi0BAePkghvK0iat7ggMbc4Mx0idYpRl+PVhP/fm IRY8vLzUqXEee+BFAmAFGWU5sGNgEXUJUZZKWFeRgYGBiGegtSi3MwSVPlXjOIcjErCvDNApv Bk5pXAbXoFdAQT0BFX2ieBHFGSiJCSamBUatpqIvy16JqealZXRqhssc/kCUqtRoyPVrPc+s5 udjr5yocQG/HgIPmbnrKRSSlyX+YG37jPpqHzS++u4h0+xSMhzYvE8uRXnd2bdH3hHmu1zV+u bPlySbCVJ/37jtWb94muNFXjtt8SnPU3+s21Kf5PeVqnxMieX8o8bffmNQ63W9iXyAgpsRRnJ BpqMRcVJwIAG4gWqqMCAAA= X-Env-Sender: prvs=395e6b081=wei.liu2@citrix.com X-Msg-Ref: server-14.tower-31.messagelabs.com!1502981098!110297526!2 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 63470 invoked from network); 17 Aug 2017 14:45:01 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-14.tower-31.messagelabs.com with RC4-SHA encrypted SMTP; 17 Aug 2017 14:45:01 -0000 X-IronPort-AV: E=Sophos;i="5.41,388,1498521600"; d="scan'208";a="435893162" From: Wei Liu To: Xen-devel Date: Thu, 17 Aug 2017 15:44:30 +0100 Message-ID: <20170817144456.18989-6-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 05/31] x86/mm: document the return values from get_page_from_l*e 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 Signed-off-by: Wei Liu Acked-by: Jan Beulich --- xen/arch/x86/mm.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c index 64dd520044..5983a56811 100644 --- a/xen/arch/x86/mm.c +++ b/xen/arch/x86/mm.c @@ -869,6 +869,12 @@ static int print_mmio_emul_range(unsigned long s, unsigned long e, void *arg) } #endif +/* + * get_page_from_l1e returns: + * 0 => success (page not present also counts as such) + * <0 => error code + * >0 => the page flags to be flipped + */ int get_page_from_l1e( l1_pgentry_t l1e, struct domain *l1e_owner, struct domain *pg_owner) @@ -1081,6 +1087,12 @@ get_page_from_l1e( /* NB. Virtual address 'l2e' maps to a machine address within frame 'pfn'. */ +/* + * get_page_from_l2e returns: + * 1 => page not present + * 0 => success + * <0 => error code + */ define_get_linear_pagetable(l2); static int get_page_from_l2e( @@ -1111,6 +1123,12 @@ get_page_from_l2e( } +/* + * get_page_from_l3e returns: + * 1 => page not present + * 0 => success + * <0 => error code + */ define_get_linear_pagetable(l3); static int get_page_from_l3e( @@ -1138,6 +1156,12 @@ get_page_from_l3e( return rc; } +/* + * get_page_from_l4e returns: + * 1 => page not present + * 0 => success + * <0 => error code + */ define_get_linear_pagetable(l4); static int get_page_from_l4e(