[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/7] target/sparc: Factor out the body of sparc_
From: |
Richard Henderson |
Subject: |
Re: [Qemu-devel] [PATCH 1/7] target/sparc: Factor out the body of sparc_cpu_unassigned_access() |
Date: |
Thu, 1 Aug 2019 13:16:52 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 |
On 8/1/19 11:30 AM, Peter Maydell wrote:
> Currently the SPARC target uses the old-style do_unassigned_access
> hook. We want to switch it over to do_transaction_failed, but to do
> this we must first remove all the direct calls in ldst_helper.c to
> cpu_unassigned_access(). Factor out the body of the hook function's
> code into a new sparc_raise_mmu_fault() and call it from the hook and
> from the various places that used to call cpu_unassigned_access().
>
> In passing, this fixes a bug where the code that raised the
> MMU exception was directly calling GETPC() from a function that
> was several levels deep in the callstack from the original
> helper function: the new sparc_raise_mmu_fault() instead takes
> the return address as an argument.
>
> Other than the use of retaddr rather than GETPC() and a comment
> format fixup, the body of the new function has no changes from
> that of the old hook function.
>
> Signed-off-by: Peter Maydell <address@hidden>
> ---
> target/sparc/ldst_helper.c | 201 +++++++++++++++++++------------------
> 1 file changed, 106 insertions(+), 95 deletions(-)
Reviewed-by: Richard Henderson <address@hidden>
r~
- Re: [Qemu-devel] [PATCH 5/7] target/sparc: Handle bus errors in mmu_probe(), (continued)
- [Qemu-devel] [PATCH 3/7] target/sparc: Check for transaction failures in MXCC stream ASI accesses, Peter Maydell, 2019/08/01
- [Qemu-devel] [PATCH 2/7] target/sparc: Check for transaction failures in MMU passthrough ASIs, Peter Maydell, 2019/08/01
- [Qemu-devel] [PATCH 4/7] target/sparc: Correctly handle bus errors in page table walks, Peter Maydell, 2019/08/01
- [Qemu-devel] [PATCH 7/7] target/sparc: Switch to do_transaction_failed() hook, Peter Maydell, 2019/08/01
- [Qemu-devel] [PATCH 1/7] target/sparc: Factor out the body of sparc_cpu_unassigned_access(), Peter Maydell, 2019/08/01
- Re: [Qemu-devel] [PATCH 1/7] target/sparc: Factor out the body of sparc_cpu_unassigned_access(),
Richard Henderson <=