qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] 4550c6: bsd-user: Complete FreeBSD siginfo


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] 4550c6: bsd-user: Complete FreeBSD siginfo
Date: Mon, 31 Jan 2022 12:21:26 -0800

  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: 4550c661bfa3fd4aba2d5dec7b732546124d8958
      
https://github.com/qemu/qemu/commit/4550c661bfa3fd4aba2d5dec7b732546124d8958
  Author: Warner Losh <imp@bsdimp.com>
  Date:   2022-01-28 (Fri, 28 Jan 2022)

  Changed paths:
    M bsd-user/freebsd/target_os_siginfo.h

  Log Message:
  -----------
  bsd-user: Complete FreeBSD siginfo

Fill in the missing FreeBSD siginfo fields, and add some comments.

Signed-off-by: Warner Losh <imp@bsdimp.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: 2373a62ae9600aef57923fdba0518e916cc8d28c
      
https://github.com/qemu/qemu/commit/2373a62ae9600aef57923fdba0518e916cc8d28c
  Author: Warner Losh <imp@bsdimp.com>
  Date:   2022-01-28 (Fri, 28 Jan 2022)

  Changed paths:
    M bsd-user/freebsd/target_os_signal.h
    M bsd-user/i386/signal.c
    M bsd-user/x86_64/signal.c

  Log Message:
  -----------
  bsd-user: Create setup_sigframe_arch to setup sigframe context

Define setup_sigframe_arch whose job it is to setup the mcontext for the
sigframe. Implement for x86 to just call mcontext.

Signed-off-by: Warner Losh <imp@bsdimp.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: 224474622e61f24c4b991fca03e32113eaac91cb
      
https://github.com/qemu/qemu/commit/224474622e61f24c4b991fca03e32113eaac91cb
  Author: Warner Losh <imp@bsdimp.com>
  Date:   2022-01-28 (Fri, 28 Jan 2022)

  Changed paths:
    M bsd-user/arm/signal.c

  Log Message:
  -----------
  bsd-user/arm/signal.c: Implement setup_sigframe_arch for arm

Fix the broken context setting for arm. FreeBSD's get_mcontext does not
fill in the vfp info. It's filled in in sigframe(). This corresponds to
the new setup_sigframe_arch which fills in mcontext, then adjusts it to
point to the vfp context in the sigframe and fills in that context as
well. Add pointer to where this code is done.

Signed-off-by: Warner Losh <imp@bsdimp.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: 7f96d0a93c9f252fc65b0ad49121a62889ec560e
      
https://github.com/qemu/qemu/commit/7f96d0a93c9f252fc65b0ad49121a62889ec560e
  Author: Warner Losh <imp@bsdimp.com>
  Date:   2022-01-28 (Fri, 28 Jan 2022)

  Changed paths:
    M bsd-user/arm/signal.c

  Log Message:
  -----------
  bsd-user/arm/signal.c: get_mcontext should zero vfp data

FreeBSD's get_mcontext doesn't return any vfp data. Instead, it zeros
out the vfp feilds (and all the spare fields). Impelement this
behavior. We're still missing the sysarch(ARM_GET_VFPCONTEXT) syscall,
though.

Signed-off-by: Warner Losh <imp@bsdimp.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: b46d4ad7d135d43eb6141e298b3fed9236f4caeb
      
https://github.com/qemu/qemu/commit/b46d4ad7d135d43eb6141e298b3fed9236f4caeb
  Author: Warner Losh <imp@bsdimp.com>
  Date:   2022-01-28 (Fri, 28 Jan 2022)

  Changed paths:
    M bsd-user/main.c
    M bsd-user/qemu.h

  Log Message:
  -----------
  bsd-user: Remove vestiges of signal queueing code

bsd-user was copied from linux-user at a time when it queued
signals. Remove those vestiges of thse code. Retain the init function,
even though it's now empty since other stuff will likely be added
there. Make it static since it's not called from outside of main.c

Signed-off-by: Warner Losh <imp@bsdimp.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: 4804722593bd1735ce810e380247788200bcb961
      
https://github.com/qemu/qemu/commit/4804722593bd1735ce810e380247788200bcb961
  Author: Warner Losh <imp@bsdimp.com>
  Date:   2022-01-28 (Fri, 28 Jan 2022)

  Changed paths:
    M bsd-user/qemu.h

  Log Message:
  -----------
  bsd-user: Bring in docs from linux-user for signal_pending

