xref: /qemu/hw/core/cpu-user.c (revision b103cc6e74ac92f070a0e004bd84334e845c20b5)
1 /*
2  * QEMU CPU model (user specific)
3  *
4  * Copyright (c) Linaro, Ltd.
5  *
6  * SPDX-License-Identifier: GPL-2.0-or-later
7  */
8 
9 #include "qemu/osdep.h"
10 #include "hw/qdev-core.h"
11 #include "hw/qdev-properties.h"
12 #include "hw/core/cpu.h"
13 #include "migration/vmstate.h"
14 
15 static const Property cpu_user_props[] = {
16     /*
17      * Create a property for the user-only object, so users can
18      * adjust prctl(PR_SET_UNALIGN) from the command-line.
19      * Has no effect if the target does not support the feature.
20      */
21     DEFINE_PROP_BOOL("prctl-unalign-sigbus", CPUState,
22                      prctl_unalign_sigbus, false),
23 };
24 
25 void cpu_class_init_props(DeviceClass *dc)
26 {
27     device_class_set_props(dc, cpu_user_props);
28 }
29 
30 void cpu_exec_class_post_init(CPUClass *cc)
31 {
32     /* nothing to do */
33 }
34 
35 void cpu_exec_initfn(CPUState *cpu)
36 {
37     /* nothing to do */
38 }
39 
40 void cpu_vmstate_register(CPUState *cpu)
41 {
42     assert(qdev_get_vmsd(DEVICE(cpu)) == NULL ||
43            qdev_get_vmsd(DEVICE(cpu))->unmigratable);
44 }
45 
46 void cpu_vmstate_unregister(CPUState *cpu)
47 {
48     /* nothing to do */
49 }
50