qemu-devel
[Top][All Lists]
Advanced

[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 19:33:51 +1100
User-agent: Mozilla Thunderbird

On 1/9/24 10:21, Philippe Mathieu-Daudé wrote:
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?

Yes.

"kernel property" as "accel property" works for me.

Does it really matter though, especially now that the cpu property has been present for two years now.


r~




reply via email to

[Prev in Thread] Current Thread [Next in Thread]