From patchwork Thu Aug 17 14:44:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Liu X-Patchwork-Id: 9906477 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 B62506038C 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 A889128B29 for ; Thu, 17 Aug 2017 14:47:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9DB1628B2D; 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 4C7A628B2F for ; Thu, 17 Aug 2017 14:47:32 +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 1diM2j-0000y3-0d; Thu, 17 Aug 2017 14:45:05 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1diM2h-0000xF-UH for xen-devel@lists.xenproject.org; Thu, 17 Aug 2017 14:45:04 +0000 Received: from [85.158.137.68] by server-8.bemta-3.messagelabs.com id 84/A5-02176-FEBA5995; Thu, 17 Aug 2017 14:45:03 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprEIsWRWlGSWpSXmKPExsXitHRDpO671VM jDX63qlt83zKZyYHR4/CHKywBjFGsmXlJ+RUJrBnz/0xhLfjNXbFqw122BsaZXF2MnBwSAv4S D+b3sIHYbALKEj87e8FsEQE9iaYDzxm7GLk4mAXmMEpMndvFCJIQFnCU+HjyEyuIzSKgKvFs1 04mEJtXwELi1vIXjBBD5SV2tV0Eq+EUsJQ4NGkxM4gtBFQz+0M7O4StINEx/RhUr6DEyZlPWE BsZgEJiYMvXjBPYOSdhSQ1C0lqASPTKkaN4tSistQiXWMDvaSizPSMktzEzBxdQwNjvdzU4uL E9NScxKRiveT83E2MwPCpZ2Bg3MHYecLvEKMkB5OSKO/vWVMihfiS8lMqMxKLM+KLSnNSiw8x ynBwKEnwuq+aGikkWJSanlqRlpkDDGSYtAQHj5IIbytImre4IDG3ODMdInWKUZfj1YT/35iEW PLy81KlxHnvgRQJgBRllObBjYBF1SVGWSlhXkYGBgYhnoLUotzMElT5V4ziHIxKwrwzQKbwZO aVwG16BXQEE9ARV9ongRxRkoiQkmpgTO3tUZiTYbN9s9Yzr0y1ltXb/A1ftVRm/evf1/z67nE dtVNhS2psfU1FMjwZde65Pi1vn5yzoTtTRC4q8SiDz7NFXNkTwl+duXtv9dyuZGGtJ3zaZRlS F+evrP7RffDi/4fKtd+ezGW5M5dXjP/yeVslkwmKBdyfniTybb2e0rtuEncGW9o6JZbijERDL eai4kQAMYU6GqUCAAA= X-Env-Sender: prvs=395e6b081=wei.liu2@citrix.com X-Msg-Ref: server-14.tower-31.messagelabs.com!1502981098!110297526!3 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 63921 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-14.tower-31.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="435893163" From: Wei Liu To: Xen-devel Date: Thu, 17 Aug 2017 15:44:29 +0100 Message-ID: <20170817144456.18989-5-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 04/31] 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 Acked-by: Andrew Cooper --- 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 5c6a7e5638..64dd520044 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) - static uint32_t base_disallow_mask; /* Global bit is allowed to be set on L1 PTEs. Intended for user mappings. */ #define L1_DISALLOW_MASK ((base_disallow_mask | _PAGE_GNTTAB) & ~_PAGE_GLOBAL) diff --git a/xen/include/asm-x86/page.h b/xen/include/asm-x86/page.h index 263ca5bc3c..d082ba8d42 100644 --- a/xen/include/asm-x86/page.h +++ b/xen/include/asm-x86/page.h @@ -304,6 +304,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