[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [qemu-s390x] [PATCH v1 for-2.12 01/15] s390x/tcg: introduce and use
From: |
Cornelia Huck |
Subject: |
Re: [qemu-s390x] [PATCH v1 for-2.12 01/15] s390x/tcg: introduce and use program_interrupt_ra() |
Date: |
Wed, 29 Nov 2017 15:55:58 +0100 |
On Tue, 28 Nov 2017 21:33:11 +0100
David Hildenbrand <address@hidden> wrote:
> Allows to easily convert more callers of program_interrupt() and to
> easily introduce new exceptions without forgetting about the cpu state
> reset.
>
> Use program_interrupt_ra() in places where we already had the same
> pattern.
>
> Signed-off-by: David Hildenbrand <address@hidden>
> ---
> target/s390x/cpu.h | 2 ++
> target/s390x/crypto_helper.c | 7 ++-----
> target/s390x/excp_helper.c | 5 +----
> target/s390x/interrupt.c | 13 +++++++++++++
> target/s390x/mem_helper.c | 35 +++++++++++------------------------
> target/s390x/misc_helper.c | 3 +--
> 6 files changed, 30 insertions(+), 35 deletions(-)
> diff --git a/target/s390x/interrupt.c b/target/s390x/interrupt.c
> index ce6177c141..6ce06bb549 100644
> --- a/target/s390x/interrupt.c
> +++ b/target/s390x/interrupt.c
> @@ -53,6 +53,19 @@ void program_interrupt(CPUS390XState *env, uint32_t code,
> int ilen)
> }
> }
>
> +void program_interrupt_ra(CPUS390XState *env, uint32_t code, int ilen,
> + uintptr_t ra)
> +{
> + S390CPU *cpu = s390_env_get_cpu(env);
Move this under the if?
> +
> +#ifdef CONFIG_TCG
> + if (tcg_enabled() && ra) {
> + cpu_restore_state(CPU(cpu), ra);
> + }
> +#endif
> + program_interrupt(env, code, ilen);
> +}
> +
> #if !defined(CONFIG_USER_ONLY)
> static void cpu_inject_service(S390CPU *cpu, uint32_t param)
> {
- [qemu-s390x] [PATCH v1 for-2.12 00/15] s390x/tcg: cleanup and fix program interrupts, David Hildenbrand, 2017/11/28
- [qemu-s390x] [PATCH v1 for-2.12 01/15] s390x/tcg: introduce and use program_interrupt_ra(), David Hildenbrand, 2017/11/28
- [qemu-s390x] [PATCH v1 for-2.12 02/15] s390x/tcg: get rid of runtime_exception(), David Hildenbrand, 2017/11/28
- [qemu-s390x] [PATCH v1 for-2.12 03/15] s390x/tcg: rip out dead tpi code, David Hildenbrand, 2017/11/28
- [qemu-s390x] [PATCH v1 for-2.12 06/15] s390x/diag: pass the retaddr into handle_diag_308(), David Hildenbrand, 2017/11/28
- [qemu-s390x] [PATCH v1 for-2.12 07/15] s390x: handle exceptions during s390_cpu_virt_mem_rw() correctly (TCG), David Hildenbrand, 2017/11/28