Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751107Ab2F3Er1 (ORCPT ); Sat, 30 Jun 2012 00:47:27 -0400 Received: from mail-qc0-f174.google.com ([209.85.216.174]:37830 "EHLO mail-qc0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750864Ab2F3Er0 (ORCPT ); Sat, 30 Jun 2012 00:47:26 -0400 Date: Sat, 30 Jun 2012 00:47:18 -0400 From: Konrad Rzeszutek Wilk To: Andrea Arcangeli Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, Hillf Danton , Dan Smith , Peter Zijlstra , Linus Torvalds , Andrew Morton , Thomas Gleixner , Ingo Molnar , Paul Turner , Suresh Siddha , Mike Galbraith , "Paul E. McKenney" , Lai Jiangshan , Bharata B Rao , Lee Schermerhorn , Rik van Riel , Johannes Weiner , Srivatsa Vaddagiri , Christoph Lameter , Alex Shi , Mauricio Faria de Oliveira , Konrad Rzeszutek Wilk , Don Morris , Benjamin Herrenschmidt Subject: Re: [PATCH 04/40] xen: document Xen is using an unused bit for the pagetables Message-ID: <20120630044700.GA3975@localhost.localdomain> References: <1340888180-15355-1-git-send-email-aarcange@redhat.com> <1340888180-15355-5-git-send-email-aarcange@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1340888180-15355-5-git-send-email-aarcange@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2861 Lines: 68 On Thu, Jun 28, 2012 at 02:55:44PM +0200, Andrea Arcangeli wrote: > Xen has taken over the last reserved bit available for the pagetables Some time ago when I saw this patch I asked about it (if there is way to actually stop using this bit) and you mentioned it is not the last bit available for pagemaps. Perhaps you should alter the comment in this description? > which is set through ioremap, this documents it and makes the code It actually is through ioremap, gntdev (to map another guest memory), and on pfns which fall in E820 on the non-RAM and gap sections. > more readable. > > Signed-off-by: Andrea Arcangeli > --- > arch/x86/include/asm/pgtable_types.h | 11 +++++++++-- > 1 files changed, 9 insertions(+), 2 deletions(-) > > diff --git a/arch/x86/include/asm/pgtable_types.h b/arch/x86/include/asm/pgtable_types.h > index 013286a..b74cac9 100644 > --- a/arch/x86/include/asm/pgtable_types.h > +++ b/arch/x86/include/asm/pgtable_types.h > @@ -17,7 +17,7 @@ > #define _PAGE_BIT_PAT 7 /* on 4KB pages */ > #define _PAGE_BIT_GLOBAL 8 /* Global TLB entry PPro+ */ > #define _PAGE_BIT_UNUSED1 9 /* available for programmer */ > -#define _PAGE_BIT_IOMAP 10 /* flag used to indicate IO mapping */ > +#define _PAGE_BIT_UNUSED2 10 > #define _PAGE_BIT_HIDDEN 11 /* hidden by kmemcheck */ > #define _PAGE_BIT_PAT_LARGE 12 /* On 2MB or 1GB pages */ > #define _PAGE_BIT_SPECIAL _PAGE_BIT_UNUSED1 > @@ -41,7 +41,7 @@ > #define _PAGE_PSE (_AT(pteval_t, 1) << _PAGE_BIT_PSE) > #define _PAGE_GLOBAL (_AT(pteval_t, 1) << _PAGE_BIT_GLOBAL) > #define _PAGE_UNUSED1 (_AT(pteval_t, 1) << _PAGE_BIT_UNUSED1) > -#define _PAGE_IOMAP (_AT(pteval_t, 1) << _PAGE_BIT_IOMAP) > +#define _PAGE_UNUSED2 (_AT(pteval_t, 1) << _PAGE_BIT_UNUSED2) > #define _PAGE_PAT (_AT(pteval_t, 1) << _PAGE_BIT_PAT) > #define _PAGE_PAT_LARGE (_AT(pteval_t, 1) << _PAGE_BIT_PAT_LARGE) > #define _PAGE_SPECIAL (_AT(pteval_t, 1) << _PAGE_BIT_SPECIAL) > @@ -49,6 +49,13 @@ > #define _PAGE_SPLITTING (_AT(pteval_t, 1) << _PAGE_BIT_SPLITTING) > #define __HAVE_ARCH_PTE_SPECIAL > > +/* flag used to indicate IO mapping */ > +#ifdef CONFIG_XEN > +#define _PAGE_IOMAP (_AT(pteval_t, 1) << _PAGE_BIT_UNUSED2) > +#else > +#define _PAGE_IOMAP (_AT(pteval_t, 0)) > +#endif > + > #ifdef CONFIG_KMEMCHECK > #define _PAGE_HIDDEN (_AT(pteval_t, 1) << _PAGE_BIT_HIDDEN) > #else > > -- > To unsubscribe, send a message with 'unsubscribe linux-mm' in > the body to majordomo@kvack.org. For more info on Linux MM, > see: http://www.linux-mm.org/ . > Don't email: email@kvack.org > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/