History log of /openbmc/qemu/bsd-user/qemu.h (Results 1 – 25 of 194)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 4e00b7d8 25-Sep-2023 Stacey Son <sson@FreeBSD.org>

bsd-user: Implement shmat(2) and shmdt(2)

Use `WITH_MMAP_LOCK_GUARD` instead of mmap_lock() and mmap_unlock(),
to match linux-user implementation, according to the following commits:

69fa2708a216df

bsd-user: Implement shmat(2) and shmdt(2)

Use `WITH_MMAP_LOCK_GUARD` instead of mmap_lock() and mmap_unlock(),
to match linux-user implementation, according to the following commits:

69fa2708a216df715ba5102a0f98468b540a464e linux-user: Use WITH_MMAP_LOCK_GUARD in target_{shmat,shmdt}
ceda5688b650646248f269a992c06b11148c5759 linux-user: Fix shmdt

Signed-off-by: Stacey Son <sson@FreeBSD.org>
Signed-off-by: Karim Taha <kariem.taha2.7@gmail.com>
Message-Id: <20230925182709.4834-23-kariem.taha2.7@gmail.com>

show more ...


# 86327290 25-Sep-2023 Stacey Son <sson@FreeBSD.org>

bsd-user: Implement freebsd_exec_common, used in implementing execve/fexecve.

Signed-off-by: Stacey Son <sson@FreeBSD.org>
Signed-off-by: Karim Taha <kariem.taha2.7@gmail.com>
Reviewed-by: Warner Lo

bsd-user: Implement freebsd_exec_common, used in implementing execve/fexecve.

Signed-off-by: Stacey Son <sson@FreeBSD.org>
Signed-off-by: Karim Taha <kariem.taha2.7@gmail.com>
Reviewed-by: Warner Losh <imp@bsdimp.com>
Message-Id: <20230925182425.3163-21-kariem.taha2.7@gmail.com>

show more ...


# cc47390c 25-Sep-2023 Stacey Son <sson@FreeBSD.org>

bsd-user: Add freebsd_exec_common and do_freebsd_procctl to qemu.h.

Signed-off-by: Stacey Son <sson@FreeBSD.org>
Signed-off-by: Karim Taha <kariem.taha2.7@gmail.com>
Reviewed-by: Richard Henderson <

bsd-user: Add freebsd_exec_common and do_freebsd_procctl to qemu.h.

Signed-off-by: Stacey Son <sson@FreeBSD.org>
Signed-off-by: Karim Taha <kariem.taha2.7@gmail.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Warner Losh <imp@bsdimp.com>
Message-Id: <20230925182425.3163-5-kariem.taha2.7@gmail.com>

show more ...


# 944399ff 14-Jul-2023 Michael Tokarev <mjt@tls.msk.ru>

bsd-user: spelling fixes

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Reviewed-by: Kyle Evans <kevans@FreeBSD.org>
Reviewed-by: Warner Losh <imp@bsdimp.com>


# 8a45962b 30-Aug-2023 Warner Losh <imp@bsdimp.com>

bsd-user: Move PRAGMA_DISABLE_PACKED_WARNING etc to qemu.h

For the moment, move PRAGMA_DISABLE_PACKED_WARNING and
PRAGMA_ENABLE_PACKED_WARNING back to bsd-user/qemu.h.

Of course, these should be in

bsd-user: Move PRAGMA_DISABLE_PACKED_WARNING etc to qemu.h

For the moment, move PRAGMA_DISABLE_PACKED_WARNING and
PRAGMA_ENABLE_PACKED_WARNING back to bsd-user/qemu.h.

Of course, these should be in compiler.h, but that interferes with too
many things at the moment, so take one step back to unbreak clang
linux-user builds first. Use the exact same version that's in
linux-user/qemu.h since that's what should be in compiler.h.

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

show more ...


# 9b4a902d 13-Aug-2023 Stacey Son <sson@FreeBSD.org>

