From patchwork Thu Jul 20 16:04:09 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Liu X-Patchwork-Id: 9855291 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 2B3BE60392 for ; Thu, 20 Jul 2017 16:06:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1C3EF28687 for ; Thu, 20 Jul 2017 16:06:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0FB53286DF; Thu, 20 Jul 2017 16:06:56 +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 355C128687 for ; Thu, 20 Jul 2017 16:06:54 +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 1dYDwH-0000E1-SO; Thu, 20 Jul 2017 16:04:33 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dYDwG-0000DI-R9 for xen-devel@lists.xenproject.org; Thu, 20 Jul 2017 16:04:32 +0000 Received: from [193.109.254.147] by server-4.bemta-6.messagelabs.com id C4/A6-02962-094D0795; Thu, 20 Jul 2017 16:04:32 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprAIsWRWlGSWpSXmKPExsXitHRDpG7/lYJ Ig/vvtS2+b5nM5MDocfjDFZYAxijWzLyk/IoE1ozpE5axFszkrrj0P7eB8TRnFyMnh4SAv8SR m2cZQWw2AWWJn529bCC2iICeRNOB50BxLg5mgTmMElPndgE5HBzCAo4S+zczgdSwCKhKrNz/m AXE5hUwl3j58TkLxEx5iV1tF1lBbE4BC4k1v76C1QsB1WzeP58FwlaQ6Jh+jAmiV1Di5MwnYH FmAQmJgy9eME9g5J2FJDULSWoBI9MqRo3i1KKy1CJdQwu9pKLM9IyS3MTMHF1DAzO93NTi4sT 01JzEpGK95PzcTYzA0GEAgh2MNzcGHGKU5GBSEuVlCSyIFOJLyk+pzEgszogvKs1JLT7EKMPB oSTB+/MSUE6wKDU9tSItMwcYxDBpCQ4eJRFex8tAad7igsTc4sx0iNQpRl2OVxP+f2MSYsnLz 0uVEuetACkSACnKKM2DGwGLqEuMslLCvIxARwnxFKQW5WaWoMq/YhTnYFQS5o0GmcKTmVcCt+ kV0BFMQEc8cgM7oiQRISXVwKiXMSt61qcbB7bf33XoxiNpCU75l+f5S4oyr3/8Hsls1z9/Rnx K8Br2NY4LpcL3/whSmfqCU0/D+9UHo3iRZFVlDn+BX++zfyYKhuTo3nkwK/CGtZXxtA9bP+q9 7PnadrojZdPdQ9v1fnLH1HuveJr5x/Soac2Jrl+fZz1eycl8+ebB+zN+rCxXYinOSDTUYi4qT gQAZK0526MCAAA= X-Env-Sender: prvs=3674d857a=wei.liu2@citrix.com X-Msg-Ref: server-3.tower-27.messagelabs.com!1500566668!107825623!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.25; banners=-,-,- X-VirusChecked: Checked Received: (qmail 6817 invoked from network); 20 Jul 2017 16:04:31 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-3.tower-27.messagelabs.com with RC4-SHA encrypted SMTP; 20 Jul 2017 16:04:31 -0000 X-IronPort-AV: E=Sophos;i="5.40,384,1496102400"; d="scan'208";a="432307682" From: Wei Liu To: Xen-devel Date: Thu, 20 Jul 2017 17:04:09 +0100 Message-ID: <20170720160426.2343-5-wei.liu2@citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170720160426.2343-1-wei.liu2@citrix.com> References: <20170720160426.2343-1-wei.liu2@citrix.com> MIME-Version: 1.0 Cc: George Dunlap , Andrew Cooper , Wei Liu , Jan Beulich Subject: [Xen-devel] [PATCH v3 04/21] x86/mm: lift PAGE_CACHE_ATTRS to page.h 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 Currently all the users are within x86/mm.c. But that will change once we split PV specific mm code to another file. Lift that to page.h along side _PAGE_* in preparation for later patches. No functional change. Add some spaces around "|" while moving. Signed-off-by: Wei Liu --- xen/arch/x86/mm.c | 2 -- xen/include/asm-x86/page.h | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c index 4e6f9f5750..8d7ceff9c8 100644 --- a/xen/arch/x86/mm.c +++ b/xen/arch/x86/mm.c @@ -151,8 +151,6 @@ bool __read_mostly machine_to_phys_mapping_valid; struct rangeset *__read_mostly mmio_ro_ranges; -#define PAGE_CACHE_ATTRS (_PAGE_PAT|_PAGE_PCD|_PAGE_PWT) - bool __read_mostly opt_allow_superpage; boolean_param("allowsuperpage", opt_allow_superpage); diff --git a/xen/include/asm-x86/page.h b/xen/include/asm-x86/page.h index 474b9bde78..80dca02516 100644 --- a/xen/include/asm-x86/page.h +++ b/xen/include/asm-x86/page.h @@ -315,6 +315,8 @@ void efi_update_l4_pgtable(unsigned int l4idx, l4_pgentry_t); #define _PAGE_AVAIL_HIGH (_AC(0x7ff, U) << 12) #define _PAGE_NX (cpu_has_nx ? _PAGE_NX_BIT : 0) +#define PAGE_CACHE_ATTRS (_PAGE_PAT | _PAGE_PCD | _PAGE_PWT) + /* * Debug option: Ensure that granted mappings are not implicitly unmapped. * WARNING: This will need to be disabled to run OSes that use the spare PTE