From d3a3e529626fbee5cf0fb33414a85c9493adc280 Mon Sep 17 00:00:00 2001 From: Vijaya Kumar K Date: Thu, 23 Feb 2017 17:21:12 +0530 Subject: target-arm: Add GICv3CPUState in CPUARMState struct Add gicv3state void pointer to CPUARMState struct to store GICv3CPUState. In case of usecase like CPU reset, we need to reset GICv3CPUState of the CPU. In such scenario, this pointer becomes handy. Signed-off-by: Vijaya Kumar K Reviewed-by: Peter Maydell Reviewed-by: Eric Auger Message-id: 1487850673-26455-5-git-send-email-vijay.kilari@gmail.com Signed-off-by: Peter Maydell --- hw/intc/arm_gicv3_cpuif.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'hw/intc/arm_gicv3_cpuif.c') diff --git a/hw/intc/arm_gicv3_cpuif.c b/hw/intc/arm_gicv3_cpuif.c index f775aba507..0b208560bd 100644 --- a/hw/intc/arm_gicv3_cpuif.c +++ b/hw/intc/arm_gicv3_cpuif.c @@ -19,6 +19,14 @@ #include "gicv3_internal.h" #include "cpu.h" +void gicv3_set_gicv3state(CPUState *cpu, GICv3CPUState *s) +{ + ARMCPU *arm_cpu = ARM_CPU(cpu); + CPUARMState *env = &arm_cpu->env; + + env->gicv3state = (void *)s; +}; + static GICv3CPUState *icc_cs_from_env(CPUARMState *env) { /* Given the CPU, find the right GICv3CPUState struct. -- cgit 1.4.1