qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 09/11] PPC64: Fix NX bit


From: Alexander Graf
Subject: [Qemu-devel] [PATCH 09/11] PPC64: Fix NX bit
Date: Fri, 6 Mar 2009 16:36:03 +0100

This patch fixes two issues with the NX bit:

1) The guarded bit has nothing to do with NX.
2) ctx->nx only got ORed, but never reset. So when one page in the
   lifetime of the VM was ever NX, all later pages were too.

Signed-off-by: Alexander Graf <address@hidden>
---
 target-ppc/helper.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/target-ppc/helper.c b/target-ppc/helper.c
index 7fe3f8f..58b7fe2 100644
--- a/target-ppc/helper.c
+++ b/target-ppc/helper.c
@@ -226,8 +226,7 @@ static always_inline int _pte_check (mmu_ctx_t *ctx, int 
is_64b,
             ptem = pte0 & PTE64_PTEM_MASK;
             mmask = PTE64_CHECK_MASK;
             pp = (pte1 & 0x00000003) | ((pte1 >> 61) & 0x00000004);
-            ctx->nx |= (pte1 >> 2) & 1; /* No execute bit */
-            ctx->nx |= (pte1 >> 3) & 1; /* Guarded bit    */
+            ctx->nx = (pte1 >> 2) & 1; /* No execute bit */
         } else
 #endif
         {
-- 
1.6.0.2





reply via email to

[Prev in Thread] Current Thread [Next in Thread]