qemu-e2k/hw/intc
Peter Maydell 6c94851881 target/arm: Split "get pending exception info" from "acknowledge it"
Currently armv7m_nvic_acknowledge_irq() does three things:
 * make the current highest priority pending interrupt active
 * return a bool indicating whether that interrupt is targeting
   Secure or NonSecure state
 * implicitly tell the caller which is the highest priority
   pending interrupt by setting env->v7m.exception

We need to split these jobs, because v7m_exception_taken()
needs to know whether the pending interrupt targets Secure so
it can choose to stack callee-saves registers or not, but it
must not make the interrupt active until after it has done
that stacking, in case the stacking causes a derived exception.
Similarly, it needs to know the number of the pending interrupt
so it can read the correct vector table entry before the
interrupt is made active, because vector table reads might
also cause a derived exception.

Create a new armv7m_nvic_get_pending_irq_info() function which simply
returns information about the highest priority pending interrupt, and
use it to rearrange the v7m_exception_taken() code so we don't
acknowledge the exception until we've done all the things which could
possibly cause a derived exception.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 1517324542-6607-3-git-send-email-peter.maydell@linaro.org
2018-02-09 10:40:27 +00:00
..
allwinner-a10-pic.c
apic_common.c
apic.c apic: add function to apic that will be used by hvf 2017-12-22 15:01:19 +01:00
arm_gic_common.c
arm_gic_kvm.c qdev: use device_class_set_parent_realize/unrealize/reset() 2018-02-05 13:54:38 +01:00
arm_gic.c qdev: use device_class_set_parent_realize/unrealize/reset() 2018-02-05 13:54:38 +01:00
arm_gicv2m.c
arm_gicv3_common.c
arm_gicv3_cpuif.c
arm_gicv3_dist.c hw/intc/arm_gicv3: Make reserved register addresses RAZ/WI 2018-01-11 13:25:40 +00:00
arm_gicv3_its_common.c hw/intc/arm_gicv3: Make reserved register addresses RAZ/WI 2018-01-11 13:25:40 +00:00
arm_gicv3_its_kvm.c qdev: use device_class_set_parent_realize/unrealize/reset() 2018-02-05 13:54:38 +01:00
arm_gicv3_kvm.c qdev: use device_class_set_parent_realize/unrealize/reset() 2018-02-05 13:54:38 +01:00
arm_gicv3_redist.c hw/intc/arm_gicv3: Make reserved register addresses RAZ/WI 2018-01-11 13:25:40 +00:00
arm_gicv3.c qdev: use device_class_set_parent_realize/unrealize/reset() 2018-02-05 13:54:38 +01:00
armv7m_nvic.c target/arm: Split "get pending exception info" from "acknowledge it" 2018-02-09 10:40:27 +00:00
aspeed_vic.c
bcm2835_ic.c
bcm2836_control.c
etraxfs_pic.c
exynos4210_combiner.c
exynos4210_gic.c
gic_internal.h
gicv3_internal.h
grlib_irqmp.c sparc/leon3 irqmp: fix IRQ software ack 2018-01-24 19:19:50 +00:00
heathrow_pic.c
i8259_common.c i8259: move TYPE_INTERRUPT_STATS_PROVIDER upper 2017-12-21 09:30:32 +01:00
i8259.c qdev: use device_class_set_parent_realize/unrealize/reset() 2018-02-05 13:54:38 +01:00
imx_avic.c
intc.c
ioapic_common.c
ioapic.c ioapic/tracing: Remove last DPRINTFs 2017-11-14 14:31:33 +01:00
lm32_pic.c misc: drop old i386 dependency 2017-12-18 17:07:03 +03:00
Makefile.objs xlnx-zynqmp-ipi: Initial version of the Xilinx IPI device 2018-01-26 11:09:09 +01:00
mips_gic.c
nios2_iic.c
omap_intc.c Replace all occurances of __FUNCTION__ with __func__ 2018-01-22 09:46:18 +01:00
ompic.c openrisc/ompic: Add OpenRISC Multicore PIC (OMPIC) 2017-10-21 06:35:47 +09:00
openpic_kvm.c
openpic.c openpic: debug w/ info_report() 2017-12-15 09:49:24 +11:00
pl190.c
puv3_intc.c
realview_gic.c
s390_flic_kvm.c
s390_flic.c
sh_intc.c
slavio_intctl.c sun4m: remove include/hw/sparc/sun4m.h and all references to it 2018-01-09 21:48:20 +00:00
trace-events target/arm: Split "get pending exception info" from "acknowledge it" 2018-02-09 10:40:27 +00:00
vgic_common.h
xics_kvm.c xics/kvm: synchonize state before 'info pic' 2017-11-14 11:12:42 +11:00
xics_pnv.c
xics_spapr.c spapr: move the IRQ allocation routines under the machine 2017-12-15 09:49:24 +11:00
xics.c spapr: introduce a spapr_qirq() helper 2017-12-15 09:49:24 +11:00
xilinx_intc.c
xlnx-pmu-iomod-intc.c xlnx-pmu-iomod-intc: Add the PMU Interrupt controller 2018-01-26 11:09:09 +01:00
xlnx-zynqmp-ipi.c xlnx-zynqmp-ipi: Initial version of the Xilinx IPI device 2018-01-26 11:09:09 +01:00