[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 3/6] linux-user: Add code for PR_GET/SET_UNALIGN
From: |
Richard Henderson |
Subject: |
Re: [PATCH 3/6] linux-user: Add code for PR_GET/SET_UNALIGN |
Date: |
Tue, 9 Jan 2024 08:13:10 +1100 |
User-agent: |
Mozilla Thunderbird |
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.
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~