[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH 10/16] PPC: Fix large page support in TCG
From: |
Alexander Graf |
Subject: |
[Qemu-ppc] [PATCH 10/16] PPC: Fix large page support in TCG |
Date: |
Thu, 15 Mar 2012 13:14:16 +0100 |
From: Nathan Whitehorn <address@hidden>
Fix large page support in TCG. The old code would overwrite the large page
table entry with the fake 4 KB one generated here whenever the ref/change bits
were updated, causing it to point to the wrong area of memory.
Signed-off-by: Nathan Whitehorn <address@hidden>
Acked-by: David Gibson <address@hidden>
[agraf: fix whitespace, braces]
Signed-off-by: Alexander Graf <address@hidden>
---
target-ppc/helper.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/target-ppc/helper.c b/target-ppc/helper.c
index bd711b6..39dcc27 100644
--- a/target-ppc/helper.c
+++ b/target-ppc/helper.c
@@ -591,12 +591,6 @@ static inline int _find_pte(CPUPPCState *env, mmu_ctx_t
*ctx, int is_64b, int h,
pte1 = ldq_phys(env->htab_base + pteg_off + (i * 16) + 8);
}
- /* We have a TLB that saves 4K pages, so let's
- * split a huge page to 4k chunks */
- if (target_page_bits != TARGET_PAGE_BITS)
- pte1 |= (ctx->eaddr & (( 1 << target_page_bits ) - 1))
- & TARGET_PAGE_MASK;
-
r = pte64_check(ctx, pte0, pte1, h, rw, type);
LOG_MMU("Load pte from " TARGET_FMT_lx " => " TARGET_FMT_lx " "
TARGET_FMT_lx " %d %d %d " TARGET_FMT_lx "\n",
@@ -672,6 +666,12 @@ static inline int _find_pte(CPUPPCState *env, mmu_ctx_t
*ctx, int is_64b, int h,
}
}
+ /* We have a TLB that saves 4K pages, so let's
+ * split a huge page to 4k chunks */
+ if (target_page_bits != TARGET_PAGE_BITS) {
+ ctx->raddr |= (ctx->eaddr & ((1 << target_page_bits) - 1))
+ & TARGET_PAGE_MASK;
+ }
return ret;
}
--
1.6.0.2
- [Qemu-ppc] [PATCH 08/16] pseries: Remove PCI device from PCI host bridge code, (continued)
- [Qemu-ppc] [PATCH 08/16] pseries: Remove PCI device from PCI host bridge code, Alexander Graf, 2012/03/15
- [Qemu-ppc] [PATCH 16/16] PPC: Fix openpic with relative memregions, Alexander Graf, 2012/03/15
- [Qemu-ppc] [PATCH 09/16] PPC: Add PIR register to POWER7 CPU, Alexander Graf, 2012/03/15
- [Qemu-ppc] [PATCH 12/16] ppc: Correctly define POWERPC_INSNS2_DEFAULT, Alexander Graf, 2012/03/15
- [Qemu-ppc] [PATCH 11/16] pseries: Add support for level interrupts to XICS, Alexander Graf, 2012/03/15
- [Qemu-ppc] [PATCH 04/16] pseries: Don't try to munmap() a malloc()ed TCE table, Alexander Graf, 2012/03/15
- [Qemu-ppc] [PATCH 05/16] PPC64: Add support for ldbrx and stdbrx instructions, Alexander Graf, 2012/03/15
- [Qemu-ppc] [PATCH 06/16] pseries: Update SLOF firmware image, Alexander Graf, 2012/03/15
- [Qemu-ppc] [PATCH 07/16] pseries: Remove unused constant from PCI code, Alexander Graf, 2012/03/15
- [Qemu-ppc] [PATCH 14/16] PPC: KVM: Synchronize regs on CPU dump, Alexander Graf, 2012/03/15
- [Qemu-ppc] [PATCH 10/16] PPC: Fix large page support in TCG,
Alexander Graf <=
- Re: [Qemu-ppc] [PULL 00/16] ppc patch queue 2012-03-15, Blue Swirl, 2012/03/17