This is currently unused, so no code adjustments are needed.

Signed-off-by: Warner Losh <imp@bsdimp.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: c0d2691ccce7828ade341a263df1d51ce1dfe9ff
      
https://github.com/qemu/qemu/commit/c0d2691ccce7828ade341a263df1d51ce1dfe9ff
  Author: Warner Losh <imp@bsdimp.com>
  Date:   2022-01-28 (Fri, 28 Jan 2022)

  Changed paths:
    M bsd-user/arm/target_arch_cpu.h

  Log Message:
  -----------
  bsd-user/arm/target_arch_cpu.h: Move EXCP_ATOMIC to match linux-user

Move the EXCP_ATOMIC case to match linux-user/arm/cpu_loop.c:cpu_loop
ordering.

Signed-off-by: Warner Losh <imp@bsdimp.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: 0ef599897345e0a43b3741a9990866c92a33d6e9
      
https://github.com/qemu/qemu/commit/0ef599897345e0a43b3741a9990866c92a33d6e9
  Author: Warner Losh <imp@bsdimp.com>
  Date:   2022-01-28 (Fri, 28 Jan 2022)

  Changed paths:
    A bsd-user/signal-common.h
    M bsd-user/signal.c

  Log Message:
  -----------
  bsd-user/signal.c: implement force_sig_fault

Start to implement the force_sig_fault code. This currently just calls
queue_signal(). The bsd-user fork version of that will handle this the
synchronous nature of this call. Add signal-common.h to hold signal
helper functions like force_sig_fault.

Signed-off-by: Stacey Son <sson@FreeBSD.org>
Signed-off-by: Kyle Evans <kevans@freebsd.org>
Signed-off-by: Warner Losh <imp@bsdimp.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: 2bd010c4bfdaecee33f3ba4a785ccaaf84df25c1
      
https://github.com/qemu/qemu/commit/2bd010c4bfdaecee33f3ba4a785ccaaf84df25c1
  Author: Warner Losh <imp@bsdimp.com>
  Date:   2022-01-28 (Fri, 28 Jan 2022)

  Changed paths:
    M bsd-user/arm/target_arch_cpu.h
    M bsd-user/i386/target_arch_cpu.h
    M bsd-user/qemu.h
    M bsd-user/signal-common.h
    M bsd-user/x86_64/target_arch_cpu.h

  Log Message:
  -----------
  bsd-user/signal-common.h: Move signal functions prototypes to here

Signed-off-by: Warner Losh <imp@bsdimp.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: fc9f9bdd3a6111d0bb419282657f89eea7d8de88
      
https://github.com/qemu/qemu/commit/fc9f9bdd3a6111d0bb419282657f89eea7d8de88
  Author: Warner Losh <imp@bsdimp.com>
  Date:   2022-01-28 (Fri, 28 Jan 2022)

  Changed paths:
    M bsd-user/signal.c

  Log Message:
  -----------
  bsd-user/signal.c: Implement cpu_loop_exit_sigsegv

First attempt at implementing cpu_loop_exit_sigsegv, mostly copied from
linux-user version of this function.

Signed-off-by: Stacey Son <sson@FreeBSD.org>
Signed-off-by: Kyle Evans <kevans@freebsd.org>
Signed-off-by: Warner Losh <imp@bsdimp.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: cfdee273c4e41d0b485bc82966a82d6ab6f37a1d
      
https://github.com/qemu/qemu/commit/cfdee273c4e41d0b485bc82966a82d6ab6f37a1d
  Author: Warner Losh <imp@bsdimp.com>
  Date:   2022-01-28 (Fri, 28 Jan 2022)

  Changed paths:
    M bsd-user/signal.c

  Log Message:
  -----------
  bsd-user/signal.c: implement cpu_loop_exit_sigbus

First attempt at implementing cpu_loop_exit_sigbus, mostly copied from
linux-user version of this function.

Signed-off-by: Stacey Son <sson@FreeBSD.org>
Signed-off-by: Kyle Evans <kevans@freebsd.org>
Signed-off-by: Warner Losh <imp@bsdimp.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: a3ed97cee57279620d934642c6da1eb0c5ae9df2
      
https://github.com/qemu/qemu/commit/a3ed97cee57279620d934642c6da1eb0c5ae9df2
  Author: Warner Losh <imp@bsdimp.com>
  Date:   2022-01-28 (Fri, 28 Jan 2022)

  Changed paths:
    M bsd-user/arm/target_arch_cpu.h

  Log Message:
  -----------
  bsd-user/arm/arget_arch_cpu.h: Move EXCP_DEBUG and EXCP_BKPT together