bsd-user: Declarations of h2t and t2h conversion functions.

Declarations of functions that convert between host and target structs.

Co-authored-by: Michal Meloun <mmel@FreeBSD.org>

Signed-off-by:

bsd-user: Declarations of h2t and t2h conversion functions.

Declarations of functions that convert between host and target structs.

Co-authored-by: Michal Meloun <mmel@FreeBSD.org>

Signed-off-by: Stacey Son <sson@FreeBSD.org>
Signed-off-by: Karim Taha <kariem.taha2.7@gmail.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Warner Losh <imp@bsdimp.com>

show more ...


# 6538c682 13-Aug-2023 Warner Losh <imp@bsdimp.com>

bsd-user; Update the definitions of __put_user and __get_user macros

Use __builtin_choose_expr to avoid type promotion from ?:
in __put_user_e and __get_user_e macros.
Copied from linux-user/qemu.h,

bsd-user; Update the definitions of __put_user and __get_user macros

Use __builtin_choose_expr to avoid type promotion from ?:
in __put_user_e and __get_user_e macros.
Copied from linux-user/qemu.h, originally by Blue Swirl.

Signed-off-by: Warner Losh <imp@bsdimp.com>
Signed-off-by: Karim Taha <kariem.taha2.7@gmail.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

show more ...


# 4436e2ff 18-Aug-2023 Richard Henderson <richard.henderson@linaro.org>

bsd-user: Remove image_info.start_brk

This has the same value is image_info.brk, which is also logged,
and is otherwise unused.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Revie

bsd-user: Remove image_info.start_brk

This has the same value is image_info.brk, which is also logged,
and is otherwise unused.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20230818175736.144194-4-richard.henderson@linaro.org>
Reviewed-by: Warner Losh <imp@bsdimp.com>
Signed-off-by: Warner Losh <imp@bsdimp.com>

show more ...


# 7db18736 18-Aug-2023 Richard Henderson <richard.henderson@linaro.org>

bsd-user: Remove image_info.mmap

This value is unused.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <202308181

bsd-user: Remove image_info.mmap

This value is unused.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20230818175736.144194-3-richard.henderson@linaro.org>
Reviewed-by: Warner Losh <imp@bsdimp.com>
Signed-off-by: Warner Losh <imp@bsdimp.com>

show more ...


# 935f1dd8 18-Aug-2023 Richard Henderson <richard.henderson@linaro.org>

bsd-user: Remove ELF_START_MMAP and image_info.start_mmap

The start_mmap value is write-only.
Remove the field and the defines that populated it.

Signed-off-by: Richard Henderson <richard.henderson

bsd-user: Remove ELF_START_MMAP and image_info.start_mmap

The start_mmap value is write-only.
Remove the field and the defines that populated it.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20230818175736.144194-2-richard.henderson@linaro.org>
Reviewed-by: Warner Losh <imp@bsdimp.com>
Signed-off-by: Warner Losh <imp@bsdimp.com>

show more ...


# 3c4a8a8f 04-Aug-2023 Richard Henderson <richard.henderson@linaro.org>

bsd-user: Remove last_brk

This variable is unused.

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


# bef6f008 07-Jul-2023 Richard Henderson <richard.henderson@linaro.org>

accel/tcg: Return bool from page_check_range

Replace the 0/-1 result with true/false.
Invert the sense of the test of all callers.
Document the function.

Signed-off-by: Richard Henderson <richard.h

accel/tcg: Return bool from page_check_range

Replace the 0/-1 result with true/false.
Invert the sense of the test of all callers.
Document the function.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20230707204054.8792-25-richard.henderson@linaro.org>

show more ...


Revision tags: v8.0.0
# 6da777e2 10-Feb-2023 Kyle Evans <kevans@FreeBSD.org>

bsd-user: implement sysctlbyname(2)

do_freebsd_sysctlbyname needs to translate the 'name' back down to a OID
so we can intercept the special ones. Do that and call the common wrapper
do_freebsd_sysc

