30da4760 | 01-May-2025 |
Richard Henderson <richard.henderson@linaro.org> |
include/user: Convert GUEST_ADDR_MAX to a variable
Remove GUEST_ADDR_MAX and add guest_addr_max. Initialize it in *-user/main.c, after reserved_va.
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@l
include/user: Convert GUEST_ADDR_MAX to a variable
Remove GUEST_ADDR_MAX and add guest_addr_max. Initialize it in *-user/main.c, after reserved_va.
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
1405d7e6 | 16-Jan-2025 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
user: Extract common MMAP API to 'user/mmap.h'
Keep common MMAP-related declarations in a single place.
Note, this disable ThreadSafetyAnalysis on Linux for: - mmap_fork_start() - mmap_fork_end().
user: Extract common MMAP API to 'user/mmap.h'
Keep common MMAP-related declarations in a single place.
Note, this disable ThreadSafetyAnalysis on Linux for: - mmap_fork_start() - mmap_fork_end().
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Warner Losh <imp@bsdimp.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20250308122842.76377-4-philmd@linaro.org>
show more ...
|
84d66261 | 07-Mar-2025 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
bsd-user: Propagate alignment argument to mmap_find_vma()
Propagate the alignment to mmap_find_vma(), effectively embedding mmap_find_vma_aligned() within mmap_find_vma().
Add a comment in do_bsd_s
bsd-user: Propagate alignment argument to mmap_find_vma()
Propagate the alignment to mmap_find_vma(), effectively embedding mmap_find_vma_aligned() within mmap_find_vma().
Add a comment in do_bsd_shmat() to clarify alignment above page size is not required.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Warner Losh <imp@bsdimp.com> Message-Id: <20250308122842.76377-3-philmd@linaro.org>
show more ...
|
d156d5d1 | 07-Feb-2025 |
Ilya Leoshkevich <iii@linux.ibm.com> |
gdbstub: Allow late attachment
Allow debugging individual processes in multi-process applications by starting them with export QEMU_GDB=/tmp/qemu-%d.sock,suspend=n. Currently one would have to attac
gdbstub: Allow late attachment
Allow debugging individual processes in multi-process applications by starting them with export QEMU_GDB=/tmp/qemu-%d.sock,suspend=n. Currently one would have to attach to every process to ensure the app makes progress.
In case suspend=n is not specified, the flow remains unchanged. If it is specified, then accepting the client connection is delegated to a thread. In the future this machinery may be reused for handling reconnections and interruptions.
On accepting a connection, the thread schedules gdb_handlesig() on the first CPU and wakes it up with host_interrupt_signal. Note that the result of this gdb_handlesig() invocation is handled, as opposed to many other existing call sites. These other call sites probably need to be fixed separately.
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com> Message-Id: <20250117001542.8290-7-iii@linux.ibm.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20250207153112.3939799-16-alex.bennee@linaro.org>
show more ...
|
2b3ccf5f | 07-Feb-2025 |
Ilya Leoshkevich <iii@linux.ibm.com> |
user: Introduce host_interrupt_signal
Attaching to the gdbstub of a running process requires stopping its threads. For threads that run on a CPU, cpu_exit() is enough, but the only way to grab atten
user: Introduce host_interrupt_signal
Attaching to the gdbstub of a running process requires stopping its threads. For threads that run on a CPU, cpu_exit() is enough, but the only way to grab attention of a thread that is stuck in a long-running syscall is to interrupt it with a signal.
Reserve a host realtime signal for this, just like it's already done for TARGET_SIGABRT on Linux. This may reduce the number of available guest realtime signals by one, but this is acceptable, since there are quite a lot of them, and it's unlikely that there are apps that need them all.
Set signal_pending for the safe_sycall machinery to prevent invoking the syscall. This is a lie, since we don't queue a guest signal, but process_pending_signals() can handle the absence of pending signals. The syscall returns with QEMU_ERESTARTSYS errno, which arranges for the automatic restart. This is important, because it helps avoiding disturbing poorly written guests.
Reviewed-by: Warner Losh <imp@bsdimp.com> Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com> Message-Id: <20250117001542.8290-5-iii@linux.ibm.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20250207153112.3939799-14-alex.bennee@linaro.org>
show more ...
|
62ef949b | 12-Dec-2024 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
accel/tcg: Move user-related declarations out of 'exec/cpu-all.h' (2/4)
Move declarations related to page protection under user emulation from "exec/cpu-all.h" to "user/page-protection.h".
Signed-o
accel/tcg: Move user-related declarations out of 'exec/cpu-all.h' (2/4)
Move declarations related to page protection under user emulation from "exec/cpu-all.h" to "user/page-protection.h".
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20241212185341.2857-13-philmd@linaro.org>
show more ...
|