acpi: add acpi_irq_no_flags() term
[qemu/cris-port.git] / include / qom / cpu.h
blob48fd6fb1d2131d5e8ed8c9fac14b4d3206d969e9
1 /*
2 * QEMU CPU model
4 * Copyright (c) 2012 SUSE LINUX Products GmbH
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, see
18 * <http://www.gnu.org/licenses/gpl-2.0.html>
20 #ifndef QEMU_CPU_H
21 #define QEMU_CPU_H
23 #include <signal.h>
24 #include <setjmp.h>
25 #include "hw/qdev-core.h"
26 #include "exec/hwaddr.h"
27 #include "qemu/queue.h"
28 #include "qemu/thread.h"
29 #include "qemu/tls.h"
30 #include "qemu/typedefs.h"
32 typedef int (*WriteCoreDumpFunction)(const void *buf, size_t size,
33 void *opaque);
35 /**
36 * vaddr:
37 * Type wide enough to contain any #target_ulong virtual address.
39 typedef uint64_t vaddr;
40 #define VADDR_PRId PRId64
41 #define VADDR_PRIu PRIu64
42 #define VADDR_PRIo PRIo64
43 #define VADDR_PRIx PRIx64
44 #define VADDR_PRIX PRIX64
45 #define VADDR_MAX UINT64_MAX
47 /**
48 * SECTION:cpu
49 * @section_id: QEMU-cpu
50 * @title: CPU Class
51 * @short_description: Base class for all CPUs
54 #define TYPE_CPU "cpu"
56 /* Since this macro is used a lot in hot code paths and in conjunction with
57 * FooCPU *foo_env_get_cpu(), we deviate from usual QOM practice by using
58 * an unchecked cast.
60 #define CPU(obj) ((CPUState *)(obj))
62 #define CPU_CLASS(class) OBJECT_CLASS_CHECK(CPUClass, (class), TYPE_CPU)
63 #define CPU_GET_CLASS(obj) OBJECT_GET_CLASS(CPUClass, (obj), TYPE_CPU)
65 typedef struct CPUState CPUState;
67 typedef void (*CPUUnassignedAccess)(CPUState *cpu, hwaddr addr,
68 bool is_write, bool is_exec, int opaque,
69 unsigned size);
71 struct TranslationBlock;
73 /**
74 * CPUClass:
75 * @class_by_name: Callback to map -cpu command line model name to an
76 * instantiatable CPU type.
77 * @parse_features: Callback to parse command line arguments.
78 * @reset: Callback to reset the #CPUState to its initial state.
79 * @reset_dump_flags: #CPUDumpFlags to use for reset logging.
80 * @has_work: Callback for checking if there is work to do.
81 * @do_interrupt: Callback for interrupt handling.
82 * @do_unassigned_access: Callback for unassigned access handling.
83 * @do_unaligned_access: Callback for unaligned access handling, if
84 * the target defines #ALIGNED_ONLY.
85 * @memory_rw_debug: Callback for GDB memory access.
86 * @dump_state: Callback for dumping state.
87 * @dump_statistics: Callback for dumping statistics.
88 * @get_arch_id: Callback for getting architecture-dependent CPU ID.
89 * @get_paging_enabled: Callback for inquiring whether paging is enabled.
90 * @get_memory_mapping: Callback for obtaining the memory mappings.
91 * @set_pc: Callback for setting the Program Counter register.
92 * @synchronize_from_tb: Callback for synchronizing state from a TCG
93 * #TranslationBlock.
94 * @handle_mmu_fault: Callback for handling an MMU fault.
95 * @get_phys_page_debug: Callback for obtaining a physical address.
96 * @gdb_read_register: Callback for letting GDB read a register.
97 * @gdb_write_register: Callback for letting GDB write a register.
98 * @debug_excp_handler: Callback for handling debug exceptions.
99 * @vmsd: State description for migration.
100 * @gdb_num_core_regs: Number of core registers accessible to GDB.
101 * @gdb_core_xml_file: File name for core registers GDB XML description.
102 * @gdb_stop_before_watchpoint: Indicates whether GDB expects the CPU to stop
103 * before the insn which triggers a watchpoint rather than after it.
104 * @cpu_exec_enter: Callback for cpu_exec preparation.
105 * @cpu_exec_exit: Callback for cpu_exec cleanup.
106 * @cpu_exec_interrupt: Callback for processing interrupts in cpu_exec.
108 * Represents a CPU family or model.
110 typedef struct CPUClass {
111 /*< private >*/
112 DeviceClass parent_class;
113 /*< public >*/
115 ObjectClass *(*class_by_name)(const char *cpu_model);
116 void (*parse_features)(CPUState *cpu, char *str, Error **errp);
118 void (*reset)(CPUState *cpu);
119 int reset_dump_flags;
120 bool (*has_work)(CPUState *cpu);
121 void (*do_interrupt)(CPUState *cpu);
122 CPUUnassignedAccess do_unassigned_access;
123 void (*do_unaligned_access)(CPUState *cpu, vaddr addr,
124 int is_write, int is_user, uintptr_t retaddr);
125 bool (*virtio_is_big_endian)(CPUState *cpu);
126 int (*memory_rw_debug)(CPUState *cpu, vaddr addr,
127 uint8_t *buf, int len, bool is_write);
128 void (*dump_state)(CPUState *cpu, FILE *f, fprintf_function cpu_fprintf,
129 int flags);
130 void (*dump_statistics)(CPUState *cpu, FILE *f,
131 fprintf_function cpu_fprintf, int flags);
132 int64_t (*get_arch_id)(CPUState *cpu);
133 bool (*get_paging_enabled)(const CPUState *cpu);
134 void (*get_memory_mapping)(CPUState *cpu, MemoryMappingList *list,
135 Error **errp);
136 void (*set_pc)(CPUState *cpu, vaddr value);
137 void (*synchronize_from_tb)(CPUState *cpu, struct TranslationBlock *tb);
138 int (*handle_mmu_fault)(CPUState *cpu, vaddr address, int rw,
139 int mmu_index);
140 hwaddr (*get_phys_page_debug)(CPUState *cpu, vaddr addr);
141 int (*gdb_read_register)(CPUState *cpu, uint8_t *buf, int reg);
142 int (*gdb_write_register)(CPUState *cpu, uint8_t *buf, int reg);
143 void (*debug_excp_handler)(CPUState *cpu);
145 int (*write_elf64_note)(WriteCoreDumpFunction f, CPUState *cpu,
146 int cpuid, void *opaque);
147 int (*write_elf64_qemunote)(WriteCoreDumpFunction f, CPUState *cpu,
148 void *opaque);
149 int (*write_elf32_note)(WriteCoreDumpFunction f, CPUState *cpu,
150 int cpuid, void *opaque);
151 int (*write_elf32_qemunote)(WriteCoreDumpFunction f, CPUState *cpu,
152 void *opaque);
154 const struct VMStateDescription *vmsd;
155 int gdb_num_core_regs;
156 const char *gdb_core_xml_file;
157 bool gdb_stop_before_watchpoint;
159 void (*cpu_exec_enter)(CPUState *cpu);
160 void (*cpu_exec_exit)(CPUState *cpu);
161 bool (*cpu_exec_interrupt)(CPUState *cpu, int interrupt_request);
162 } CPUClass;
164 #ifdef HOST_WORDS_BIGENDIAN
165 typedef struct icount_decr_u16 {
166 uint16_t high;
167 uint16_t low;
168 } icount_decr_u16;
169 #else
170 typedef struct icount_decr_u16 {
171 uint16_t low;
172 uint16_t high;
173 } icount_decr_u16;
174 #endif
176 typedef struct CPUBreakpoint {
177 vaddr pc;
178 int flags; /* BP_* */
179 QTAILQ_ENTRY(CPUBreakpoint) entry;
180 } CPUBreakpoint;
182 typedef struct CPUWatchpoint {
183 vaddr vaddr;
184 vaddr len;
185 vaddr hitaddr;
186 int flags; /* BP_* */
187 QTAILQ_ENTRY(CPUWatchpoint) entry;
188 } CPUWatchpoint;
190 struct KVMState;
191 struct kvm_run;
193 #define TB_JMP_CACHE_BITS 12
194 #define TB_JMP_CACHE_SIZE (1 << TB_JMP_CACHE_BITS)
197 * CPUState:
198 * @cpu_index: CPU index (informative).
199 * @nr_cores: Number of cores within this CPU package.
200 * @nr_threads: Number of threads within this CPU.
201 * @numa_node: NUMA node this CPU is belonging to.
202 * @host_tid: Host thread ID.
203 * @running: #true if CPU is currently running (usermode).
204 * @created: Indicates whether the CPU thread has been successfully created.
205 * @interrupt_request: Indicates a pending interrupt request.
206 * @halted: Nonzero if the CPU is in suspended state.
207 * @stop: Indicates a pending stop request.
208 * @stopped: Indicates the CPU has been artificially stopped.
209 * @tcg_exit_req: Set to force TCG to stop executing linked TBs for this
210 * CPU and return to its top level loop.
211 * @singlestep_enabled: Flags for single-stepping.
212 * @icount_extra: Instructions until next timer event.
213 * @icount_decr: Number of cycles left, with interrupt flag in high bit.
214 * This allows a single read-compare-cbranch-write sequence to test
215 * for both decrementer underflow and exceptions.
216 * @can_do_io: Nonzero if memory-mapped IO is safe.
217 * @env_ptr: Pointer to subclass-specific CPUArchState field.
218 * @current_tb: Currently executing TB.
219 * @gdb_regs: Additional GDB registers.
220 * @gdb_num_regs: Number of total registers accessible to GDB.
221 * @gdb_num_g_regs: Number of registers in GDB 'g' packets.
222 * @next_cpu: Next CPU sharing TB cache.
223 * @opaque: User data.
224 * @mem_io_pc: Host Program Counter at which the memory was accessed.
225 * @mem_io_vaddr: Target virtual address at which the memory was accessed.
226 * @kvm_fd: vCPU file descriptor for KVM.
228 * State of one CPU core or thread.
230 struct CPUState {
231 /*< private >*/
232 DeviceState parent_obj;
233 /*< public >*/
235 int nr_cores;
236 int nr_threads;
237 int numa_node;
239 struct QemuThread *thread;
240 #ifdef _WIN32
241 HANDLE hThread;
242 #endif
243 int thread_id;
244 uint32_t host_tid;
245 bool running;
246 struct QemuCond *halt_cond;
247 struct qemu_work_item *queued_work_first, *queued_work_last;
248 bool thread_kicked;
249 bool created;
250 bool stop;
251 bool stopped;
252 volatile sig_atomic_t exit_request;
253 uint32_t interrupt_request;
254 int singlestep_enabled;
255 int64_t icount_extra;
256 sigjmp_buf jmp_env;
258 AddressSpace *as;
259 struct AddressSpaceDispatch *memory_dispatch;
260 MemoryListener *tcg_as_listener;
262 void *env_ptr; /* CPUArchState */
263 struct TranslationBlock *current_tb;
264 struct TranslationBlock *tb_jmp_cache[TB_JMP_CACHE_SIZE];
265 struct GDBRegisterState *gdb_regs;
266 int gdb_num_regs;
267 int gdb_num_g_regs;
268 QTAILQ_ENTRY(CPUState) node;
270 /* ice debug support */
271 QTAILQ_HEAD(breakpoints_head, CPUBreakpoint) breakpoints;
273 QTAILQ_HEAD(watchpoints_head, CPUWatchpoint) watchpoints;
274 CPUWatchpoint *watchpoint_hit;
276 void *opaque;
278 /* In order to avoid passing too many arguments to the MMIO helpers,
279 * we store some rarely used information in the CPU context.
281 uintptr_t mem_io_pc;
282 vaddr mem_io_vaddr;
284 int kvm_fd;
285 bool kvm_vcpu_dirty;
286 struct KVMState *kvm_state;
287 struct kvm_run *kvm_run;
289 /* TODO Move common fields from CPUArchState here. */
290 int cpu_index; /* used by alpha TCG */
291 uint32_t halted; /* used by alpha, cris, ppc TCG */
292 union {
293 uint32_t u32;
294 icount_decr_u16 u16;
295 } icount_decr;
296 uint32_t can_do_io;
297 int32_t exception_index; /* used by m68k TCG */
299 /* Note that this is accessed at the start of every TB via a negative
300 offset from AREG0. Leave this field at the end so as to make the
301 (absolute value) offset as small as possible. This reduces code
302 size, especially for hosts without large memory offsets. */
303 volatile sig_atomic_t tcg_exit_req;
306 QTAILQ_HEAD(CPUTailQ, CPUState);
307 extern struct CPUTailQ cpus;
308 #define CPU_NEXT(cpu) QTAILQ_NEXT(cpu, node)
309 #define CPU_FOREACH(cpu) QTAILQ_FOREACH(cpu, &cpus, node)
310 #define CPU_FOREACH_SAFE(cpu, next_cpu) \
311 QTAILQ_FOREACH_SAFE(cpu, &cpus, node, next_cpu)
312 #define first_cpu QTAILQ_FIRST(&cpus)
314 DECLARE_TLS(CPUState *, current_cpu);
315 #define current_cpu tls_var(current_cpu)
318 * cpu_paging_enabled:
319 * @cpu: The CPU whose state is to be inspected.
321 * Returns: %true if paging is enabled, %false otherwise.
323 bool cpu_paging_enabled(const CPUState *cpu);
326 * cpu_get_memory_mapping:
327 * @cpu: The CPU whose memory mappings are to be obtained.
328 * @list: Where to write the memory mappings to.
329 * @errp: Pointer for reporting an #Error.
331 void cpu_get_memory_mapping(CPUState *cpu, MemoryMappingList *list,
332 Error **errp);
335 * cpu_write_elf64_note:
336 * @f: pointer to a function that writes memory to a file
337 * @cpu: The CPU whose memory is to be dumped
338 * @cpuid: ID number of the CPU
339 * @opaque: pointer to the CPUState struct
341 int cpu_write_elf64_note(WriteCoreDumpFunction f, CPUState *cpu,
342 int cpuid, void *opaque);
345 * cpu_write_elf64_qemunote:
346 * @f: pointer to a function that writes memory to a file
347 * @cpu: The CPU whose memory is to be dumped
348 * @cpuid: ID number of the CPU
349 * @opaque: pointer to the CPUState struct
351 int cpu_write_elf64_qemunote(WriteCoreDumpFunction f, CPUState *cpu,
352 void *opaque);
355 * cpu_write_elf32_note:
356 * @f: pointer to a function that writes memory to a file
357 * @cpu: The CPU whose memory is to be dumped
358 * @cpuid: ID number of the CPU
359 * @opaque: pointer to the CPUState struct
361 int cpu_write_elf32_note(WriteCoreDumpFunction f, CPUState *cpu,
362 int cpuid, void *opaque);
365 * cpu_write_elf32_qemunote:
366 * @f: pointer to a function that writes memory to a file
367 * @cpu: The CPU whose memory is to be dumped
368 * @cpuid: ID number of the CPU
369 * @opaque: pointer to the CPUState struct
371 int cpu_write_elf32_qemunote(WriteCoreDumpFunction f, CPUState *cpu,
372 void *opaque);
375 * CPUDumpFlags:
376 * @CPU_DUMP_CODE:
377 * @CPU_DUMP_FPU: dump FPU register state, not just integer
378 * @CPU_DUMP_CCOP: dump info about TCG QEMU's condition code optimization state
380 enum CPUDumpFlags {
381 CPU_DUMP_CODE = 0x00010000,
382 CPU_DUMP_FPU = 0x00020000,
383 CPU_DUMP_CCOP = 0x00040000,
387 * cpu_dump_state:
388 * @cpu: The CPU whose state is to be dumped.
389 * @f: File to dump to.
390 * @cpu_fprintf: Function to dump with.
391 * @flags: Flags what to dump.
393 * Dumps CPU state.
395 void cpu_dump_state(CPUState *cpu, FILE *f, fprintf_function cpu_fprintf,
396 int flags);
399 * cpu_dump_statistics:
400 * @cpu: The CPU whose state is to be dumped.
401 * @f: File to dump to.
402 * @cpu_fprintf: Function to dump with.
403 * @flags: Flags what to dump.
405 * Dumps CPU statistics.
407 void cpu_dump_statistics(CPUState *cpu, FILE *f, fprintf_function cpu_fprintf,
408 int flags);
410 #ifndef CONFIG_USER_ONLY
412 * cpu_get_phys_page_debug:
413 * @cpu: The CPU to obtain the physical page address for.
414 * @addr: The virtual address.
416 * Obtains the physical page corresponding to a virtual one.
417 * Use it only for debugging because no protection checks are done.
419 * Returns: Corresponding physical page address or -1 if no page found.
421 static inline hwaddr cpu_get_phys_page_debug(CPUState *cpu, vaddr addr)
423 CPUClass *cc = CPU_GET_CLASS(cpu);
425 return cc->get_phys_page_debug(cpu, addr);
427 #endif
430 * cpu_reset:
431 * @cpu: The CPU whose state is to be reset.
433 void cpu_reset(CPUState *cpu);
436 * cpu_class_by_name:
437 * @typename: The CPU base type.
438 * @cpu_model: The model string without any parameters.
440 * Looks up a CPU #ObjectClass matching name @cpu_model.
442 * Returns: A #CPUClass or %NULL if not matching class is found.
444 ObjectClass *cpu_class_by_name(const char *typename, const char *cpu_model);
447 * cpu_generic_init:
448 * @typename: The CPU base type.
449 * @cpu_model: The model string including optional parameters.
451 * Instantiates a CPU, processes optional parameters and realizes the CPU.
453 * Returns: A #CPUState or %NULL if an error occurred.
455 CPUState *cpu_generic_init(const char *typename, const char *cpu_model);
458 * cpu_has_work:
459 * @cpu: The vCPU to check.
461 * Checks whether the CPU has work to do.
463 * Returns: %true if the CPU has work, %false otherwise.
465 static inline bool cpu_has_work(CPUState *cpu)
467 CPUClass *cc = CPU_GET_CLASS(cpu);
469 g_assert(cc->has_work);
470 return cc->has_work(cpu);
474 * qemu_cpu_is_self:
475 * @cpu: The vCPU to check against.
477 * Checks whether the caller is executing on the vCPU thread.
479 * Returns: %true if called from @cpu's thread, %false otherwise.
481 bool qemu_cpu_is_self(CPUState *cpu);
484 * qemu_cpu_kick:
485 * @cpu: The vCPU to kick.
487 * Kicks @cpu's thread.
489 void qemu_cpu_kick(CPUState *cpu);
492 * cpu_is_stopped:
493 * @cpu: The CPU to check.
495 * Checks whether the CPU is stopped.
497 * Returns: %true if run state is not running or if artificially stopped;
498 * %false otherwise.
500 bool cpu_is_stopped(CPUState *cpu);
503 * run_on_cpu:
504 * @cpu: The vCPU to run on.
505 * @func: The function to be executed.
506 * @data: Data to pass to the function.
508 * Schedules the function @func for execution on the vCPU @cpu.
510 void run_on_cpu(CPUState *cpu, void (*func)(void *data), void *data);
513 * async_run_on_cpu:
514 * @cpu: The vCPU to run on.
515 * @func: The function to be executed.
516 * @data: Data to pass to the function.
518 * Schedules the function @func for execution on the vCPU @cpu asynchronously.
520 void async_run_on_cpu(CPUState *cpu, void (*func)(void *data), void *data);
523 * qemu_get_cpu:
524 * @index: The CPUState@cpu_index value of the CPU to obtain.
526 * Gets a CPU matching @index.
528 * Returns: The CPU or %NULL if there is no matching CPU.
530 CPUState *qemu_get_cpu(int index);
533 * cpu_exists:
534 * @id: Guest-exposed CPU ID to lookup.
536 * Search for CPU with specified ID.
538 * Returns: %true - CPU is found, %false - CPU isn't found.
540 bool cpu_exists(int64_t id);
542 #ifndef CONFIG_USER_ONLY
544 typedef void (*CPUInterruptHandler)(CPUState *, int);
546 extern CPUInterruptHandler cpu_interrupt_handler;
549 * cpu_interrupt:
550 * @cpu: The CPU to set an interrupt on.
551 * @mask: The interupts to set.
553 * Invokes the interrupt handler.
555 static inline void cpu_interrupt(CPUState *cpu, int mask)
557 cpu_interrupt_handler(cpu, mask);
560 #else /* USER_ONLY */
562 void cpu_interrupt(CPUState *cpu, int mask);
564 #endif /* USER_ONLY */
566 #ifdef CONFIG_SOFTMMU
567 static inline void cpu_unassigned_access(CPUState *cpu, hwaddr addr,
568 bool is_write, bool is_exec,
569 int opaque, unsigned size)
571 CPUClass *cc = CPU_GET_CLASS(cpu);
573 if (cc->do_unassigned_access) {
574 cc->do_unassigned_access(cpu, addr, is_write, is_exec, opaque, size);
578 static inline void cpu_unaligned_access(CPUState *cpu, vaddr addr,
579 int is_write, int is_user,
580 uintptr_t retaddr)
582 CPUClass *cc = CPU_GET_CLASS(cpu);
584 return cc->do_unaligned_access(cpu, addr, is_write, is_user, retaddr);
586 #endif
589 * cpu_reset_interrupt:
590 * @cpu: The CPU to clear the interrupt on.
591 * @mask: The interrupt mask to clear.
593 * Resets interrupts on the vCPU @cpu.
595 void cpu_reset_interrupt(CPUState *cpu, int mask);
598 * cpu_exit:
599 * @cpu: The CPU to exit.
601 * Requests the CPU @cpu to exit execution.
603 void cpu_exit(CPUState *cpu);
606 * cpu_resume:
607 * @cpu: The CPU to resume.
609 * Resumes CPU, i.e. puts CPU into runnable state.
611 void cpu_resume(CPUState *cpu);
614 * qemu_init_vcpu:
615 * @cpu: The vCPU to initialize.
617 * Initializes a vCPU.
619 void qemu_init_vcpu(CPUState *cpu);
621 #define SSTEP_ENABLE 0x1 /* Enable simulated HW single stepping */
622 #define SSTEP_NOIRQ 0x2 /* Do not use IRQ while single stepping */
623 #define SSTEP_NOTIMER 0x4 /* Do not Timers while single stepping */
626 * cpu_single_step:
627 * @cpu: CPU to the flags for.
628 * @enabled: Flags to enable.
630 * Enables or disables single-stepping for @cpu.
632 void cpu_single_step(CPUState *cpu, int enabled);
634 /* Breakpoint/watchpoint flags */
635 #define BP_MEM_READ 0x01
636 #define BP_MEM_WRITE 0x02
637 #define BP_MEM_ACCESS (BP_MEM_READ | BP_MEM_WRITE)
638 #define BP_STOP_BEFORE_ACCESS 0x04
639 /* 0x08 currently unused */
640 #define BP_GDB 0x10
641 #define BP_CPU 0x20
642 #define BP_WATCHPOINT_HIT_READ 0x40
643 #define BP_WATCHPOINT_HIT_WRITE 0x80
644 #define BP_WATCHPOINT_HIT (BP_WATCHPOINT_HIT_READ | BP_WATCHPOINT_HIT_WRITE)
646 int cpu_breakpoint_insert(CPUState *cpu, vaddr pc, int flags,
647 CPUBreakpoint **breakpoint);
648 int cpu_breakpoint_remove(CPUState *cpu, vaddr pc, int flags);
649 void cpu_breakpoint_remove_by_ref(CPUState *cpu, CPUBreakpoint *breakpoint);
650 void cpu_breakpoint_remove_all(CPUState *cpu, int mask);
652 int cpu_watchpoint_insert(CPUState *cpu, vaddr addr, vaddr len,
653 int flags, CPUWatchpoint **watchpoint);
654 int cpu_watchpoint_remove(CPUState *cpu, vaddr addr,
655 vaddr len, int flags);
656 void cpu_watchpoint_remove_by_ref(CPUState *cpu, CPUWatchpoint *watchpoint);
657 void cpu_watchpoint_remove_all(CPUState *cpu, int mask);
659 void QEMU_NORETURN cpu_abort(CPUState *cpu, const char *fmt, ...)
660 GCC_FMT_ATTR(2, 3);
662 #ifdef CONFIG_SOFTMMU
663 extern const struct VMStateDescription vmstate_cpu_common;
664 #else
665 #define vmstate_cpu_common vmstate_dummy
666 #endif
668 #define VMSTATE_CPU() { \
669 .name = "parent_obj", \
670 .size = sizeof(CPUState), \
671 .vmsd = &vmstate_cpu_common, \
672 .flags = VMS_STRUCT, \
673 .offset = 0, \
676 #endif