blob: a1678bcf296e25e72098f3206d0a81565ca5f0af [file] [log] [blame]
David 'Digit' Turner66576782014-03-24 16:57:57 +01001#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
7typedef struct X86CPU {
8 CPUState parent_obj;
9
10 CPUX86State env;
11} X86CPU;
12
13static 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