From 0a4c774086d2246ca14abc5471bf2173d63a3d65 Mon Sep 17 00:00:00 2001 From: Alex Zuepke Date: Tue, 14 Feb 2017 12:54:29 +0100 Subject: target-ppc: fix Book-E TLB matching The Book-E TLB matching process should bail out early when a TLB entry matches, but the access permissions are wrong. The CPU will then raise a DSI error instead of a Data TLB error, as described for TLB matching in Freescale and IBM documents. Signed-off-by: Alex Zuepke Signed-off-by: David Gibson --- target/ppc/mmu_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'target/ppc') diff --git a/target/ppc/mmu_helper.c b/target/ppc/mmu_helper.c index 172a305e0f..eb2d482ef7 100644 --- a/target/ppc/mmu_helper.c +++ b/target/ppc/mmu_helper.c @@ -825,7 +825,7 @@ static int mmubooke_get_physical_address(CPUPPCState *env, mmu_ctx_t *ctx, tlb = &env->tlb.tlbe[i]; ret = mmubooke_check_tlb(env, tlb, &raddr, &ctx->prot, address, rw, access_type, i); - if (!ret) { + if (ret != -1) { break; } } -- cgit v1.2.1