Implement EXCP_DEBUG and EXCP_BKPT the same, as is done in
linux-user. The prior adjustment of register 15 isn't needed, so remove
that. Remove a redunant comment (that code in FreeBSD never handled
break points). It's unclear why BKPT was an alias for system calls,
but FreeBSD doesn't do that today.

Signed-off-by: Warner Losh <imp@bsdimp.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: c0b93df35248fcb842173abf583fe59d2b2692a5
      
https://github.com/qemu/qemu/commit/c0b93df35248fcb842173abf583fe59d2b2692a5
  Author: Warner Losh <imp@bsdimp.com>
  Date:   2022-01-28 (Fri, 28 Jan 2022)

  Changed paths:
    M bsd-user/arm/target_arch_cpu.h

  Log Message:
  -----------
  bsd-user/arm/target_arch_cpu.h: Correct code pointer

The code has moved in FreeBSD since the emulator was started, update the
comment to reflect that change.

Signed-off-by: Warner Losh <imp@bsdimp.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: 5e02ded157a7db45c3f06bd8c9d60f62d5bdeb1c
      
https://github.com/qemu/qemu/commit/5e02ded157a7db45c3f06bd8c9d60f62d5bdeb1c
  Author: Warner Losh <imp@bsdimp.com>
  Date:   2022-01-28 (Fri, 28 Jan 2022)

  Changed paths:
    M bsd-user/arm/target_arch_cpu.h

  Log Message:
  -----------
  bsd-user/arm/target_arch_cpu.h: Use force_sig_fault for EXCP_UDEF

Use force_sig_fault to implement unknown opcode. This just uninlines
that function, so simplify things by using it. Fold in EXCP_NOCP and
EXCP_INVSTATE, as is done in linux-user. Make a note about slight
differences with FreeBSD in case any of them turn out to be important
later.

Signed-off-by: Warner Losh <imp@bsdimp.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: 67ccbe798fef0912da54ecfddcf6ef5f0a02020b
      
https://github.com/qemu/qemu/commit/67ccbe798fef0912da54ecfddcf6ef5f0a02020b
  Author: Warner Losh <imp@bsdimp.com>
  Date:   2022-01-28 (Fri, 28 Jan 2022)

  Changed paths:
    M bsd-user/arm/target_arch_cpu.h

  Log Message:
  -----------
  bsd-user/arm/target_arch_cpu.h: Implement data faults

Update for the richer set of data faults that are now possible. Copied
largely from linux-user/arm/cpu_loop.c, with minor typo fixes.

Signed-off-by: Warner Losh <imp@bsdimp.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: 1366ef817a151f8f89a561494ea24204ad7917c7
      
https://github.com/qemu/qemu/commit/1366ef817a151f8f89a561494ea24204ad7917c7
  Author: Warner Losh <imp@bsdimp.com>
  Date:   2022-01-28 (Fri, 28 Jan 2022)

  Changed paths:
    M bsd-user/signal-common.h
    M bsd-user/signal.c

  Log Message:
  -----------
  bsd-user/signal.c: implement abstract target / host signal translation

Implement host_to_target_signal and target_to_host_signal.

Signed-off-by: Stacey Son <sson@FreeBSD.org>
Signed-off-by: Kyle Evans <kevans@freebsd.org>
Signed-off-by: Warner Losh <imp@bsdimp.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: 149076ade7b8250fa62a6b1e7462f8d2c340b27e
      
https://github.com/qemu/qemu/commit/149076ade7b8250fa62a6b1e7462f8d2c340b27e
  Author: Warner Losh <imp@bsdimp.com>
  Date:   2022-01-28 (Fri, 28 Jan 2022)

  Changed paths:
    M bsd-user/qemu.h
    M bsd-user/signal.c

  Log Message:
  -----------
  bsd-user/signal.c: Implement signal_init()

Initialize the signal state for the emulator. Setup a set of sane
default signal handlers, mirroring the host's signals. For fatal signals
(those that exit by default), establish our own set of signal
handlers. Stub out the actual signal handler we use for the moment.

Signed-off-by: Stacey Son <sson@FreeBSD.org>
Signed-off-by: Kyle Evans <kevans@freebsd.org>
Signed-off-by: Warner Losh <imp@bsdimp.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org> XXX SIGPROF 
PENDING


  Commit: e32a63010ff221f7e161a592972076d2976c5eae
      
