From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dave McCracken Subject: [PATCH 1/2] PV Hugetlb support - Hypervisor portion Date: Thu, 24 Jul 2008 08:51:41 -0500 Message-ID: <200807240851.41463.dcm@mccr.org> References: <200807240845.08753.dcm@mccr.org> <200807240848.13587.dcm@mccr.org> Mime-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_tjIiI8YVkBGo+pN" Return-path: In-Reply-To: <200807240848.13587.dcm@mccr.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --Boundary-00=_tjIiI8YVkBGo+pN Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline On Thursday 24 July 2008, Dave McCracken wrote: > Here is the hypervisor portion of hugetlb support for PV machines. Oops. Here's really the hypervisor portion. The first one was a copy of the kernel portion. Dave McCracken Oracle Corp. --Boundary-00=_tjIiI8YVkBGo+pN Content-Type: text/x-diff; charset="iso 8859-15"; name="xen-hpage-02.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="xen-hpage-02.patch" --- xen-unstable/./xen/include/asm-x86/x86_32/page.h 2008-07-17 09:49:27.000000000 -0500 +++ xen-hpage/./xen/include/asm-x86/x86_32/page.h 2008-07-23 09:30:40.000000000 -0500 @@ -112,7 +112,7 @@ extern unsigned int PAGE_HYPERVISOR_NOCA * Disallow unused flag bits plus PAT/PSE, PCD, PWT and GLOBAL. * Permit the NX bit if the hardware supports it. */ -#define BASE_DISALLOW_MASK (0xFFFFF198U & ~_PAGE_NX) +#define BASE_DISALLOW_MASK (0xFFFFF118U & ~_PAGE_NX) #define L1_DISALLOW_MASK (BASE_DISALLOW_MASK | _PAGE_GNTTAB) #define L2_DISALLOW_MASK (BASE_DISALLOW_MASK) --- xen-unstable/./xen/include/asm-x86/x86_64/page.h 2008-07-17 09:49:27.000000000 -0500 +++ xen-hpage/./xen/include/asm-x86/x86_64/page.h 2008-07-23 09:30:40.000000000 -0500 @@ -109,7 +109,7 @@ typedef l4_pgentry_t root_pgentry_t; * Permit the NX bit if the hardware supports it. * Note that range [62:52] is available for software use on x86/64. */ -#define BASE_DISALLOW_MASK (0xFF800198U & ~_PAGE_NX) +#define BASE_DISALLOW_MASK (0xFF800118U & ~_PAGE_NX) #define L1_DISALLOW_MASK (BASE_DISALLOW_MASK | _PAGE_GNTTAB) #define L2_DISALLOW_MASK (BASE_DISALLOW_MASK) --- xen-unstable/./xen/arch/x86/mm.c 2008-07-17 09:49:27.000000000 -0500 +++ xen-hpage/./xen/arch/x86/mm.c 2008-07-23 09:30:40.000000000 -0500 @@ -755,6 +755,9 @@ get_page_from_l2e( MEM_LOG("Bad L2 flags %x", l2e_get_flags(l2e) & L2_DISALLOW_MASK); return 0; } + if ( l2e_get_flags(l2e) & _PAGE_PSE ) + return 1; + rc = get_page_and_type_from_pagenr(l2e_get_pfn(l2e), PGT_l1_page_table, d); if ( unlikely(!rc) ) @@ -948,6 +951,7 @@ void put_page_from_l1e(l1_pgentry_t l1e, static void put_page_from_l2e(l2_pgentry_t l2e, unsigned long pfn) { if ( (l2e_get_flags(l2e) & _PAGE_PRESENT) && + (!(l2e_get_flags(l2e) & _PAGE_PSE)) && (l2e_get_pfn(l2e) != pfn) ) put_page_and_type(l2e_get_page(l2e)); } --Boundary-00=_tjIiI8YVkBGo+pN Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --Boundary-00=_tjIiI8YVkBGo+pN--