qemu-ppc
[Top][All Lists]
Advanced

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

Re: [Qemu-ppc] [PATCH] target-ppc: fix Book-E TLB matching


From: David Gibson
Subject: Re: [Qemu-ppc] [PATCH] target-ppc: fix Book-E TLB matching
Date: Wed, 15 Feb 2017 10:58:11 +1100
User-agent: Mutt/1.7.1 (2016-10-04)

On Tue, Feb 14, 2017 at 12:54:29PM +0100, Alex Zuepke wrote:
> 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 <address@hidden>

This appears to be correct, and I've applied it to ppc-for-2.9.
However, in future, please explain what the current code does which is
wrong when sending a fix like this.

> ---
>  target/ppc/mmu_helper.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/target/ppc/mmu_helper.c b/target/ppc/mmu_helper.c
> index f746f53..0242fad 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;
>          }
>      }

-- 
David Gibson                    | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au  | minimalist, thank you.  NOT _the_ _other_
                                | _way_ _around_!
http://www.ozlabs.org/~dgibson

Attachment: signature.asc
Description: PGP signature


reply via email to

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