https://github.com/qemu/qemu/commit/e32a63010ff221f7e161a592972076d2976c5eae
  Author: Warner Losh <imp@bsdimp.com>
  Date:   2022-01-28 (Fri, 28 Jan 2022)

  Changed paths:
    M bsd-user/signal-common.h
    M bsd-user/signal.c

  Log Message:
  -----------
  bsd-user/signal.c: Add si_type argument to queue_signal

Mirror the linux-user practice and add a si_type argument to queue
signal. This will be transported as the upper 8 bits in the si_type
element of siginfo so that we know what bits of the structure are valid
and so we can properly implement host_to_target_siginfo_noswap and
tswap_siginfo. Adapt the one caller of queue_signal to the new
interface.  Use all the same names as Linux (except _RT which we don't
treat differently, unlike Linux), though some are unused. Place this
into signal-common.h since that's a better place given bsd-user's
structure. Move prototype of queue_signal to signal-common.h to mirror
linux-user's location.

Signed-off-by: Warner Losh <imp@bsdimp.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: 6e0bc06e210cbd25006c3a39e9a8325784d0be78
      
https://github.com/qemu/qemu/commit/6e0bc06e210cbd25006c3a39e9a8325784d0be78
  Author: Warner Losh <imp@bsdimp.com>
  Date:   2022-01-28 (Fri, 28 Jan 2022)

  Changed paths:
    A bsd-user/host/arm/host-signal.h

  Log Message:
  -----------
  bsd-user/host/arm/host-signal.h: Implement host_signal_*

Implement host_signal_pc, host_signal_set_pc and host_signal_write for
arm.

Signed-off-by: Kyle Evans <kevans@freebsd.org>
Signed-off-by: Warner Losh <imp@bsdimp.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: 220f8606c8d48e5d6d4145abccebb0fa8518c507
      
https://github.com/qemu/qemu/commit/220f8606c8d48e5d6d4145abccebb0fa8518c507
  Author: Warner Losh <imp@bsdimp.com>
  Date:   2022-01-28 (Fri, 28 Jan 2022)

  Changed paths:
    A bsd-user/host/i386/host-signal.h

  Log Message:
  -----------
  bsd-user/host/i386/host-signal.h: Implement host_signal_*

Implement host_signal_pc, host_signal_set_pc and host_signal_write for
i386.

Signed-off-by: Kyle Evans <kevans@freebsd.org>
Signed-off-by: Warner Losh <imp@bsdimp.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: b375158801e804cfbf2ff45edab1bd7590fdad30
      
https://github.com/qemu/qemu/commit/b375158801e804cfbf2ff45edab1bd7590fdad30
  Author: Warner Losh <imp@bsdimp.com>
  Date:   2022-01-28 (Fri, 28 Jan 2022)

  Changed paths:
    A bsd-user/host/x86_64/host-signal.h

  Log Message:
  -----------
  bsd-user/host/x86_64/host-signal.h: Implement host_signal_*

Implement host_signal_pc, host_signal_set_pc and host_signal_write for
x86_64.

Signed-off-by: Kyle Evans <kevans@freebsd.org>
Signed-off-by: Warner Losh <imp@bsdimp.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: 85fc1b5dbf893254471809eef8ec773bb29d4f48
      
https://github.com/qemu/qemu/commit/85fc1b5dbf893254471809eef8ec773bb29d4f48
  Author: Warner Losh <imp@bsdimp.com>
  Date:   2022-01-28 (Fri, 28 Jan 2022)

  Changed paths:
    M bsd-user/signal.c
    M meson.build

  Log Message:
  -----------
  bsd-user: Add host signals to the build

Start to add the host signal functionality to the build.

Signed-off-by: Warner Losh <imp@bsdimp.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: 6ddc1abe0fd1099f807b27306b518752ea3f40e0
      
https://github.com/qemu/qemu/commit/6ddc1abe0fd1099f807b27306b518752ea3f40e0
  Author: Warner Losh <imp@bsdimp.com>
  Date:   2022-01-28 (Fri, 28 Jan 2022)

  Changed paths:
    M bsd-user/signal.c
    A bsd-user/trace-events
    A bsd-user/trace.h
    M meson.build

  Log Message:
  -----------
  bsd-user: Add trace events for bsd-user

Add the bsd-user specific events and infrastructure. Only include the
linux-user trace events for linux-user, not bsd-user.

