[PATCH 05/24] bsd-user: Add function declarations for bsd-misc.c conversions

Warner Losh posted 24 patches 3 days, 15 hours ago
Maintainers: Warner Losh <imp@bsdimp.com>, Kyle Evans <kevans@freebsd.org>, Riku Voipio <riku.voipio@iki.fi>, Paolo Bonzini <pbonzini@redhat.com>, "Marc-André Lureau" <marcandre.lureau@redhat.com>, "Daniel P. Berrangé" <berrange@redhat.com>, "Philippe Mathieu-Daudé" <philmd@linaro.org>
There is a newer version of this series
[PATCH 05/24] bsd-user: Add function declarations for bsd-misc.c conversions
Posted by Warner Losh 3 days, 15 hours ago
Add function declarations for BSD System V IPC and UUID conversion
routines that will be implemented in bsd-misc.c.

Signed-off-by: Stacey Son <sson@FreeBSD.org>
Signed-off-by: Warner Losh <imp@bsdimp.com>
---
 bsd-user/qemu-bsd.h | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/bsd-user/qemu-bsd.h b/bsd-user/qemu-bsd.h
index 56affcd31d..b98d1d76b2 100644
--- a/bsd-user/qemu-bsd.h
+++ b/bsd-user/qemu-bsd.h
@@ -54,4 +54,19 @@ abi_long target_to_host_shmid_ds(struct shmid_ds *host_sd,
 abi_long host_to_target_shmid_ds(abi_ulong target_addr,
         struct shmid_ds *host_sd);
 
+/* bsd-misc.c */
+abi_long host_to_target_uuid(abi_ulong target_addr, struct uuid *host_uuid);
+abi_long target_to_host_semarray(int semid, unsigned short **host_array,
+        abi_ulong target_addr);
+abi_long host_to_target_semarray(int semid, abi_ulong target_addr,
+        unsigned short **host_array);
+abi_long target_to_host_semid_ds(struct semid_ds *host_sd,
+        abi_ulong target_addr);
+abi_long host_to_target_semid_ds(abi_ulong target_addr,
+        struct semid_ds *host_sd);
+abi_long target_to_host_msqid_ds(struct msqid_ds *host_md,
+        abi_ulong target_addr);
+abi_long host_to_target_msqid_ds(abi_ulong target_addr,
+        struct msqid_ds *host_md);
+
 #endif /* QEMU_BSD_H */

-- 
2.52.0
Re: [PATCH 05/24] bsd-user: Add function declarations for bsd-misc.c conversions
Posted by Richard Henderson 3 days, 8 hours ago
On 2/6/26 03:26, Warner Losh wrote:
> Add function declarations for BSD System V IPC and UUID conversion
> routines that will be implemented in bsd-misc.c.
> 
> Signed-off-by: Stacey Son <sson@FreeBSD.org>
> Signed-off-by: Warner Losh <imp@bsdimp.com>
> ---
>   bsd-user/qemu-bsd.h | 15 +++++++++++++++
>   1 file changed, 15 insertions(+)
> 
> diff --git a/bsd-user/qemu-bsd.h b/bsd-user/qemu-bsd.h
> index 56affcd31d..b98d1d76b2 100644
> --- a/bsd-user/qemu-bsd.h
> +++ b/bsd-user/qemu-bsd.h
> @@ -54,4 +54,19 @@ abi_long target_to_host_shmid_ds(struct shmid_ds *host_sd,
>   abi_long host_to_target_shmid_ds(abi_ulong target_addr,
>           struct shmid_ds *host_sd);
>   
> +/* bsd-misc.c */
> +abi_long host_to_target_uuid(abi_ulong target_addr, struct uuid *host_uuid);
> +abi_long target_to_host_semarray(int semid, unsigned short **host_array,
> +        abi_ulong target_addr);
> +abi_long host_to_target_semarray(int semid, abi_ulong target_addr,
> +        unsigned short **host_array);
> +abi_long target_to_host_semid_ds(struct semid_ds *host_sd,
> +        abi_ulong target_addr);
> +abi_long host_to_target_semid_ds(abi_ulong target_addr,
> +        struct semid_ds *host_sd);
> +abi_long target_to_host_msqid_ds(struct msqid_ds *host_md,
> +        abi_ulong target_addr);
> +abi_long host_to_target_msqid_ds(abi_ulong target_addr,
> +        struct msqid_ds *host_md);
> +
>   #endif /* QEMU_BSD_H */
> 

Normally, the declarations should be added with the definition. But I won't insist that 
you split this into the 6 following patches that add the definitions.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~
Re: [PATCH 05/24] bsd-user: Add function declarations for bsd-misc.c conversions
Posted by Warner Losh 3 days, 7 hours ago
On Thu, Feb 5, 2026 at 5:17 PM Richard Henderson <
richard.henderson@linaro.org> wrote:

> On 2/6/26 03:26, Warner Losh wrote:
> > Add function declarations for BSD System V IPC and UUID conversion
> > routines that will be implemented in bsd-misc.c.
> >
> > Signed-off-by: Stacey Son <sson@FreeBSD.org>
> > Signed-off-by: Warner Losh <imp@bsdimp.com>
> > ---
> >   bsd-user/qemu-bsd.h | 15 +++++++++++++++
> >   1 file changed, 15 insertions(+)
> >
> > diff --git a/bsd-user/qemu-bsd.h b/bsd-user/qemu-bsd.h
> > index 56affcd31d..b98d1d76b2 100644
> > --- a/bsd-user/qemu-bsd.h
> > +++ b/bsd-user/qemu-bsd.h
> > @@ -54,4 +54,19 @@ abi_long target_to_host_shmid_ds(struct shmid_ds
> *host_sd,
> >   abi_long host_to_target_shmid_ds(abi_ulong target_addr,
> >           struct shmid_ds *host_sd);
> >
> > +/* bsd-misc.c */
> > +abi_long host_to_target_uuid(abi_ulong target_addr, struct uuid
> *host_uuid);
> > +abi_long target_to_host_semarray(int semid, unsigned short **host_array,
> > +        abi_ulong target_addr);
> > +abi_long host_to_target_semarray(int semid, abi_ulong target_addr,
> > +        unsigned short **host_array);
> > +abi_long target_to_host_semid_ds(struct semid_ds *host_sd,
> > +        abi_ulong target_addr);
> > +abi_long host_to_target_semid_ds(abi_ulong target_addr,
> > +        struct semid_ds *host_sd);
> > +abi_long target_to_host_msqid_ds(struct msqid_ds *host_md,
> > +        abi_ulong target_addr);
> > +abi_long host_to_target_msqid_ds(abi_ulong target_addr,
> > +        struct msqid_ds *host_md);
> > +
> >   #endif /* QEMU_BSD_H */
> >
>
> Normally, the declarations should be added with the definition. But I
> won't insist that
> you split this into the 6 following patches that add the definitions.
>

Thanks! I'll adjust for the subsequent patch chains. I still have huge
diffs:

 131 files changed, 5141 insertions(+), 587 deletions(-)

But it was down from a high of I think 13k.


> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
>
>
> r~
>