bsd-user: implement sysctlbyname(2)

do_freebsd_sysctlbyname needs to translate the 'name' back down to a OID
so we can intercept the special ones. Do that and call the common wrapper
do_freebsd_sysctl_oid.

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

show more ...


# 7adda6de 10-Feb-2023 Kyle Evans <kevans@FreeBSD.org>

bsd-user: do_freebsd_sysctl helper for sysctl(2)

Implement the wrapper function for sysctl(2). This puts the oid
arguments into a standard form and calls the common
do_freebsd_sysctl_oid.

Signed-of

bsd-user: do_freebsd_sysctl helper for sysctl(2)

Implement the wrapper function for sysctl(2). This puts the oid
arguments into a standard form and calls the common
do_freebsd_sysctl_oid.

Signed-off-by: Kyle Evans <kevans@FreeBSD.org>
Co-Authored-by: Juergen Lock <nox@jelal.kn-bremen.de>
Signed-off-by: Juergen Lock <nox@jelal.kn-bremen.de>
Co-Authored-by: Stacey Son <sson@FreeBSD.org>
Signed-off-by: Stacey Son <sson@FreeBSD.org>
Reviewed-by: Warner Losh <imp@bsdimp.com>
Signed-off-by: Warner Losh <imp@bsdimp.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

show more ...


# e022d9ca 17-Jan-2023 Emanuele Giuseppe Esposito <eesposit@redhat.com>

bsd-user/mmap: use TSA_NO_TSA to suppress clang TSA warnings in FreeBSD

FreeBSD implements pthread headers using TSA (thread safety analysis)
annotations, therefore when an application is compiled w

bsd-user/mmap: use TSA_NO_TSA to suppress clang TSA warnings in FreeBSD

FreeBSD implements pthread headers using TSA (thread safety analysis)
annotations, therefore when an application is compiled with
-Wthread-safety there are some locking/annotation requirements that the
user of the pthread API has to follow.

This will also be the case in QEMU, since bsd-user/mmap.c uses the
pthread API. Therefore when building it with -Wthread-safety the
compiler will throw warnings because the functions are not properly
annotated. We need TSA to be enabled because it ensures that the
critical sections of an annotated variable are properly locked.

In order to make the compiler happy and avoid adding all the necessary
macros to all callers (lock functions should use TSA_ACQUIRE, while
unlock TSA_RELEASE, and this applies to all users of pthread_mutex_lock
and pthread_mutex_unlock), simply use TSA_NO_TSA to supppress such
warnings.

Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Message-Id: <20230117135203.3049709-3-eesposit@redhat.com>
Reviewed-by: Warner Losh <imp@bsdimp.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>

show more ...


# 48e438a3 02-Feb-2023 Markus Armbruster <armbru@redhat.com>

bsd-user: Clean up includes

This commit was created with scripts/clean-includes.

All .c should include qemu/osdep.h first. The script performs three
related cleanups:

* Ensure .c files include qe

bsd-user: Clean up includes

This commit was created with scripts/clean-includes.

All .c should include qemu/osdep.h first. The script performs three
related cleanups:

* Ensure .c files include qemu/osdep.h first.
* Including it in a .h is redundant, since the .c already includes
it. Drop such inclusions.
* Likewise, including headers qemu/osdep.h includes is redundant.
Drop these, too.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Warner Losh <imp@bsdimp.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Message-Id: <20230202133830.2152150-6-armbru@redhat.com>

show more ...


Revision tags: v7.2.0, v7.0.0
# ee3eb3a7 23-Mar-2022 Marc-André Lureau <marcandre.lureau@redhat.com>

Replace TARGET_WORDS_BIGENDIAN

Convert the TARGET_WORDS_BIGENDIAN macro, similarly to what was done
with HOST_BIG_ENDIAN. The new TARGET_BIG_ENDIAN macro is either 0 or 1,
and thus should always be

Replace TARGET_WORDS_BIGENDIAN

