From patchwork Tue Aug 15 14:41:33 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 9901967 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 2944A602C9 for ; Tue, 15 Aug 2017 14:43:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 18EA42888D for ; Tue, 15 Aug 2017 14:43:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 09DBD2886D; Tue, 15 Aug 2017 14:43:46 +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 80BD92888A for ; Tue, 15 Aug 2017 14:43:44 +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 1dhd2M-0002PD-I4; Tue, 15 Aug 2017 14:41:42 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dhd2M-0002Oi-1V for xen-devel@lists.xenproject.org; Tue, 15 Aug 2017 14:41:42 +0000 Received: from [85.158.137.68] by server-11.bemta-3.messagelabs.com id 9E/C0-01724-52803995; Tue, 15 Aug 2017 14:41:41 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrLIsWRWlGSWpSXmKPExsXS6fjDS1eFY3K kwZS92hbft0xmcmD0OPzhCksAYxRrZl5SfkUCa8a84/sZC16JVEz9s5qtgfEzfxcjJ4eQQJ7E k7cLmEFsXgE7ibl3TrGA2BIChhKnF94Es1kEVCXu9vQygthsAuoSbc+2s3YxcnCICBhInDua1 MXIxcEs8ItRYs6FKWD1wgK2Eq83bWCFmF8ksfr5CbD5nAL2EjsfrGEG6eUVEJT4u0MYJMwsoC Xx8NctFghbW2LZwtdgJcwC0hLL/3FMYOSbhdAwC0nDLCQNsxAaFjCyrGLUKE4tKkst0jUy0Es qykzPKMlNzMzRNTQw1stNLS5OTE/NSUwq1kvOz93ECAy+egYGxh2MzSf8DjFKcjApifIuOjsp UogvKT+lMiOxOCO+qDQntfgQowYHh8C2XasvMEqx5OXnpSpJ8PaxTY4UEixKTU+tSMvMAcYHT KkEB4+SCO9TkDRvcUFibnFmOkTqFKMux6sJ/78xCYHNkBLn3QpSJABSlFGaBzcCFquXGGWlhH kZGRgYhHgKUotyM0tQ5V8xinMwKgnzarADTeHJzCuB2/QK6AgmoCOutE8COaIkESEl1cAoM/2 nwsSPgiaxGxbukv2Q5v1np/akqAV70jhOiK6Z2st4WjViTTP3nKvHTy5J3cBQrFvDE6FqanZr YbB4gmV13eP7z+NtrLy8WqesFHFz83JvOaTDfy/6FO9l0y3+Xx5dXtpxWvjdI4+e8GlhzsZSh r+kt8jGlhd0yvFJ7o7YxBdUuDBo9xslluKMREMt5qLiRAB8y/bG0AIAAA== X-Env-Sender: JBeulich@suse.com X-Msg-Ref: server-9.tower-31.messagelabs.com!1502808098!54632480!1 X-Originating-IP: [137.65.248.74] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 9.4.45; banners=-,-,- X-VirusChecked: Checked Received: (qmail 56209 invoked from network); 15 Aug 2017 14:41:40 -0000 Received: from prv-mh.provo.novell.com (HELO prv-mh.provo.novell.com) (137.65.248.74) by server-9.tower-31.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 15 Aug 2017 14:41:40 -0000 Received: from INET-PRV-MTA by prv-mh.provo.novell.com with Novell_GroupWise; Tue, 15 Aug 2017 08:41:37 -0600 Message-Id: <5993243D020000780016FED5@prv-mh.provo.novell.com> X-Mailer: Novell GroupWise Internet Agent 14.2.2 Date: Tue, 15 Aug 2017 08:41:33 -0600 From: "Jan Beulich" To: "xen-devel" References: <59931E0F020000780016FEA3@prv-mh.provo.novell.com> <59931E0F020000780016FEA3@prv-mh.provo.novell.com> In-Reply-To: <59931E0F020000780016FEA3@prv-mh.provo.novell.com> Mime-Version: 1.0 Content-Disposition: inline Cc: Stefano Stabellini , Wei Liu , George Dunlap , Andrew Cooper , Ian Jackson , Tim Deegan Subject: [Xen-devel] [PATCH 6/8] gnttab: move GNTPIN_* out of header file 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 They're private to grant_table.c. Signed-by: Jan Beulich --- a/xen/common/grant_table.c +++ b/xen/common/grant_table.c @@ -158,7 +158,24 @@ shared_entry_header(struct grant_table * /* Active grant entry - used for shadowing GTF_permit_access grants. */ struct active_grant_entry { - uint32_t pin; /* Reference count information. */ + uint32_t pin; /* Reference count information: */ + /* Count of writable host-CPU mappings. */ +#define GNTPIN_hstw_shift (0) +#define GNTPIN_hstw_inc (1 << GNTPIN_hstw_shift) +#define GNTPIN_hstw_mask (0xFFU << GNTPIN_hstw_shift) + /* Count of read-only host-CPU mappings. */ +#define GNTPIN_hstr_shift (8) +#define GNTPIN_hstr_inc (1 << GNTPIN_hstr_shift) +#define GNTPIN_hstr_mask (0xFFU << GNTPIN_hstr_shift) + /* Count of writable device-bus mappings. */ +#define GNTPIN_devw_shift (16) +#define GNTPIN_devw_inc (1 << GNTPIN_devw_shift) +#define GNTPIN_devw_mask (0xFFU << GNTPIN_devw_shift) + /* Count of read-only device-bus mappings. */ +#define GNTPIN_devr_shift (24) +#define GNTPIN_devr_inc (1 << GNTPIN_devr_shift) +#define GNTPIN_devr_mask (0xFFU << GNTPIN_devr_shift) + domid_t domid; /* Domain being granted access. */ unsigned int start:15; /* For sub-page grants, the start offset in the page. */ --- a/xen/include/xen/grant_table.h +++ b/xen/include/xen/grant_table.h @@ -28,23 +28,6 @@ #include #include - /* Count of writable host-CPU mappings. */ -#define GNTPIN_hstw_shift (0) -#define GNTPIN_hstw_inc (1 << GNTPIN_hstw_shift) -#define GNTPIN_hstw_mask (0xFFU << GNTPIN_hstw_shift) - /* Count of read-only host-CPU mappings. */ -#define GNTPIN_hstr_shift (8) -#define GNTPIN_hstr_inc (1 << GNTPIN_hstr_shift) -#define GNTPIN_hstr_mask (0xFFU << GNTPIN_hstr_shift) - /* Count of writable device-bus mappings. */ -#define GNTPIN_devw_shift (16) -#define GNTPIN_devw_inc (1 << GNTPIN_devw_shift) -#define GNTPIN_devw_mask (0xFFU << GNTPIN_devw_shift) - /* Count of read-only device-bus mappings. */ -#define GNTPIN_devr_shift (24) -#define GNTPIN_devr_inc (1 << GNTPIN_devr_shift) -#define GNTPIN_devr_mask (0xFFU << GNTPIN_devr_shift) - #ifndef DEFAULT_MAX_NR_GRANT_FRAMES /* to allow arch to override */ /* Default maximum size of a grant table. [POLICY] */ #define DEFAULT_MAX_NR_GRANT_FRAMES 32