Signed-off-by: Stacey Son <sson@FreeBSD.org>
Signed-off-by: Kyle Evans <kevans@freebsd.org>
Signed-off-by: Warner Losh <imp@bsdimp.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: c34f2aaff645cbda1d69f71b8fa9173fec5b1a8d
      
https://github.com/qemu/qemu/commit/c34f2aaff645cbda1d69f71b8fa9173fec5b1a8d
  Author: Warner Losh <imp@bsdimp.com>
  Date:   2022-01-28 (Fri, 28 Jan 2022)

  Changed paths:
    M bsd-user/signal.c

  Log Message:
  -----------
  bsd-user/signal.c: host_to_target_siginfo_noswap

Implement conversion of host to target siginfo.

Signed-off-by: Stacey Son <sson@FreeBSD.org>
Signed-off-by: Kyle Evans <kevans@freebsd.org>
Signed-off-by: Warner Losh <imp@bsdimp.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: aae57ac37a8803cdd39a732491718b6ee772bb3d
      
https://github.com/qemu/qemu/commit/aae57ac37a8803cdd39a732491718b6ee772bb3d
  Author: Warner Losh <imp@bsdimp.com>
  Date:   2022-01-28 (Fri, 28 Jan 2022)

  Changed paths:
    M bsd-user/qemu.h
    M bsd-user/signal.c

  Log Message:
  -----------
  bsd-user/signal.c: Implement rewind_if_in_safe_syscall

Signed-off-by: Kyle Evans <kevans@freebsd.org>
Signed-off-by: Warner Losh <imp@bsdimp.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: e625c7ef5c07431a708f9fb0d98cbfeea1ad3ccc
      
https://github.com/qemu/qemu/commit/e625c7ef5c07431a708f9fb0d98cbfeea1ad3ccc
  Author: Warner Losh <imp@bsdimp.com>
  Date:   2022-01-28 (Fri, 28 Jan 2022)

  Changed paths:
    M bsd-user/signal.c

  Log Message:
  -----------
  bsd-user/signal.c: Implement host_signal_handler

Implement host_signal_handler to handle signals generated by the host
and to do safe system calls.

Signed-off-by: Stacey Son <sson@FreeBSD.org>
Signed-off-by: Kyle Evans <kevans@freebsd.org>
Signed-off-by: Warner Losh <imp@bsdimp.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: fd5bec9ad28eaa454feaad46e68a76b9eeedb3ff
      
https://github.com/qemu/qemu/commit/fd5bec9ad28eaa454feaad46e68a76b9eeedb3ff
  Author: Warner Losh <imp@bsdimp.com>
  Date:   2022-01-28 (Fri, 28 Jan 2022)

  Changed paths:
    M bsd-user/qemu.h
    M bsd-user/strace.c

  Log Message:
  -----------
  bsd-user/strace.c: print_taken_signal

print_taken_signal() prints signals when we're tracing signals.

Signed-off-by: Stacey Son <sson@FreeBSD.org>
Signed-off-by: Kyle Evans <kevans@freebsd.org>
Signed-off-by: Warner Losh <imp@bsdimp.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: 377145478339917491a850643bb920548907d956
      
https://github.com/qemu/qemu/commit/377145478339917491a850643bb920548907d956
  Author: Warner Losh <imp@bsdimp.com>
  Date:   2022-01-28 (Fri, 28 Jan 2022)

  Changed paths:
    M bsd-user/signal.c
    M bsd-user/syscall_defs.h

  Log Message:
  -----------
  bsd-user/signal.c: Implement dump_core_and_abort

Force delivering a signal and generating a core file. It's a global
function for the moment...

Signed-off-by: Stacey Son <sson@FreeBSD.org>
Signed-off-by: Kyle Evans <kevans@freebsd.org>
Signed-off-by: Warner Losh <imp@bsdimp.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: 38be620c950dcf629ba3217c6a183fee0e790fa8
      
https://github.com/qemu/qemu/commit/38be620c950dcf629ba3217c6a183fee0e790fa8
  Author: Warner Losh <imp@bsdimp.com>
  Date:   2022-01-28 (Fri, 28 Jan 2022)

  Changed paths:
    M bsd-user/qemu.h
    M bsd-user/signal.c

  Log Message:
  -----------
  bsd-user/signal.c: Fill in queue_signal

Fill in queue signal implementation, as well as routines allocate and
delete elements of the signal queue.

