On 8/1/24 22:13, Richard Henderson wrote:
On 1/9/24 04:15, Philippe Mathieu-Daudé wrote:
+/*
+ * This can't go in hw/core/cpu.c because that file is compiled only
+ * once for both user-mode and system builds.
+ */
static Property cpu_common_props[] = {
-#ifndef CONFIG_USER_ONLY
+#ifdef CONFIG_USER_ONLY
/*
- * Create a memory property for softmmu CPU object,
- * so users can wire up its memory. (This can't go in hw/core/cpu.c
- * because that file is compiled only once for both user-mode
- * and system builds.) The default if no link is set up is to use
+ * Create a property for the user-only object, so users can
+ * adjust prctl(PR_SET_UNALIGN) from the command-line.
How can I test this per-thread property?
-cpu foo,prctl-unalign-sigbus=true
Shouldn't this be an accel (TCG/user) property, for all threads?
There is always one cpu at user-only startup, and it is copied on clone.
Logically it would be a kernel property, since it's something the kernel
does, not the cpu. But cpu vs accel makes no difference to me; it was
just easy here.
Can a process started with prctl(PR_SET_UNALIGN) unset it before
forking?
"kernel property" as "accel property" works for me.
IIRC, this is simply a proxy for not really being able to inherit this
bit across fork+exec like you can with the real kernel.
r~