cpu-user.c 1.0 KB

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