Home | History | Annotate | Download | only in target-i386
      1 #ifndef QEMU_X86_CPU_QOM_H
      2 #define QEMU_X86_CPU_QOM_H
      3 
      4 #include "qemu/osdep.h"
      5 #include "qom/cpu.h"
      6 
      7 typedef struct X86CPU {
      8     CPUState parent_obj;
      9 
     10     CPUX86State env;
     11 } X86CPU;
     12 
     13 static inline X86CPU *x86_env_get_cpu(CPUX86State *env)
     14 {
     15     return container_of(env, X86CPU, env);
     16 }
     17 
     18 #define ENV_GET_CPU(e)  CPU(x86_env_get_cpu(e))
     19 #define ENV_OFFSET offsetof(X86CPU, env)
     20 
     21 #endif  // QEMU_X86_CPU_QOM_H
     22