[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 37/45] mmu-hash32: Remove nx from context structure
From: |
David Gibson |
Subject: |
[Qemu-devel] [PATCH 37/45] mmu-hash32: Remove nx from context structure |
Date: |
Wed, 6 Mar 2013 14:44:25 +1100 |
Previous cleanups have meant the nx field of the mmu_ctx_hash32 structure
is now only used within ppc_hash32_translate(), and so it can be replaced
by a local variable.
Signed-off-by: David Gibson <address@hidden>
---
target-ppc/mmu-hash32.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/target-ppc/mmu-hash32.c b/target-ppc/mmu-hash32.c
index ae606fd..2b88b9f 100644
--- a/target-ppc/mmu-hash32.c
+++ b/target-ppc/mmu-hash32.c
@@ -45,7 +45,6 @@ struct mmu_ctx_hash32 {
hwaddr raddr; /* Real address */
int prot; /* Protection bits */
int key; /* Access key */
- int nx; /* Non-execute area */
};
static int ppc_hash32_pp_check(int key, int pp, int nx)
@@ -383,6 +382,7 @@ static int ppc_hash32_translate(CPUPPCState *env, struct
mmu_ctx_hash32 *ctx,
{
int ret;
target_ulong sr;
+ bool nx;
hwaddr pte_offset;
ppc_hash_pte32_t pte;
@@ -414,8 +414,8 @@ static int ppc_hash32_translate(CPUPPCState *env, struct
mmu_ctx_hash32 *ctx,
}
/* 5. Check for segment level no-execute violation */
- ctx->nx = !!(sr & SR32_NX);
- if ((rwx == 2) && ctx->nx) {
+ nx = !!(sr & SR32_NX);
+ if ((rwx == 2) && nx) {
return -3;
}
@@ -434,7 +434,7 @@ static int ppc_hash32_translate(CPUPPCState *env, struct
mmu_ctx_hash32 *ctx,
pp = pte.pte1 & HPTE32_R_PP;
/* Compute access rights */
- access = ppc_hash32_pp_check(ctx->key, pp, ctx->nx);
+ access = ppc_hash32_pp_check(ctx->key, pp, nx);
/* Keep the matching PTE informations */
ctx->raddr = pte.pte1;
ctx->prot = access;
--
1.7.10.4
- [Qemu-devel] [PATCH 24/45] mmu-hash*: Cleanup segment-level NX check, (continued)
- [Qemu-devel] [PATCH 24/45] mmu-hash*: Cleanup segment-level NX check, David Gibson, 2013/03/05
- [Qemu-devel] [PATCH 29/45] mmu-hash64: Clean up ppc_hash64_htab_lookup(), David Gibson, 2013/03/05
- [Qemu-devel] [PATCH 25/45] mmu-hash*: Don't keep looking for PTEs after we find a match, David Gibson, 2013/03/05
- [Qemu-devel] [PATCH 27/45] mmu-hash*: Make find_pte{32, 64} do more of the job of finding ptes, David Gibson, 2013/03/05
- [Qemu-devel] [PATCH 28/45] mmu-hash*: Remove permission checking from find_pte{32, 64}(), David Gibson, 2013/03/05
- [Qemu-devel] [PATCH 32/45] mmu-hash32: Split BAT size logic from permissions logic, David Gibson, 2013/03/05
- [Qemu-devel] [PATCH 26/45] mmu-hash*: Separate PTEG searching from permissions checking, David Gibson, 2013/03/05
- [Qemu-devel] [PATCH 30/45] mmu-hash*: Fold pte_check*() logic into caller, David Gibson, 2013/03/05
- [Qemu-devel] [PATCH 35/45] mmu-hash32: Don't look up page tables on BAT permission error, David Gibson, 2013/03/05
- [Qemu-devel] [PATCH 31/45] mmu-hash32: Remove odd pointer usage from BAT code, David Gibson, 2013/03/05
- [Qemu-devel] [PATCH 37/45] mmu-hash32: Remove nx from context structure,
David Gibson <=
- [Qemu-devel] [PATCH 33/45] mmu-hash32: Clean up BAT matching logic, David Gibson, 2013/03/05
- [Qemu-devel] [PATCH 36/45] mmu-hash*: Don't update PTE flags when permission is denied, David Gibson, 2013/03/05
- [Qemu-devel] [PATCH 34/45] mmu-hash32: Cleanup BAT lookup, David Gibson, 2013/03/05
- [Qemu-devel] [PATCH 39/45] mmu-hash64: Factor SLB N bit into permissions bits, David Gibson, 2013/03/05
- [Qemu-devel] [PATCH 42/45] mmu-hash*: Correctly mask RPN from hash PTE, David Gibson, 2013/03/05
- [Qemu-devel] [PATCH 41/45] mmu-hash*: Clean up real address calculation, David Gibson, 2013/03/05
- [Qemu-devel] [PATCH 40/45] mmu-hash*: Clean up PTE flags update, David Gibson, 2013/03/05
- [Qemu-devel] [PATCH 38/45] mmu-hash*: Clean up permission checking, David Gibson, 2013/03/05
- [Qemu-devel] [PATCH 43/45] mmu-hash*: Don't use full ppc_hash{32, 64}_translate() path for get_phys_page_debug(), David Gibson, 2013/03/05
- [Qemu-devel] [PATCH 44/45] mmu-hash*: Merge translate and fault handling functions, David Gibson, 2013/03/05