qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] target/ppc: fix dcbz, dcbzep, dcbtst and insn t


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH] target/ppc: fix dcbz, dcbzep, dcbtst and insn type
Date: Thu, 20 Sep 2018 20:32:15 -0700

On 20 September 2018 at 02:34, Roman Kapl <address@hidden> wrote:
> dcbz was broken with the refactoring introduced in the External PID patch. The
> GETPC() call is moved directly to the helper in this patch, to report correct 
> PC
> address. The issue did not always manifest: if the compiler decided to inline
> the call, the PC wound up being correct. So in order to reproduce, use a debug
> build.
>
> A problem in dcbzep, which did not perform external PID access in its slow 
> path
> was also fixed.
>
> dcbtst opcode is now fixed, it was swapped with dcbtstep.
>
> I also misunderstood the instruction registration mechanism and the 
> instructions
> were not truly limited to BookE 2.06. The PPC_CACHE/PPC_INTEGER type mask was
> changed to PPC_NONE.
>
> Fixes: ea8073c10d ("target/ppc: add external PID support")
> Signed-off-by: Roman Kapl <address@hidden>
> ---
>
> This fixes the sandalfoot image boot. And thanks to PMM for spotting the GETPC
> issue.
>
>  target/ppc/mem_helper.c | 15 ++++++++++-----
>  target/ppc/translate.c  | 20 +++++++++-----------
>  2 files changed, 19 insertions(+), 16 deletions(-)
>
> diff --git a/target/ppc/mem_helper.c b/target/ppc/mem_helper.c
> index 0c39141ab7..9d140dc4a3 100644
> --- a/target/ppc/mem_helper.c
> +++ b/target/ppc/mem_helper.c
> @@ -141,12 +141,13 @@ void helper_stsw(CPUPPCState *env, target_ulong addr, 
> uint32_t nb,
>      }
>  }
>
> -static void helper_dcbz_common(CPUPPCState *env, target_ulong addr,
> -                               uint32_t opcode, int mmu_idx)
> +static void dcbz_common(CPUPPCState *env, target_ulong addr,
> +                        uint32_t opcode, bool epid, uintptr_t pc)

"retaddr" is the more usual name for this parameter rather than "pc".

thanks
-- PMM



reply via email to

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