[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 09/11] PPC64: Fix NX bit
From: |
Hollis Blanchard |
Subject: |
Re: [Qemu-devel] [PATCH 09/11] PPC64: Fix NX bit |
Date: |
Fri, 06 Mar 2009 13:31:42 -0600 |
On Fri, 2009-03-06 at 16:36 +0100, Alexander Graf wrote:
> This patch fixes two issues with the NX bit:
>
> 1) The guarded bit has nothing to do with NX.
It turns out that instruction access is not allowed from mappings that
have either N *or* G bits set. (There are also N bits in the segment
entry; not sure how/if those are handled in this path.)
> 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
> {
--
Hollis Blanchard
IBM Linux Technology Center
- [Qemu-devel] [PATCH 03/11] PPC64: Implment tlbiel, (continued)
- [Qemu-devel] [PATCH 03/11] PPC64: Implment tlbiel, Alexander Graf, 2009/03/06
- [Qemu-devel] [PATCH 04/11] Activate uninorth AGP bridge, Alexander Graf, 2009/03/06
- [Qemu-devel] [PATCH 05/11] PPC64: Nop some SPRs on 970fx, Alexander Graf, 2009/03/06
- [Qemu-devel] [PATCH 06/11] PPC64: Enable 64bit mode on interrupts, Alexander Graf, 2009/03/06
- [Qemu-devel] [PATCH 07/11] PPC64: Implement mtfsf.L encoding, Alexander Graf, 2009/03/06
- [Qemu-devel] [PATCH 08/11] PPC64: Fix RFI(d), Alexander Graf, 2009/03/06
- [Qemu-devel] [PATCH 09/11] PPC64: Fix NX bit, Alexander Graf, 2009/03/06
- [Qemu-devel] [PATCH 10/11] PPC64: Keep SLB in-CPU, Alexander Graf, 2009/03/06
- [Qemu-devel] [PATCH 11/11] PPC64: Disable BAT for 970, Alexander Graf, 2009/03/06
- Re: [Qemu-devel] [PATCH 10/11] PPC64: Keep SLB in-CPU, Hollis Blanchard, 2009/03/06
- Re: [Qemu-devel] [PATCH 09/11] PPC64: Fix NX bit,
Hollis Blanchard <=
- Re: [Qemu-devel] [PATCH 09/11] PPC64: Fix NX bit, Alexander Graf, 2009/03/06
[Qemu-devel] Re: [PATCH 01/11] PPC64: Implement slbmte, Blue Swirl, 2009/03/07
[Qemu-devel] Re: [PATCH 00/11] PPC64 Linux bringup patches v3, Blue Swirl, 2009/03/07