Convert the TARGET_WORDS_BIGENDIAN macro, similarly to what was done
with HOST_BIG_ENDIAN. The new TARGET_BIG_ENDIAN macro is either 0 or 1,
and thus should always be defined to prevent misuse.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Suggested-by: Halil Pasic <pasic@linux.ibm.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220323155743.1585078-8-marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...


# 9edc6313 20-Feb-2022 Marc-André Lureau <marcandre.lureau@redhat.com>

Replace GCC_FMT_ATTR with G_GNUC_PRINTF

One less qemu-specific macro. It also helps to make some headers/units
only depend on glib, and thus moved in standalone projects eventually.

Signed-off-by:

Replace GCC_FMT_ATTR with G_GNUC_PRINTF

One less qemu-specific macro. It also helps to make some headers/units
only depend on glib, and thus moved in standalone projects eventually.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Richard W.M. Jones <rjones@redhat.com>

show more ...


# 0ff05082 31-Jan-2022 Warner Losh <imp@bsdimp.com>

bsd-user: Define target_arg64

target_arg64 is a generic way to extract 64-bits from a pair of
arguments. On 32-bit platforms, it returns them joined together as
appropriate. On 64-bit platforms, it

bsd-user: Define target_arg64

target_arg64 is a generic way to extract 64-bits from a pair of
arguments. On 32-bit platforms, it returns them joined together as
appropriate. On 64-bit platforms, it returns the first arg because it's
already 64-bits.

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

show more ...


# 647afdf1 31-Jan-2022 Warner Losh <imp@bsdimp.com>

bsd-user: introduce target.h

Create target.h. This file is intended to be simple and describe basic
things about the architecture. If something is a basic feature of the
architecture, it belongs her

bsd-user: introduce target.h

Create target.h. This file is intended to be simple and describe basic
things about the architecture. If something is a basic feature of the
architecture, it belongs here. Should we need something that's per-BSD
there will be a target-os.h that will live in the per-bsd directories.

Define regpairs_aligned to reflect whether or not registers are 'paired'
for 64-bit arguments or not. This will be false for all 64-bit targets,
and will be true on those architectures that pair (currently just armv7
and powerpc on FreeBSD 14.x).

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

show more ...


# deeff83b 31-Jan-2022 Warner Losh <imp@bsdimp.com>

bsd-user/freebsd/os-syscall.c: Add get_errno and host_to_target_errno

Add the helper functions get_errno and host_to_target_errno. get_errno
returns either the system call results, or the -errno whe

bsd-user/freebsd/os-syscall.c: Add get_errno and host_to_target_errno

Add the helper functions get_errno and host_to_target_errno. get_errno
returns either the system call results, or the -errno when system call
indicates failure by returning -1. Host_to_target_errno returns errno
(since on FreeBSD they are the same on all architectures) along with a
comment about why it's the identity.

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

show more ...


# a941a16f 30-Jan-2022 Warner Losh <imp@bsdimp.com>

bsd-user: Remove bsd_type

Remove keeping track of which type of bsd we're running on. It's no
longer referenced in the code. Building bsd-user on NetBSD or OpenBSD
isn't possible, let alone running

bsd-user: Remove bsd_type

Remove keeping track of which type of bsd we're running on. It's no
longer referenced in the code. Building bsd-user on NetBSD or OpenBSD
isn't possible, let alone running that code. Stop pretending that we can
do the cross BSD thing since there's been a large divergence since 2000
that makes this nearly impossible between FreeBSD and {Net,Open}BSD and
at least quite difficult between NetBSD and OpenBSD.

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

show more ...


# 6c6d4b56 08-Jan-2022 Warner Losh <imp@bsdimp.com>

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.c

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>

show more ...


# 46f4f76d 08-Jan-2022 Warner Losh <imp@bsdimp.com>

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

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>

show more ...


# 38be620c 08-Jan-2022 Warner Losh <imp@bsdimp.com>

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>
Signe

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>

show more ...


12345678