A transition from CPUPPCState to PowerPCCPU can be considered safe, just like PowerPCCPU::env access in the opposite direction.
This should slightly improve interrupt performance. Reported-by: Anthony Liguori <aligu...@us.ibm.com> Signed-off-by: Andreas Färber <afaer...@suse.de> --- target-ppc/cpu-qom.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-ppc/cpu-qom.h b/target-ppc/cpu-qom.h index eb03a00..f62181f 100644 --- a/target-ppc/cpu-qom.h +++ b/target-ppc/cpu-qom.h @@ -91,7 +91,7 @@ typedef struct PowerPCCPU { static inline PowerPCCPU *ppc_env_get_cpu(CPUPPCState *env) { - return POWERPC_CPU(container_of(env, PowerPCCPU, env)); + return container_of(env, PowerPCCPU, env); } #define ENV_GET_CPU(e) CPU(ppc_env_get_cpu(e)) -- 1.8.1.4