From patchwork Thu Aug 17 17:01:31 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olaf Hering X-Patchwork-Id: 9906695 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 A98B86024A for ; Thu, 17 Aug 2017 17:04:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 96A352785D for ; Thu, 17 Aug 2017 17:04:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8B3B327E71; Thu, 17 Aug 2017 17:04:11 +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 AA30E2785D for ; Thu, 17 Aug 2017 17:04:10 +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 1diOB8-0008HT-MC; Thu, 17 Aug 2017 17:01:54 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1diOB7-0008HF-06 for xen-devel@lists.xen.org; Thu, 17 Aug 2017 17:01:53 +0000 Received: from [85.158.137.68] by server-11.bemta-3.messagelabs.com id 55/0E-01724-00CC5995; Thu, 17 Aug 2017 17:01:52 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrBLMWRWlGSWpSXmKPExsUSuHLSQt3/p6d GGrz5rGGx5ONiFgdGj6O7fzMFMEaxZuYl5VcksGa8v2lesJir4vnq7SwNjE2cXYxcHCwCv5gk JkxcydTFyMEhIZApsWxeGIQpIvHkfxpIiZDAQSaJA68esHUxcnKwCShJ7D14nBEkISIwkVFi6 59njCAJZgEFiRfPtzKB2MIC3hJ7724Da2ARUJX4+amRGcTmFTCWuPT2OjuILSEgL9G/YzlYPa eAicTTV2vA5ggB1Uz71cs4gZF3ASPDKkb14tSistQiXWO9pKLM9IyS3MTMHF1DA2O93NTi4sT 01JzEpGK95PzcTYzAUGAAgh2MzV+cDjFKcjApifL+njUlUogvKT+lMiOxOCO+qDQntfgQowwH h5IE75dTUyOFBItS01Mr0jJzgEEJk5bg4FES4a0FSfMWFyTmFmemQ6ROMepyvJrw/xuTEEtef l6qlDhvIDDEhQRAijJK8+BGwCLkEqOslDAvI9BRQjwFqUW5mSWo8q8YxTkYlYR5HUGm8GTmlc BtegV0BBPQEVfaJ4EcUZKIkJJqYHS9Fmc1++3txSuWKn7b+4nN4ETN1aysiUbJa08+kfAQMOy R2Hb1XeRbj3X1G0Qkor05uF7xl7/9++zvu62Tzi71NKqxecITlVxv9VJPr4Uj5TDz/1+vX155 lvZTnfH35v+P1ZTSe69oef+u+DFBK9njwdJTAvZhF7e4X5p9zGRXi1y5+P//xyYosRRnJBpqM RcVJwIAIzDs6YsCAAA= X-Env-Sender: olaf@aepfle.de X-Msg-Ref: server-15.tower-31.messagelabs.com!1502989311!106423767!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 60503 invoked from network); 17 Aug 2017 17:01:51 -0000 Received: from mo4-p00-ob.smtp.rzone.de (HELO mo4-p00-ob.smtp.rzone.de) (81.169.146.161) by server-15.tower-31.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 17 Aug 2017 17:01:51 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1502989311; l=1344; s=domk; d=aepfle.de; h=References:In-Reply-To:Date:Subject:Cc:To:From; bh=dA3QyoNKyE6FtSu4+zWQQ35RE9laB0lWKk/1UJ7g+jM=; b=Wceb693MSKEfga2+FljbjLHUX4johWSKU66Pi+xLDn/g/mQPcf6OnNCxt+Ly+8hrgd Y1D0PZsJUvpB5I3Y/bnaCkGjS2xp4yqmbFMftSDouhvjcumLj8yr1ens6NnSkZVGfSQQ uIwuPtR5QEG1FzFFp+ShNQEMGiECAyqB2b2TI= X-RZG-AUTH: :P2EQZWCpfu+qG7CngxMFH1J+yackYocTD1iAi8x+OWi/zfN1cLnAYQz4mzReZKAqPT2tb6Nx5EL7HQvAw3tBGHnS2eB9 X-RZG-CLASS-ID: mo00 Received: from sender ([2001:a61:3430:dff:75aa:c36f:225e:fcee]) by smtp.strato.de (RZmta 41.2 AUTH) with ESMTPSA id f03737t7HH1oCwk (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); Thu, 17 Aug 2017 19:01:50 +0200 (CEST) From: Olaf Hering To: Andrew Cooper , Ian Jackson , Wei Liu , xen-devel@lists.xen.org Date: Thu, 17 Aug 2017 19:01:31 +0200 Message-Id: <20170817170133.30939-2-olaf@aepfle.de> X-Mailer: git-send-email 2.14.0 In-Reply-To: <20170817170133.30939-1-olaf@aepfle.de> References: <20170817170133.30939-1-olaf@aepfle.de> Cc: Olaf Hering Subject: [Xen-devel] [PATCH v2 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