Signed-off-by: Stacey Son <sson@FreeBSD.org>
Signed-off-by: Kyle Evans <kevans@freebsd.org>
Signed-off-by: Warner Losh <imp@bsdimp.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: c93cbac1f4aab40c3fd4ac7488c7e3365ec5c894
      
https://github.com/qemu/qemu/commit/c93cbac1f4aab40c3fd4ac7488c7e3365ec5c894
  Author: Warner Losh <imp@bsdimp.com>
  Date:   2022-01-28 (Fri, 28 Jan 2022)

  Changed paths:
    M bsd-user/signal-common.h
    M bsd-user/signal.c

  Log Message:
  -----------
  bsd-user/signal.c: sigset manipulation routines.

target_sigemptyset: resets a set to having no bits set
target_sigaddset:   adds a signal to a set
target_sigismember: returns true when signal is a member
host_to_target_sigset_internal: convert host sigset to target
host_to_target_sigset: convert host sigset to target
target_to_host_sigset_internal: convert target sigset to host
target_to_host_sigset: convert target sigset to host

Signed-off-by: Stacey Son <sson@FreeBSD.org>
Signed-off-by: Kyle Evans <kevans@freebsd.org>
Signed-off-by: Warner Losh <imp@bsdimp.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: 46f4f76d332d8c2b4eb24c8e6f91ac8bdc205733
      
https://github.com/qemu/qemu/commit/46f4f76d332d8c2b4eb24c8e6f91ac8bdc205733
  Author: Warner Losh <imp@bsdimp.com>
  Date:   2022-01-28 (Fri, 28 Jan 2022)

  Changed paths:
    M bsd-user/main.c
    M bsd-user/qemu.h
    M bsd-user/signal.c

  Log Message:
  -----------
  bsd-user/signal.c: setup_frame

setup_frame sets up a signalled stack frame. Associated routines to
extract the pointer to the stack frame and to support alternate stacks.

Signed-off-by: Stacey Son <sson@FreeBSD.org>
Signed-off-by: Kyle Evans <kevans@freebsd.org>
Signed-off-by: Warner Losh <imp@bsdimp.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: 6c6d4b5616b391934851f049f41a7cbde12140d9
      
https://github.com/qemu/qemu/commit/6c6d4b5616b391934851f049f41a7cbde12140d9
  Author: Warner Losh <imp@bsdimp.com>
  Date:   2022-01-28 (Fri, 28 Jan 2022)

  Changed paths:
    M bsd-user/qemu.h
    M bsd-user/signal.c

  Log Message:
  -----------
  bsd-user/signal.c: handle_pending_signal

Handle a queued signal.

Signed-off-by: Stacey Son <sson@FreeBSD.org>
Signed-off-by: Kyle Evans <kevans@freebsd.org>
Signed-off-by: Warner Losh <imp@bsdimp.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: 08eb66d5d837c2db9d5d57553da8448fd8e36571
      
https://github.com/qemu/qemu/commit/08eb66d5d837c2db9d5d57553da8448fd8e36571
  Author: Warner Losh <imp@bsdimp.com>
  Date:   2022-01-28 (Fri, 28 Jan 2022)

  Changed paths:
    M bsd-user/signal.c

  Log Message:
  -----------
  bsd-user/signal.c: tswap_siginfo

Convert siginfo from targer to host.

Signed-off-by: Stacey Son <sson@FreeBSD.org>
Signed-off-by: Kyle Evans <kevans@freebsd.org>
Signed-off-by: Warner Losh <imp@bsdimp.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: d7acd31780bea1c192854a8617255ad992b19c4d
      
https://github.com/qemu/qemu/commit/d7acd31780bea1c192854a8617255ad992b19c4d
  Author: Warner Losh <imp@bsdimp.com>
  Date:   2022-01-28 (Fri, 28 Jan 2022)

  Changed paths:
    M bsd-user/signal.c

  Log Message:
  -----------
  bsd-user/signal.c: process_pending_signals

Process the currently queued signals.

Signed-off-by: Stacey Son <sson@FreeBSD.org>
Signed-off-by: Kyle Evans <kevans@freebsd.org>
Signed-off-by: Warner Losh <imp@bsdimp.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: c885ae0e4ebf207c861bf651dcf9282677281c06
      
