| 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/core/qdev.h" |
| 11 | #include "hw/core/qdev-properties.h" |
| 12 | #include "hw/core/cpu.h" |
| 13 | #include "migration/vmstate.h" |
| 14 | #include "cpu-internal.h" |
| 15 | |
| 16 | static const Property cpu_user_props[] = { |
| 17 | /* |
| 18 | * Create a property for the user-only object, so users can |
| 19 | * adjust prctl(PR_SET_UNALIGN) from the command-line. |
| 20 | * Has no effect if the target does not support the feature. |
| 21 | */ |
| 22 | DEFINE_PROP_BOOL("prctl-unalign-sigbus", CPUState, |
| 23 | prctl_unalign_sigbus, false), |
| 24 | }; |
| 25 | |
| 26 | void cpu_class_init_props(DeviceClass *dc) |
| 27 | { |
| 28 | device_class_set_props(dc, cpu_user_props); |
| 29 | } |
| 30 | |
| 31 | void cpu_exec_class_post_init(CPUClass *cc) |
| 32 | { |
| 33 | /* nothing to do */ |
| 34 | } |
| 35 | |
| 36 | void cpu_exec_init(CPUState *cpu) |
| 37 | { |
| 38 | /* nothing to do */ |
| 39 | } |
| 40 | |
| 41 | void cpu_exec_realize(CPUState *cpu, Error **errp) |
| 42 | { |
| 43 | /* nothing to do */ |
| 44 | } |
| 45 | |
| 46 | void cpu_vmstate_register(CPUState *cpu) |
| 47 | { |
| 48 | assert(qdev_get_vmsd(DEVICE(cpu)) == NULL || |
| 49 | qdev_get_vmsd(DEVICE(cpu))->unmigratable); |
| 50 | } |
| 51 | |
| 52 | void cpu_vmstate_unregister(CPUState *cpu) |
| 53 | { |
| 54 | /* nothing to do */ |
| 55 | } |