1 #ifndef QEMU_ARM_CPU_QOM_H 2 #define QEMU_ARM_CPU_QOM_H 3 4 #include "qemu/osdep.h" 5 #include "qom/cpu.h" 6 7 typedef struct ARMCPU { 8 CPUState parent_obj; 9 10 CPUARMState env; 11 } ARMCPU; 12 arm_env_get_cpu(CPUARMState * env)13static inline ARMCPU *arm_env_get_cpu(CPUARMState *env) 14 { 15 return container_of(env, ARMCPU, env); 16 } 17 18 #define ENV_GET_CPU(e) CPU(arm_env_get_cpu(e)) 19 #define ENV_OFFSET offsetof(ARMCPU, env) 20 21 #endif // QEMU_ARM_CPU_QOM_H 22