https://github.com/qemu/qemu/commit/c885ae0e4ebf207c861bf651dcf9282677281c06
  Author: Warner Losh <imp@bsdimp.com>
  Date:   2022-01-30 (Sun, 30 Jan 2022)

  Changed paths:
    M bsd-user/signal-common.h
    M bsd-user/signal.c

  Log Message:
  -----------
  bsd-user/signal.c: implement do_sigreturn

Implements the meat of a sigreturn(2) system call via do_sigreturn, and
helper reset_signal_mask. Fix the prototype of do_sigreturn in qemu.h
and remove do_rt_sigreturn since it's linux only.

Signed-off-by: Stacey Son <sson@FreeBSD.org>
Signed-off-by: Kyle Evans <kevans@freebsd.org>
Signed-off-by: Warner Losh <imp@bsdimp.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: 394cf694273caf8ab8838588954d0fc2909ae2fa
      
https://github.com/qemu/qemu/commit/394cf694273caf8ab8838588954d0fc2909ae2fa
  Author: Warner Losh <imp@bsdimp.com>
  Date:   2022-01-30 (Sun, 30 Jan 2022)

  Changed paths:
    M bsd-user/signal-common.h
    M bsd-user/signal.c

  Log Message:
  -----------
  bsd-user/signal.c: implement do_sigaction

