[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 3/7] target/cris: add CRISCPUClass->do_interrupt_locked
From: |
Richard Henderson |
Subject: |
Re: [PATCH v2 3/7] target/cris: add CRISCPUClass->do_interrupt_locked |
Date: |
Mon, 31 Aug 2020 14:19:52 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 |
On 8/19/20 11:28 AM, Robert Foley wrote:
> Adding ->do_interrupt_locked to CRISCPUClass is preparation for
> pushing the BQL down into the per-arch implementation of ->do_interrupt.
>
> This is needed since Cris's *_cpu_exec_interrupt calls to *_do_interrupt.
> With the push down of the BQL into *_cpu_exec_interrupt and
> *_do_interrupt, *_cpu_exec_interrupt will call to ->do_interrupt
> with lock held. Since ->do_interrupt also has the lock, we need a way
> to allow cpu_exec_interrupt to call do_interrupt with lock held.
> This patch solves the issue of *_cpu_exec_interrupt needing
> to call do_interrupt with lock held.
>
> This patch is part of a series of transitions to move the
> BQL down into the do_interrupt per arch functions. This set of
> transitions is needed to maintain bisectability.
>
> This approach was suggested by Paolo Bonzini.
> For reference, here are two key posts in the discussion, explaining
> the reasoning/benefits of this approach.
> https://lists.gnu.org/archive/html/qemu-devel/2020-08/msg00784.html
> https://lists.gnu.org/archive/html/qemu-devel/2020-08/msg01517.html
> https://lists.gnu.org/archive/html/qemu-devel/2020-07/msg08731.html
> https://lists.gnu.org/archive/html/qemu-devel/2020-08/msg00044.html
>
> Signed-off-by: Robert Foley <robert.foley@linaro.org>
> ---
> target/cris/cpu-qom.h | 3 +++
> target/cris/cpu.c | 6 ++++++
> target/cris/helper.c | 6 +++---
> 3 files changed, 12 insertions(+), 3 deletions(-)
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~
- [PATCH v2 0/7] accel/tcg: remove implied BQL from cpu_handle_interrupt/exception path, Robert Foley, 2020/08/19
- [PATCH v2 2/7] target/arm: add ARMCPUClass->do_interrupt_locked, Robert Foley, 2020/08/19
- [PATCH v2 3/7] target/cris: add CRISCPUClass->do_interrupt_locked, Robert Foley, 2020/08/19
- Re: [PATCH v2 3/7] target/cris: add CRISCPUClass->do_interrupt_locked,
Richard Henderson <=
- [PATCH v2 1/7] target: rename all *_do_interupt functions to _do_interrupt_locked, Robert Foley, 2020/08/19
- [PATCH v2 5/7] accel/tcg: Change BQL critical section in cpu_handle_interrupt, Robert Foley, 2020/08/19
- [PATCH v2 4/7] target: Push BQL on ->do_interrupt down into per-arch implementation, Robert Foley, 2020/08/19
- [PATCH v2 6/7] target: rename all *_cpu_exec_interrupt functions to *_cpu_exec_interrupt_locked, Robert Foley, 2020/08/19
- [PATCH v2 7/7] target: Push BQL on ->cpu_exec_interrupt down into per-arch implementation, Robert Foley, 2020/08/19