All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gerd Knorr <kraxel@suse.de>
To: xen-devel@lists.xensource.com
Subject: [patch] pae: nx support
Date: Wed, 22 Jun 2005 15:50:37 +0200	[thread overview]
Message-ID: <20050622135037.GA31640@bytesex> (raw)

  Hi,

Below is a patch to enable nx for 32-bit PAE mode.

  Gerd

Index: xen/include/asm-x86/x86_32/page-2level.h
===================================================================
--- xen.orig/include/asm-x86/x86_32/page-2level.h	2005-06-21 10:06:12.000000000 +0200
+++ xen/include/asm-x86/x86_32/page-2level.h	2005-06-22 14:09:50.000000000 +0200
@@ -46,6 +46,8 @@ typedef l2_pgentry_t root_pgentry_t;
  *  12-bit flags = (pte[11:0])
  */
 
+#define _PAGE_NX                0U
+
 /* Extract flags into 12-bit integer, or turn 12-bit flags into a pte mask. */
 #define get_pte_flags(x) ((int)(x) & 0xFFF)
 #define put_pte_flags(x) ((intpte_t)((x) & 0xFFF))
Index: xen/include/asm-x86/x86_32/page-3level.h
===================================================================
--- xen.orig/include/asm-x86/x86_32/page-3level.h	2005-06-21 10:06:12.000000000 +0200
+++ xen/include/asm-x86/x86_32/page-3level.h	2005-06-22 14:09:50.000000000 +0200
@@ -59,6 +59,8 @@ typedef l3_pgentry_t root_pgentry_t;
  *  32-bit flags = (pte[63:44],pte[11:0])
  */
 
+#define _PAGE_NX (cpu_has_nx ? (1<<31) : 0)
+
 /* Extract flags into 32-bit integer, or turn 32-bit flags into a pte mask. */
 #define get_pte_flags(x) (((int)((x) >> 32) & ~0xFFF) | ((int)(x) & 0xFFF))
 #define put_pte_flags(x) (((intpte_t)((x) & ~0xFFF) << 40) | ((x) & 0xFFF))
Index: xen/include/asm-x86/x86_32/page.h
===================================================================
--- xen.orig/include/asm-x86/x86_32/page.h	2005-06-21 10:06:12.000000000 +0200
+++ xen/include/asm-x86/x86_32/page.h	2005-06-22 14:09:50.000000000 +0200
@@ -7,8 +7,6 @@
 #define VADDR_BITS              32
 #define VADDR_MASK              (~0UL)
 
-#define _PAGE_NX                0U
-
 #include <xen/config.h>
 #ifdef CONFIG_X86_PAE
 # include <asm/x86_32/page-3level.h>

                 reply	other threads:[~2005-06-22 13:50 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20050622135037.GA31640@bytesex \
    --to=kraxel@suse.de \
    --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.