diff mbox series

[v3,51/66] hw/core/cpu: Add prctl-unalign-sigbus property for user-only

Message ID 20210818191920.390759-52-richard.henderson@linaro.org
State New
Headers show
Series Unaligned access for user-only | expand

Commit Message

Richard Henderson Aug. 18, 2021, 7:19 p.m. UTC
Actually disabled for now.  Will enable for each cpu that
supports the feature.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

---
 hw/core/cpu-user.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

-- 
2.25.1
diff mbox series

Patch

diff --git a/hw/core/cpu-user.c b/hw/core/cpu-user.c
index 62037e8669..23786865cb 100644
--- a/hw/core/cpu-user.c
+++ b/hw/core/cpu-user.c
@@ -11,12 +11,27 @@ 
 
 #include "qemu/osdep.h"
 #include "hw/core/cpu.h"
+#include "hw/qdev-properties.h"
 #include "cpu-common.h"
 
 /*
  * This can't go in hw/core/cpu-common.c because that file is compiled only
  * once for both user-mode and system builds.
  */
+static Property cpu_useronly_props[] = {
+    /*
+     * Create a memory property for softmmu CPU object, so users can wire
+     * up its memory. The default if no link is set up is to use the
+     * system address space.
+     */
+#if 0
+    DEFINE_PROP_BOOL("prctl-unalign-sigbus", CPUState,
+                     prctl_unalign_sigbus, false),
+#endif
+    DEFINE_PROP_END_OF_LIST(),
+};
+
 void cpu_class_init_props(DeviceClass *dc)
 {
+    device_class_set_props(dc, cpu_useronly_props);
 }