All of lore.kernel.org
 help / color / mirror / Atom feed
From: Warner Losh <imp@bsdimp.com>
To: qemu-devel@nongnu.org
Cc: Warner Losh <imp@bsdimp.com>, Kyle Evans <kevans@freebsd.org>,
	Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Subject: [PULL 08/11] bsd-user: Implement sigfastblock
Date: Tue, 22 Sep 2026 13:21:06 -0600	[thread overview]
Message-ID: <20260922192109.98467-9-imp@bsdimp.com> (raw)
In-Reply-To: <20260922192109.98467-1-imp@bsdimp.com>

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Signed-off-by: Warner Losh <imp@bsdimp.com>
---
 bsd-user/freebsd/os-syscall.c |  5 +++++
 bsd-user/freebsd/os-thread.h  | 11 +++++++++++
 2 files changed, 16 insertions(+)

diff --git a/bsd-user/freebsd/os-syscall.c b/bsd-user/freebsd/os-syscall.c
index e87924fbb5..b5178f298e 100644
--- a/bsd-user/freebsd/os-syscall.c
+++ b/bsd-user/freebsd/os-syscall.c
@@ -97,6 +97,7 @@ safe_syscall3(ssize_t, sendmsg, int, s, const struct msghdr *, msg, int, flags);
 safe_syscall1(int, thr_suspend, struct timespec *, timeout);
 safe_syscall5(int, _umtx_op, void *, obj, int, op, unsigned long, val, void *,
     uaddr, void *, uaddr2);
+safe_syscall2(int, sigfastblock, int, cmd, void *, ptr);
 
 /* used in os-time */
 safe_syscall2(int, nanosleep, const struct timespec *, rqtp, struct timespec *,
@@ -1175,6 +1176,10 @@ static abi_long freebsd_syscall(CPUArchState *env, int num, abi_long arg1,
         ret = do_freebsd__umtx_op(arg1, arg2, arg3, arg4, arg5);
         break;
 
+    case TARGET_FREEBSD_NR_sigfastblock: /* internal */
+        ret = do_freebsd_sigfastblock(arg1, arg2);
+        break;
+
         /*
          * ioctl(2)
          */
diff --git a/bsd-user/freebsd/os-thread.h b/bsd-user/freebsd/os-thread.h
index 6552c60337..dfb22e7cc2 100644
--- a/bsd-user/freebsd/os-thread.h
+++ b/bsd-user/freebsd/os-thread.h
@@ -17,6 +17,7 @@
 
 int safe_thr_suspend(struct timespec *timeout);
 int safe__umtx_op(void *, int, unsigned long, void *, void *);
+int safe_sigfastblock(int, void *);
 
 #if HOST_BIG_ENDIAN == TARGET_BIG_ENDIAN && \
     (TARGET_ABI_BITS == HOST_LONG_BITS || defined(UMTX_OP__32BIT))
@@ -593,4 +594,14 @@ static inline abi_long do_freebsd__umtx_op(abi_ulong obj, int op, abi_ulong val,
     return ret;
 }
 
+static inline abi_long do_freebsd_sigfastblock(abi_long cmd, abi_long ptr)
+{
+    void *hostptr = g2h_untagged(ptr);
+
+    if (hostptr == NULL) {
+        return -TARGET_EFAULT;
+    }
+    return get_errno(safe_sigfastblock(cmd, hostptr));
+}
+
 #endif /* FREEBSD_OS_THREAD_H */
-- 
2.55.0



  parent reply	other threads:[~2026-09-22 19:23 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-22 19:20 [PULL 00/11] Bsd user 2026q3 patches Warner Losh
2026-09-22 19:20 ` [PULL 01/11] bsd-user: HOST_BIG_ENDIAN and TARGET_BIG_ENDIAN are always Warner Losh
2026-09-22 19:21 ` [PULL 02/11] bsd-user: Drop support for FreeBSD 12 Warner Losh
2026-09-22 19:21 ` [PULL 03/11] bsd-user: Flag shared memory as needing atomics Warner Losh
2026-09-22 19:21 ` [PULL 04/11] bsd-user: Initialize per-arch child registers Warner Losh
2026-09-22 19:21 ` [PULL 05/11] bsd-user: Fix crazy bug with mmap Warner Losh
2026-09-22 19:21 ` [PULL 06/11] bsd-user: Move tb_flush stuff to begin_parallel_context Warner Losh
2026-09-22 19:21 ` [PULL 07/11] bsd-user: Implement exterrctl(2) Warner Losh
2026-09-22 19:21 ` Warner Losh [this message]
2026-09-22 19:21 ` [PULL 09/11] bsd-user: Eliminate unused regs arg in load_elf_binary Warner Losh
2026-09-22 19:21 ` [PULL 10/11] bsd-user: #ifdef sockopt that aren't in 14 Warner Losh
2026-09-22 19:21 ` [PULL 11/11] bsd-user: Remove host-os.h Warner Losh
2026-09-23 19:44 ` [PULL 00/11] Bsd user 2026q3 patches Richard Henderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260922192109.98467-9-imp@bsdimp.com \
    --to=imp@bsdimp.com \
    --cc=kevans@freebsd.org \
    --cc=pierrick.bouvier@oss.qualcomm.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.