Implement the meat of the sigaction(2) system call with do_sigaction and
helper routiner block_signals (which is also used to implemement signal
masking so it's global).

Signed-off-by: Stacey Son <sson@FreeBSD.org>
Signed-off-by: Kyle Evans <kevans@freebsd.org>
Signed-off-by: Warner Losh <imp@bsdimp.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: 43ed4267845899871890589c96b1302a1696525d
      
https://github.com/qemu/qemu/commit/43ed4267845899871890589c96b1302a1696525d
  Author: Warner Losh <imp@bsdimp.com>
  Date:   2022-01-30 (Sun, 30 Jan 2022)

  Changed paths:
    M bsd-user/signal.c

  Log Message:
  -----------
  bsd-user/signal.c: do_sigaltstack

Implement the meat of the sigaltstack(2) system call with do_sigaltstack.

With that, all the stubbed out routines are complete, so remove
now-incorrect comment.

Signed-off-by: Stacey Son <sson@FreeBSD.org>
Signed-off-by: Kyle Evans <kevans@freebsd.org>
Signed-off-by: Warner Losh <imp@bsdimp.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: adbae40fa1c378d68b2d329620d16bbb8e222eb7
      
https://github.com/qemu/qemu/commit/adbae40fa1c378d68b2d329620d16bbb8e222eb7
  Author: Warner Losh <imp@bsdimp.com>
  Date:   2022-01-30 (Sun, 30 Jan 2022)

  Changed paths:
    M MAINTAINERS

  Log Message:
  -----------
  MAINTAINERS: Add tests/vm/*bsd to the list to get reviews on

tests/vm/*bsd (especailly tests/vm/freebsd) are adjacent to the bsd-user
stuff and we're keen on keeping them working as well.

Signed-off-by: Warner Losh <imp@bsdimp.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: bab6ccc53d4dcfc7a713efbcce9ec60ada9e29b9
      
https://github.com/qemu/qemu/commit/bab6ccc53d4dcfc7a713efbcce9ec60ada9e29b9
  Author: Warner Losh <imp@bsdimp.com>
  Date:   2022-01-30 (Sun, 30 Jan 2022)

  Changed paths:
    M bsd-user/arm/target_arch_cpu.h
    M bsd-user/i386/target_arch_cpu.h
    M bsd-user/x86_64/target_arch_cpu.h

  Log Message:
  -----------
  bsd-user: Rename arg name for target_cpu_reset to env

Rename the parameter name for target_cpu_reset's CPUArchState * arg from
cpu to env.

Signed-off-by: Warner Losh <imp@bsdimp.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: 1103d59caaa82c94b4223a5429c31895d2f05217
      
https://github.com/qemu/qemu/commit/1103d59caaa82c94b4223a5429c31895d2f05217
  Author: Warner Losh <imp@bsdimp.com>
  Date:   2022-01-30 (Sun, 30 Jan 2022)

  Changed paths:
    M bsd-user/freebsd/target_os_ucontext.h

  Log Message:
  -----------
  bsd-user/freebsd/target_os_ucontext.h: Prefer env as arg name for 
CPUArchState args

Signed-off-by: Warner Losh <imp@bsdimp.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: 5cbe64110dbe27f82d30552001acdc5eeaade11c
      
https://github.com/qemu/qemu/commit/5cbe64110dbe27f82d30552001acdc5eeaade11c
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2022-01-31 (Mon, 31 Jan 2022)

  Changed paths:
    M MAINTAINERS
    M bsd-user/arm/signal.c
    M bsd-user/arm/target_arch_cpu.h
    M bsd-user/freebsd/target_os_siginfo.h
    M bsd-user/freebsd/target_os_signal.h
    M bsd-user/freebsd/target_os_ucontext.h
    A bsd-user/host/arm/host-signal.h
    A bsd-user/host/i386/host-signal.h
    A bsd-user/host/x86_64/host-signal.h
    M bsd-user/i386/signal.c
    M bsd-user/i386/target_arch_cpu.h
    M bsd-user/main.c
    M bsd-user/qemu.h
    A bsd-user/signal-common.h
    M bsd-user/signal.c
    M bsd-user/strace.c
    M bsd-user/syscall_defs.h
    A bsd-user/trace-events
    A bsd-user/trace.h
    M bsd-user/x86_64/signal.c
    M bsd-user/x86_64/target_arch_cpu.h
    M meson.build

  Log Message:
  -----------
  Merge remote-tracking branch 
'remotes/bsdimp/tags/bsd-user-arm-2022q1-pull-request' into staging

bsd-user: upstream signal implementation

Upstream the bsd-user fork signal implementation, for the most part.  This
series of commits represents nearly all of the infrastructure that surround
signals, except the actual system call glue (that was also reworked in the
fork and needs its own series). In addition, this adds the sigsegv and sigbus
code to arm. Even in the fork, we don't have good x86 signal implementation,
so there's little to upstream for that at the moment.

bsd-user's signal implementation is similar to linux-user's. The full context
can be found in the bsd-user's fork's 'blitz branch' at
https://github.com/qemu-bsd-user/qemu-bsd-user/tree/blitz which shows how these
are used to implement various system calls. Since this was built from
linux-user's stack stuff, evolved for BSD with the passage of a few years, it
no-doubt missed some bug fixes from linux-user (though nothing obvious stood out
in the quick comparison I made). After the first round of reviews, many of these
improvements have been incorporated.

Patchew history: https://patchew.org/QEMU/20220125012947.14974-1-imp@bsdimp.com/

# gpg: Signature made Mon 31 Jan 2022 19:55:51 GMT
# gpg:                using RSA key 2035F894B00AA3CF7CCDE1B76C1CD1287DB01100
# gpg: Good signature from "Warner Losh <wlosh@netflix.com>" [unknown]
# gpg:                 aka "Warner Losh <imp@bsdimp.com>" [unknown]
# gpg:                 aka "Warner Losh <imp@freebsd.org>" [unknown]
# gpg:                 aka "Warner Losh <imp@village.org>" [unknown]
# gpg:                 aka "Warner Losh <wlosh@bsdimp.com>" [unknown]
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 2035 F894 B00A A3CF 7CCD  E1B7 6C1C D128 7DB0 1100

* remotes/bsdimp/tags/bsd-user-arm-2022q1-pull-request: (40 commits)
  bsd-user/freebsd/target_os_ucontext.h: Prefer env as arg name for 
CPUArchState args
  bsd-user: Rename arg name for target_cpu_reset to env
  MAINTAINERS: Add tests/vm/*bsd to the list to get reviews on
  bsd-user/signal.c: do_sigaltstack
  bsd-user/signal.c: implement do_sigaction
  bsd-user/signal.c: implement do_sigreturn
  bsd-user/signal.c: process_pending_signals
  bsd-user/signal.c: tswap_siginfo
  bsd-user/signal.c: handle_pending_signal
  bsd-user/signal.c: setup_frame
  bsd-user/signal.c: sigset manipulation routines.
  bsd-user/signal.c: Fill in queue_signal
  bsd-user/signal.c: Implement dump_core_and_abort
  bsd-user/strace.c: print_taken_signal
  bsd-user/signal.c: Implement host_signal_handler
  bsd-user/signal.c: Implement rewind_if_in_safe_syscall
  bsd-user/signal.c: host_to_target_siginfo_noswap
  bsd-user: Add trace events for bsd-user
  bsd-user: Add host signals to the build
  bsd-user/host/x86_64/host-signal.h: Implement host_signal_*
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


Compare: https://github.com/qemu/qemu/compare/804b30d25f8d...5cbe64110dbe



reply via email to

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