[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v1 01/21] accel/tcg: Change interrupt/exception handling to r
From: |
Robert Foley |
Subject: |
Re: [PATCH v1 01/21] accel/tcg: Change interrupt/exception handling to remove implied BQL |
Date: |
Mon, 10 Aug 2020 08:54:30 -0400 |
On Sat, 8 Aug 2020 at 08:00, Paolo Bonzini <pbonzini@redhat.com> wrote:
> > We are thinking that 2) would be a good option.
>
> Yes, it is. The only slight complication is that you'd have both
> ->do_interrupt and ->do_interrupt_locked so you probably should add some
> consistency check, for example
>
> /*
> * cc->do_interrupt_locked should only be needed if
> * the class uses cpu_common_do_interrupt.
> */
> assert(cc->do_interrupt == cpu_common_do_interrupt ||
> !cc->do_interrupt_locked);
>
> Therefore, a variant is to add ->do_interrupt_locked to ARMCPUClass and
> CRISCPUClass (target/avr/helper.c can just call
> avr_cpu_do_interrupt_locked, because that's the only value that
> cc->do_interrupt can have). Then ARM and CRIS can have a do_interrupt
> like you wrote above:
>
> void arm_do_interrupt(CPUState *cs)
> {
> ARMCPUClass *acc = ARM_CPU_GET_CLASS(cs);
> qemu_mutex_lock_iothread();
> acc->do_interrupt_locked(cpu);
> qemu_mutex_unlock_iothread();
> }
>
> with a small duplication between ARM and CRIS but on the other hand a
> simpler definition of the common CPUClass.
Thanks for all the details! It sounds like a good approach and we will
move forward with it.
Thanks & Regards,
-Rob
>
> Paolo
>
- [PATCH v1 00/21] accel/tcg: remove implied BQL from cpu_handle_interrupt/exception path, Robert Foley, 2020/08/05
- [PATCH v1 01/21] accel/tcg: Change interrupt/exception handling to remove implied BQL, Robert Foley, 2020/08/05
- 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 <=
[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