From patchwork Fri Sep 1 08:21:47 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olaf Hering X-Patchwork-Id: 9933741 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 9348B60309 for ; Fri, 1 Sep 2017 08:24:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 830D5285CB for ; Fri, 1 Sep 2017 08:24:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 77E22285CC; Fri, 1 Sep 2017 08:24:57 +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.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID 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 5F02E285DD for ; Fri, 1 Sep 2017 08:24:53 +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 1dnhDX-0004Wc-Se; Fri, 01 Sep 2017 08:22:19 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dnhDW-0004WM-6B for xen-devel@lists.xen.org; Fri, 01 Sep 2017 08:22:18 +0000 Received: from [193.109.254.147] by server-6.bemta-6.messagelabs.com id 52/8B-03423-9B819A95; Fri, 01 Sep 2017 08:22:17 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrLLMWRWlGSWpSXmKPExsUSuHLSQt0dEis jDd48NbdY8nExiwOjx9Hdv5kCGKNYM/OS8isSWDN+/OhnKTjNVbHuXw9bA+Myzi5GLg4WgU9M El8PrmfvYuTgkBDIlTh/sATCFJF48j8NpERI4CCTxMevv5i7GDk52ASUJPYePM4IkhARmMgoc fD0PUaQBLOAgsSL51uZQJqFBbwlzi9XBgmzCKhKdC2YBlbCK2Aksbd/K9gcCQF5iXMPboPZnA LGEjN/rwarEQKqudV0mHECI+8CRoZVjBrFqUVlqUW6hqZ6SUWZ6RkluYmZObqGBmZ6uanFxYn pqTmJScV6yfm5mxiBwcAABDsYvy0LOMQoycGkJMpb7b8iUogvKT+lMiOxOCO+qDQntfgQowwH h5IEL5v4ykghwaLU9NSKtMwcYFjCpCU4eJREeGeIAaV5iwsSc4sz0yFSpxgVpcR5d4IkBEASG aV5cG2wWLjEKCslzMsIdIgQT0FqUW5mCar8K0ZxDkYlYV5NkO08mXklcNNfAS1mAlr87/MKkM UliQgpqQZG4767B9ccW/CB+cSuzhWMSbrxL8MKLbv2mM779sbrhO2kU9v/7Z7Ps/isM3Ozx/o fdVenPPm2ZDbnmcWif9VFLBet2/Pw/p3kuftlVMVur6qTSX+ild958Vr8RdWnF5g/KSk2Jh82 UVlxqctJQEw6ZsvZvSxlB7uufIuu0fqwYRPX87+5mzRM9yuxFGckGmoxFxUnAgA1FBfbgAIAA A== X-Env-Sender: olaf@aepfle.de X-Msg-Ref: server-14.tower-27.messagelabs.com!1504254136!102074105!1 X-Originating-IP: [81.169.146.161] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: QmFkIElQOiA4MS4xNjkuMTQ2LjE2MSA9PiA1ODk3MjY=\n,sa_preprocessor: QmFkIElQOiA4MS4xNjkuMTQ2LjE2MSA9PiA1ODk3MjY=\n,UPPERCASE_25_50 X-StarScan-Received: X-StarScan-Version: 9.4.45; banners=-,-,- X-VirusChecked: Checked Received: (qmail 45935 invoked from network); 1 Sep 2017 08:22:16 -0000 Received: from mo4-p00-ob.smtp.rzone.de (HELO mo4-p00-ob.smtp.rzone.de) (81.169.146.161) by server-14.tower-27.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 1 Sep 2017 08:22:16 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1504254136; s=domk; d=aepfle.de; h=References:In-Reply-To:Date:Subject:Cc:To:From; bh=6jbF4mxc6WzxOEI4lE4YgzzQPQZPHCwZuL8QYdOgXmY=; b=DRD6UD693F9bROqlEFeLN7YpnSYWIqWh9ZF+KAl/uwgL9HJVikCTOy+FBI2NKuxdsy QkZT2rIXlbS/zQ/0CRxitsXeiZR9DTTRbqLwTPZg/WVvpoflP4Jrn+BOhAf1dLYkAB4/ nMST3rtUvh1CWM1Cb2en9YKRWX7HwYu48Sdks= X-RZG-AUTH: :P2EQZWCpfu+qG7CngxMFH1J+yackYocTD1iAi8x+OWi/zfN1cLnAYQ78zGVeNvMqDZ9FAQjKEjEEJqcyOcu050Z/v+PVvA== X-RZG-CLASS-ID: mo00 Received: from sender ([2001:a61:10da:65ff:c0dd:e8ad:2be6:d9e2]) by smtp.strato.de (RZmta 41.4 AUTH) with ESMTPSA id R01296t818M6ZxR (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA (curve secp521r1 with 521 ECDH bits, eq. 15360 bits RSA)) (Client did not present a certificate); Fri, 1 Sep 2017 10:22:06 +0200 (CEST) From: Olaf Hering To: xen-devel@lists.xen.org, Andrew Cooper , Ian Jackson , Wei Liu Date: Fri, 1 Sep 2017 10:21:47 +0200 Message-Id: <20170901082149.6355-2-olaf@aepfle.de> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20170901082149.6355-1-olaf@aepfle.de> References: <20170901082149.6355-1-olaf@aepfle.de> Cc: Olaf Hering Subject: [Xen-devel] [PATCH v8 1/3] tools/libxc: move SUPERPAGE macros to common header 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: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP The macros SUPERPAGE_2MB_SHIFT and SUPERPAGE_1GB_SHIFT will be used by other code in libxc. Move the macros to a header file. Signed-off-by: Olaf Hering Acked-by: Wei Liu --- tools/libxc/xc_dom_x86.c | 5 ----- tools/libxc/xc_private.h | 5 +++++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/libxc/xc_dom_x86.c b/tools/libxc/xc_dom_x86.c index cb68efcbd3..5aff5cad58 100644 --- a/tools/libxc/xc_dom_x86.c +++ b/tools/libxc/xc_dom_x86.c @@ -43,11 +43,6 @@ #define SUPERPAGE_BATCH_SIZE 512 -#define SUPERPAGE_2MB_SHIFT 9 -#define SUPERPAGE_2MB_NR_PFNS (1UL << SUPERPAGE_2MB_SHIFT) -#define SUPERPAGE_1GB_SHIFT 18 -#define SUPERPAGE_1GB_NR_PFNS (1UL << SUPERPAGE_1GB_SHIFT) - #define X86_CR0_PE 0x01 #define X86_CR0_ET 0x10 diff --git a/tools/libxc/xc_private.h b/tools/libxc/xc_private.h index 1c27b0fded..d581f850b0 100644 --- a/tools/libxc/xc_private.h +++ b/tools/libxc/xc_private.h @@ -66,6 +66,11 @@ struct iovec { #define DECLARE_FLASK_OP struct xen_flask_op op #define DECLARE_PLATFORM_OP struct xen_platform_op platform_op +#define SUPERPAGE_2MB_SHIFT 9 +#define SUPERPAGE_2MB_NR_PFNS (1UL << SUPERPAGE_2MB_SHIFT) +#define SUPERPAGE_1GB_SHIFT 18 +#define SUPERPAGE_1GB_NR_PFNS (1UL << SUPERPAGE_1GB_SHIFT) + #undef PAGE_SHIFT #undef PAGE_SIZE #undef PAGE_MASK