[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v1 02/21] target/alpha: add BQL to do_interrupt and cpu_exec_
From: |
Robert Foley |
Subject: |
Re: [PATCH v1 02/21] target/alpha: add BQL to do_interrupt and cpu_exec_interrupt |
Date: |
Wed, 5 Aug 2020 15:57:13 -0400 |
On Wed, 5 Aug 2020 at 15:18, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> On 8/5/20 11:12 AM, Robert Foley wrote:
> > @@ -299,8 +299,12 @@ void alpha_cpu_do_interrupt(CPUState *cs)
> > {
> > AlphaCPU *cpu = ALPHA_CPU(cs);
> > CPUAlphaState *env = &cpu->env;
> > - int i = cs->exception_index;
> > -
> > + int i;
> > + bool bql = !qemu_mutex_iothread_locked();
> > + if (bql) {
> > + qemu_mutex_lock_iothread();
> > + }
>
> Why does this patch for alpha need to check qemu_mutex_iothread_locked and the
> next patch for arm does not?
>
In alpha (and arm) the do_interrupt function can be called separately or by
cpu_exec_interrupt. In the case where do_interrupt gets called separately
it needs to take the BQL (bql == true).
In the case where cpu_exec_interrupt is holding the BQL, and calls do_interrupt,
do_interrupt needs to check qemu_mutex_iothread_locked, and in this case not get
the lock (bql == false).
The next patch for arm, checks qemu_mutex_iothread_locked in its do_interrupt
function, but not in its cpu_exec_interrupt function, the same pattern
as for alpha.
Thanks & Regards,
-Rob
>
> r~
- Re: [PATCH v1 01/21] accel/tcg: Change interrupt/exception handling to remove implied BQL, (continued)
- Re: [PATCH v1 01/21] accel/tcg: Change interrupt/exception handling to remove implied BQL, Richard Henderson, 2020/08/05
- Re: [PATCH v1 01/21] accel/tcg: Change interrupt/exception handling to remove implied BQL, Paolo Bonzini, 2020/08/06
- Re: [PATCH v1 01/21] accel/tcg: Change interrupt/exception handling to remove implied BQL, Robert Foley, 2020/08/06
- Re: [PATCH v1 01/21] accel/tcg: Change interrupt/exception handling to remove implied BQL, Paolo Bonzini, 2020/08/06
- Re: [PATCH v1 01/21] accel/tcg: Change interrupt/exception handling to remove implied BQL, Robert Foley, 2020/08/06
- Re: [PATCH v1 01/21] accel/tcg: Change interrupt/exception handling to remove implied BQL, Robert Foley, 2020/08/07
- Re: [PATCH v1 01/21] accel/tcg: Change interrupt/exception handling to remove implied BQL, Paolo Bonzini, 2020/08/08
- Re: [PATCH v1 01/21] accel/tcg: Change interrupt/exception handling to remove implied BQL, Robert Foley, 2020/08/10
[PATCH v1 02/21] target/alpha: add BQL to do_interrupt and cpu_exec_interrupt, Robert Foley, 2020/08/05
[PATCH v1 03/21] target/arm: add BQL to do_interrupt and cpu_exec_interrupt, Robert Foley, 2020/08/05
[PATCH v1 04/21] target/avr: add BQL to do_interrupt and cpu_exec_interrupt, Robert Foley, 2020/08/05
[PATCH v1 05/21] target/cris: add BQL to do_interrupt and cpu_exec_interrupt, Robert Foley, 2020/08/05
[PATCH v1 06/21] target/hppa: add BQL to do_interrupt and cpu_exec_interrupt, Robert Foley, 2020/08/05
[PATCH v1 07/21] target/i386: add BQL to do_interrupt and cpu_exec_interrupt, Robert Foley, 2020/08/05
[PATCH v1 08/21] target/lm32: add BQL to do_interrupt and cpu_exec_interrupt, Robert Foley, 2020/08/05
[PATCH v1 09/21] target/m68k: add BQL to do_interrupt and cpu_exec_interrupt, Robert Foley, 2020/08/05
[PATCH v1 10/21] target/microblaze: add BQL to do_interrupt and cpu_exec_interrupt, Robert Foley, 2020/08/05