All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave McCracken <dcm@mccr.org>
To: xen-devel@lists.xensource.com
Subject: [PATCH 1/2] PV Hugetlb support - Hypervisor portion
Date: Thu, 24 Jul 2008 08:51:41 -0500	[thread overview]
Message-ID: <200807240851.41463.dcm@mccr.org> (raw)
In-Reply-To: <200807240848.13587.dcm@mccr.org>

[-- Attachment #1: Type: text/plain, Size: 243 bytes --]

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.


[-- Attachment #2: xen-hpage-02.patch --]
[-- Type: text/x-diff, Size: 1923 bytes --]

--- 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));
 }

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

  reply	other threads:[~2008-07-24 13:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-24 13:45 [PATCH 0/2] Add hugetlb support for PV Dave McCracken
2008-07-24 13:48 ` [PATCH 1/2] PV Hugetlb support - Hypervisor portion Dave McCracken
2008-07-24 13:51   ` Dave McCracken [this message]
2008-07-24 13:50 ` [PATCH 2/2] PV hugetlb support - kernel portion Dave McCracken
2008-07-24 14:23 ` [PATCH 0/2] Add hugetlb support for PV Jan Beulich
2008-07-24 14:50   ` Jeremy Fitzhardinge

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200807240851.41463.dcm@mccr.org \
    --to=dcm@mccr.org \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.