ally merged before, finishing the job and documenting origin]
Signed-off-by: Warner Losh
---
bsd-user/mmap.c | 30 +-
1 file changed, 25 insertions(+), 5 deletions(-)
diff --git a/bsd-user/mmap.c b/bsd-user/mmap.c
index face98573f..4ecd949a10 100644
--- a/bsd-user/mmap.c
+
-off-by: Warner Losh
---
bsd-user/mmap.c | 12
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/bsd-user/mmap.c b/bsd-user/mmap.c
index 4ecd949a10..066d9c10ff 100644
--- a/bsd-user/mmap.c
+++ b/bsd-user/mmap.c
@@ -403,7 +403,7 @@ abi_ulong mmap_find_vma(abi_ulong start
MAP_ANON and MAP_ANONYMOUS are identical. Prefer MAP_ANON for BSD since
the file is now a confusing mix of the two.
Signed-off-by: Warner Losh
Reviewed-by: Philippe Mathieu-Daudé
Reviewed-by: Richard Henderson
---
bsd-user/mmap.c | 11 +--
1 file changed, 5 insertions(+), 6 deletions
Convert DEBUG_MMAP to qemu_log CPU_LOG_PAGE.
Signed-off-by: Warner Losh
---
bsd-user/mmap.c | 53 +
1 file changed, 23 insertions(+), 30 deletions(-)
diff --git a/bsd-user/mmap.c b/bsd-user/mmap.c
index 301108ed25..face98573f 100644
--- a/bsd
On Sun, Oct 17, 2021 at 9:43 PM Kyle Evans wrote:
> On Fri, Oct 8, 2021 at 6:15 PM Warner Losh wrote:
> >
> > To increase flexibility, only descend into *-user when that is
> > configured. This allows *-user to selectively include directories based
> > on the host OS
On Sun, Oct 17, 2021 at 10:29 PM Warner Losh wrote:
>
>
> On Sun, Oct 17, 2021 at 9:43 PM Kyle Evans wrote:
>
>> On Fri, Oct 8, 2021 at 6:15 PM Warner Losh wrote:
>> >
>> > To increase flexibility, only descend into *-user when that is
>> > configur
On Sun, Oct 17, 2021 at 11:26 PM Kyle Evans wrote:
> On Mon, Oct 18, 2021 at 12:02 AM Warner Losh wrote:
> >
> >
> >
> > On Sun, Oct 17, 2021 at 10:29 PM Warner Losh wrote:
> >>
> >>
> >>
> >> On Sun, Oct 17, 2021 at 9:43 PM Kyle
On Fri, Sep 24, 2021 at 6:00 AM Richard Henderson <
richard.hender...@linaro.org> wrote:
> On 9/21/21 11:14 PM, Warner Losh wrote:
> > Create dummy signal queueing function so we can start to integrate other
> > architectures (at the cost of signals remaining broken) to ta
On Fri, Sep 24, 2021 at 6:00 AM Richard Henderson <
richard.hender...@linaro.org> wrote:
> On 9/21/21 9:56 PM, Warner Losh wrote:
> > +/* Reject the mapping if any page within the range is mapped */
> > +if (flags & MAP_EXCL) {
> > +for
On Sun, Sep 26, 2021 at 5:08 PM Richard Henderson <
richard.hender...@linaro.org> wrote:
> On 9/26/21 6:01 PM, Philippe Mathieu-Daudé wrote:
> > Reported-by: Warner Losh
> > Signed-off-by: Philippe Mathieu-Daudé
> > ---
> > bsd-user/meson.build | 4
&
On Sun, Sep 26, 2021 at 1:07 PM Guy Yur wrote:
> On 26/9/21 20:08, Warner Losh wrote:
> >
> >
> > On Fri, Sep 24, 2021 at 6:00 AM Richard Henderson
> > wrote:
> >
> > On 9/21/21 9:56 PM, Warner Losh wrote:
> > >
On Fri, Sep 24, 2021 at 5:59 AM Richard Henderson <
richard.hender...@linaro.org> wrote:
> On 9/21/21 9:56 PM, Warner Losh wrote:
> > Keep the shifted expression on one line. It's the same number of lines
> > and easier to read like this.
> >
> > Signed-off-by: Wa
On Sat, Sep 25, 2021 at 4:46 AM Philippe Mathieu-Daudé
wrote:
> Hi Warner,
>
> On 9/22/21 08:14, Warner Losh wrote:
> > Add the missing glue to pull in do_freebsd_sysarch to call
> > do_freebsd_arch_sysarch. Put it in os-sys.c, which will be used for
> > sysctl and s
On Sat, Sep 25, 2021 at 4:33 AM Philippe Mathieu-Daudé
wrote:
> On 9/22/21 08:14, Warner Losh wrote:
> > Make get_errno and is_error global so files other than syscall.c can use
> > them.
> >
> > Signed-off-by: Warner Losh
> > ---
> > bsd-user/qemu.h
On Sun, Sep 26, 2021 at 12:34 PM Philippe Mathieu-Daudé
wrote:
> On Sun, Sep 26, 2021 at 8:14 PM Warner Losh wrote:
> > On Fri, Sep 24, 2021 at 6:00 AM Richard Henderson <
> richard.hender...@linaro.org> wrote:
> >> On 9/21/21 11:14 PM, Warner Losh wrote:
> >
> On Sep 14, 2021, at 11:27 AM, Philippe Mathieu-Daudé wrote:
>
> On 9/14/21 7:13 PM, Peter Maydell wrote:
>> On Tue, 14 Sept 2021 at 16:53, Richard Henderson
>> wrote:
>>>
>>> Version 3: Rebase and fix a minor patch conflict.
>>>
>>>
>>> r~
>>>
>>>
>>> The following changes since
On Fri, Sep 24, 2021 at 6:00 AM Richard Henderson <
richard.hender...@linaro.org> wrote:
> On 9/21/21 9:56 PM, Warner Losh wrote:
> > /* no page was there, so we allocate one */
> > void *p = mmap(host_start, qemu_host_page_size, prot,
> > -
On Sat, Sep 25, 2021 at 4:35 AM Philippe Mathieu-Daudé
wrote:
> On 9/22/21 08:14, Warner Losh wrote:
> > Move TARGET_MC_GET_CLEAR_RET to freebsd/target_os_signal.h since it's
> > FreeBSD-wide.
>
> "architecture agnostic (on FreeBSD)" instead?
>
I
On Mon, Sep 27, 2021 at 4:08 AM Peter Maydell
wrote:
> On Mon, 27 Sept 2021 at 10:59, Daniel P. Berrangé
> wrote:
> > If we look at linux-user/meson.build though things are more complex.
> > There we have alot of sub-dirs, and meson.biuld in those dirs adds
> > generators for various files. So
On Tue, Sep 28, 2021 at 8:48 AM Joe Tanen wrote:
> Hello,
>
>
>
> I posted this on qemu-discuss, but it doesn't seem like anybody else has
> seen this issue. I figured I'd try here to see if anybody had any thoughts.
>
>
>
> I'm using qemu-system-aarch64 v5.2 on OSX 11.6. While reading
MAP_ANON and MAP_ANONYMOUS are identical. Prefer MAP_ANON for BSD since
the file is now a confusing mix of the two.
Signed-off-by: Warner Losh
Reviewed-by: Philippe Mathieu-Daudé
---
bsd-user/mmap.c | 11 +--
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/bsd-user/mmap.c
Some architecutres publish AT_HWCAP2 as well as AT_HWCAP. Those
architectures will define this in their target_arch_elf.h files. If it
is defined, then publish it.
Signed-off-by: Warner Losh
---
bsd-user/freebsd/target_os_elf.h | 4
1 file changed, 4 insertions(+)
diff --git a/bsd-user
All architectures have a ELF_HWCAP, so remove the fallback ifdef.
Place ELF_HWCAP in the same order as on native FreeBSD.
Signed-off-by: Warner Losh
---
bsd-user/freebsd/target_os_elf.h | 8 ++--
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/bsd-user/freebsd/target_os_elf.h
Make get_errno and is_error global so files other than syscall.c can use
them.
Signed-off-by: Warner Losh
---
bsd-user/qemu.h| 4
bsd-user/syscall.c | 10 +-
2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/bsd-user/qemu.h b/bsd-user/qemu.h
index 522d6c4031
From: Mikaël Urankar
Similar to the equivalent linux-user commit e6deac9cf99
When mapping MAP_ANONYMOUS memory fragments, still need notice about to
set it zero, or it will cause issues.
Signed-off-by: Mikaël Urankar
Signed-off-by: Warner Losh
---
bsd-user/mmap.c | 4 +++-
1 file changed, 3
Keep the shifted expression on one line. It's the same number of lines
and easier to read like this.
Signed-off-by: Warner Losh
---
bsd-user/mmap.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/bsd-user/mmap.c b/bsd-user/mmap.c
index bafbdacd31..8b763fffc3 100644
anyway if it happens).
Fixes a Coverity false positive, where Coverity complains about
target_mprotect's return value being passed to tb_invalidate_phys_range.
Signed-off-by: Mikaël Urankar
Signed-off-by: Warner Losh
---
bsd-user/mmap.c | 5 +
1 file changed, 1 insertion(+), 4 deletions
Signed-off-by: Warner Losh
---
bsd-user/i386/target_arch_cpu.h | 2 --
bsd-user/x86_64/target_arch_cpu.h | 2 --
2 files changed, 4 deletions(-)
diff --git a/bsd-user/i386/target_arch_cpu.h b/bsd-user/i386/target_arch_cpu.h
index 978e8066af..b28602adbb 100644
--- a/bsd-user/i386
Convert the #ifdef'd i386 code to calling the i386 sysarch code we have
living in i386,x86_64/target_arch_sysarch.h do_freebsd_arch_sysarch
rather than having a separate copy. This is in preparation to remove it
entirely.
Signed-Off-By: Warner Losh
---
bsd-user/syscall.c | 45
From: Guy Yur
Switch checks for !(flags & MAP_ANONYMOUS) with checks for fd != -1.
MAP_STACK and MAP_GUARD both require fd == -1 and don't require mapping
the fd either.
Signed-off-by: Guy Yur
[ partially merged before, finishing the job and documenting origin]
Signed-off-by: Warner
From: Kyle Evans
jemalloc requires a working MAP_EXCL. Ensure that no page is double
mapped when specified.
Signed-off-by: Kyle Evans
Signed-off-by: Warner Losh
---
bsd-user/mmap.c | 10 +-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/bsd-user/mmap.c b/bsd-user/mmap.c
Signed-off-by: Warner Losh
---
bsd-user/freebsd/strace.list | 11 ---
1 file changed, 11 deletions(-)
diff --git a/bsd-user/freebsd/strace.list b/bsd-user/freebsd/strace.list
index b01b5f36e8..275d2dbe27 100644
--- a/bsd-user/freebsd/strace.list
+++ b/bsd-user/freebsd/strace.list
Add the missing glue to pull in do_freebsd_sysarch to call
do_freebsd_arch_sysarch. Put it in os-sys.c, which will be used for
sysctl and sysarch system calls because they are mostly arch specific.
Signed-off-by: Stacey Son
Signed-off-by: Warner Losh
---
bsd-user/freebsd/meson.build | 3
The used field of TaskState is write only. Eliminate it.
Signed-off-by: Warner Losh
---
bsd-user/main.c | 1 -
bsd-user/qemu.h | 1 -
2 files changed, 2 deletions(-)
diff --git a/bsd-user/main.c b/bsd-user/main.c
index 48643eeabc..ee84554854 100644
--- a/bsd-user/main.c
+++ b/bsd-user/main.c
Create dummy signal queueing function so we can start to integrate other
architectures (at the cost of signals remaining broken) to tame the
dependency graph a bit and to bring in signals in a more controlled
fashion.
Signed-off-by: Warner Losh
---
bsd-user/qemu.h | 1 +
bsd-user/signal.c | 8
mmap should return ENOMEM on len overflow rather than EINVAL. Return
EINVAL when len == 0 and ENOMEM when the rounded to a page length is 0.
Found by make check-tcg.
Signed-off-by: Warner Losh
---
bsd-user/mmap.c | 9 -
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/bsd
From: Mikaël Urankar
Simmilar to the equivalent linux-user: commit fb7e378cf9c, which added
checking to pread's return value.
Signed-off-by: Mikaël Urankar
Signed-off-by: Warner Losh
---
bsd-user/mmap.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/bsd-user/mmap.c
return value to fix warnings with
_FORTIFY_SOURCE
Warner Losh (5):
bsd-user/mmap.c: MAP_ symbols are defined, so no need for ifdefs
bsd-user/mmap.c: mmap return ENOMEM on overflow
bsd-user/mmap.c: mmap prefer MAP_ANON for BSD
bsd-user/mmap.c: line wrap change
bsd-user/mmap.c: assert
From: Stacey Son
To emulate signals and interrupted system calls, we need to have the
same mechanisms we have in the kernel, including these errno values.
Signed-off-by: Stacey Son
Signed-off-by: Warner Losh
---
bsd-user/errno_defs.h | 14 +++---
1 file changed, 11 insertions(+), 3
All these MAP_ symbols are always defined on supported FreeBSD versions
(12.2 and newer), so remove the #ifdefs since they aren't needed.
Signed-off-by: Warner Losh
Reviewed-by: Philippe Mathieu-Daudé
---
bsd-user/mmap.c | 14 --
1 file changed, 14 deletions(-)
diff --git a/bsd
.
The aarch64 patch set will be published soon after some of the dust settles.
Stacey Son (1):
bsd-user/errno_defs.h: Add internal error numbers
Warner Losh (13):
bsd-user/target_os-user.h: Remove support for FreeBSD older than 12.0
bsd-user/strace.list: Remove support for FreeBSD versions older than
Signed-off-by: Warner Losh
---
bsd-user/freebsd/target_os_user.h | 100 +-
1 file changed, 1 insertion(+), 99 deletions(-)
diff --git a/bsd-user/freebsd/target_os_user.h
b/bsd-user/freebsd/target_os_user.h
index 95b1fa9f99..19892c5071 100644
--- a/bsd-user/freebsd
Move TARGET_MC_GET_CLEAR_RET to freebsd/target_os_signal.h since it's
FreeBSD-wide.
Signed-off-by: Warner Losh
---
bsd-user/freebsd/target_os_signal.h | 3 +++
bsd-user/i386/target_arch_signal.h | 2 --
bsd-user/x86_64/target_arch_signal.h | 2 --
3 files changed, 3 insertions(+), 4
To avoid a name clash with FreeBSD's sigqueue data structure in
signalvar.h, rename sigqueue to qemu_sigqueue. This sturcture
is currently defined, but unused.
Signed-off-by: Warner Losh
---
bsd-user/qemu.h | 14 +++---
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/bsd
Similar to the same function in linux-user: this stops all the current tasks.
Signed-off-by: Stacey Son
Signed-off-by: Warner Losh
---
bsd-user/main.c | 9 +
bsd-user/qemu.h | 1 +
2 files changed, 10 insertions(+)
diff --git a/bsd-user/main.c b/bsd-user/main.c
index ee84554854
On Tue, Oct 5, 2021 at 2:41 PM Laurent Vivier wrote:
> Le 05/10/2021 à 21:26, Paolo Bonzini a écrit :
> > On 27/09/21 11:52, Daniel P. Berrangé wrote:
> >>bsd_user_ss.add(files('gdbstub.c'))
> >>specific_ss.add_all(when: 'CONFIG_BSD_USER', if_true: bsd_user_ss)
> >>
> >>
> >> So without
On Sat, Sep 25, 2021 at 8:53 AM Warner Losh wrote:
>
>
> On Sat, Sep 25, 2021, 4:50 AM Philippe Mathieu-Daudé
> wrote:
>
>> On 9/22/21 08:14, Warner Losh wrote:
>> > Create dummy signal queueing function so we can start to integrate other
>> > architec
On Fri, Sep 24, 2021 at 5:59 AM Richard Henderson <
richard.hender...@linaro.org> wrote:
> On 9/21/21 9:56 PM, Warner Losh wrote:
> > From: Mikaël Urankar
> >
> > Simmilar to the equivalent linux-user: commit fb7e378cf9c, which added
> > checking to pread's
27, 2021 at 1:19 PM Warner Losh wrote:
> This series adds a number of simple binaries that FreeBSD's clang can
> build on
> any system. I've kept it simple so that there's no extra binaries that
> need to
> be installed. Given the current state of bsd-user in the project's repo,
On Tue, Jan 4, 2022 at 10:21 AM Alex Bennée wrote:
>
> Warner Losh writes:
>
> > PING!
> >
> > If anybody (especially the BSD reviewers) could look at these, that
> would be great!
> >
> > It's been suggested I rename bsd-user-smoke to just be bsd-user
On Tue, Jan 4, 2022 at 4:25 PM Philippe Mathieu-Daudé
wrote:
> +Paolo for meson
>
> On 11/27/21 21:18, Warner Losh wrote:
> > Add a simple bsd-user smoke test for ensuring bsd-user is minimally
> > functional. This runs only when bsd-user has been configured. It adds a
deletions(-)
>
Reviewed-by: Warner Losh
> diff --git a/.gitlab-ci.d/cirrus.yml b/.gitlab-ci.d/cirrus.yml
> index d273a9e713..18ded37c77 100644
> --- a/.gitlab-ci.d/cirrus.yml
> +++ b/.gitlab-ci.d/cirrus.yml
> @@ -52,14 +52,11 @@ x64-freebsd-12-build:
> NAME: freebsd-12
>
On Mon, Jan 3, 2022 at 1:57 PM Philippe Mathieu-Daudé
wrote:
> On 3/1/22 21:45, Brad Smith wrote:
> > FreeBSD: Upgrade to 12.3 release
>
> Maybe some mention like:
>
> '''
> Note, since libasn1 got fixed in 12.3 [*], this commit re-enables GNUTLS.
>
> [*]
>
On Wed, Nov 17, 2021 at 10:46 AM Philippe Mathieu-Daudé
wrote:
> Signed-off-by: Philippe Mathieu-Daudé
> ---
> qemu-keymap.c | 1 +
> 1 file changed, 1 insertion(+)
>
Reviewed-by: Warner Losh
> diff --git a/qemu-keymap.c b/qemu-keymap.c
> index 536e8f2385d..4095b654a6
fe-syscall.inc.S | 2 +-
> common-user/host/x86_64/safe-syscall.inc.S | 2 +-
> 32 files changed, 46 insertions(+), 46 deletions(-)
>
Reviewed-by: Warner Losh
> diff --git a/bsd-user/errno_defs.h b/bsd-user/errno_defs.h
> index 832671354f..583ebe8cee 100644
> --- a/bsd-us
-
> linux-user/xtensa/signal.c | 4 ++--
> 35 files changed, 70 insertions(+), 70 deletions(-)
>
Reviewed-by: Warner Losh
> diff --git a/linux-user/generic/target_errno_defs.h
> b/linux-user/generic/target_errno_defs.h
> index 58a06a10d6..bb37d88be9 100644
> -
| 3 ---
> linux-user/meson.build | 4
> 2 files changed, 4 insertions(+), 3 deletions(-)
>
Reviewed-by: Warner Losh
BTW, I don't think I have anything meaningful to add to the discussions to
date on this bug, and I'm
agnostic as to the final decision...
> diff --git
On Wed, Nov 17, 2021 at 9:04 AM Richard Henderson <
richard.hender...@linaro.org> wrote:
> From: Warner Losh
>
> Move all the safe_syscall.inc.S files to common-user. They are almost
> identical between linux-user and bsd-user to re-use.
>
> Signed-off-by: Warner Losh
On Wed, Nov 17, 2021 at 9:04 AM Richard Henderson <
richard.hender...@linaro.org> wrote:
> From: Warner Losh
>
> Add a new function host_signal_set_pc to set the next pc in an
> mcontext. The caller should ensure this is a valid PC for execution.
>
> Signed-off-by:
On Wed, Nov 17, 2021 at 9:04 AM Richard Henderson <
richard.hender...@linaro.org> wrote:
> From: Warner Losh
>
> All instances of rewind_if_in_safe_syscall are the same, differing only
> in how the instruction point is fetched from the ucontext and the size
> of the register
host/x86_64/safe-syscall.inc.S | 70 -
> 8 files changed, 243 insertions(+), 174 deletions(-)
>
Reviewed by: Warner Losh
And I think it may fix a bug, when integrated with bsd-user fork,
in PowerPC hosts (though there's other bugs lingering there).
> diff --git a/linux-
+++-
> bsd-user/meson.build| 2 ++
> common-user/meson.build | 1 +
> linux-user/meson.build | 3 +++
> 4 files changed, 21 insertions(+), 1 deletion(-)
> create mode 100644 common-user/meson.build
>
Reviewed-by: Warner Losh
> diff --git a/meson.build b/meso
+++-
> bsd-user/special-errno.h | 24
> 2 files changed, 29 insertions(+), 1 deletion(-)
> create mode 100644 bsd-user/special-errno.h
>
Reviewed by: Warner Losh
> diff --git a/bsd-user/errno_defs.h b/bsd-user/errno_defs.h
> index 583ebe8cee..73cfa
| 3 ---
> bsd-user/meson.build | 4
> 2 files changed, 4 insertions(+), 3 deletions(-)
>
Reviewed-by: Warner Losh
> diff --git a/meson.build b/meson.build
> index ecc181ea13..9f7756a805 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -2356,7 +2356,6 @@ genh += hx
anged, 137 insertions(+)
> create mode 100644 common-user/host/mips/hostdep.h
> create mode 100644 common-user/host/mips/safe-syscall.inc.S
>
Reviewed-by: Warner Losh
> diff --git a/common-user/host/mips/hostdep.h
> b/common-user/host/mips/hostdep.h
> new file mode 100644
> in
On Wed, Nov 17, 2021 at 9:04 AM Richard Henderson <
richard.hender...@linaro.org> wrote:
> From: Warner Losh
>
> FreeBSD system calls return positive errno. On the 4 hosts for
> which we have support, error is indicated by the C bit set or clear.
>
> Signed-off-by: War
| 1 +
> linux-user/safe-syscall.S | 2 +-
> 6 files changed, 37 insertions(+), 18 deletions(-)
> create mode 100644 linux-user/special-errno.h
>
Reviewed-by: Warner Losh
> diff --git a/linux-user/cpu_loop-common.h b/linux-user/cpu_loop-common.h
> index 8828af28a4..
ld | 1 -
> thunk.c => linux-user/thunk.c | 0
> linux-user/meson.build| 1 +
> 3 files changed, 1 insertion(+), 1 deletion(-)
> rename thunk.c => linux-user/thunk.c (100%)
>
Reviewed-by: Warner Losh
> diff --git a/meson.build b/meson.build
> inde
mode 100644 linux-user/host/mips/hostdep.h
> delete mode 100644 linux-user/host/ppc/hostdep.h
> delete mode 100644 linux-user/host/s390/hostdep.h
> delete mode 100644 linux-user/host/sparc/hostdep.h
> delete mode 100644 linux-user/host/sparc64/hostdep.h
> delete mode 100644
| 2 ++
> {linux-user => common-user}/safe-syscall.S | 0
> linux-user/meson.build | 1 -
> 6 files changed, 4 insertions(+), 3 deletions(-)
> rename {linux-user => include/user}/safe-syscall.h (100%)
> rename {linux-user => common-user}
On Wed, Nov 17, 2021 at 5:49 AM Richard Henderson <
richard.hender...@linaro.org> wrote:
> On 11/16/21 10:03 PM, Warner Losh wrote:
> > I had to add this:
> >
> > diff --git a/meson.build b/meson.build
> > index 0a88bff8d2..349e7a988f 100644
> >
evel
> meson: Move linux_user_ss to linux-user/
> meson: Move bsd_user_ss to bsd-user/
>
In addition to the reviews, I've pulled these changes, and
as a whole they build and work on FreeBSD with my small
test binaries for x86.
It also works with my in-flight arm addition.
I've not tried
On Tue, Nov 9, 2021 at 1:11 AM Richard Henderson <
richard.hender...@linaro.org> wrote:
> On 11/8/21 7:49 PM, Warner Losh wrote:
> > > /* code path for having successfully executed the syscall */
> > > + ADJUST_SYSCALL_RETCODE
> > >
Move all the safe_syscall.inc.S files to common-user. They are almost
identical between linux-user and bsd-user to re-use.
Signed-off-by: Warner Losh
---
{linux-user => common-user}/host/aarch64/safe-syscall.inc.S | 0
{linux-user => common-user}/host/arm/safe-syscall.inc.S | 0
{linu
Move linux-user/safe-syscall.S to common-user/common-safe-syscall.S and
replace it with a #include "common-safe-syscall.S" so that bsd-user can
also use it. Also move safe-syscall.h so that it can define a few more
externs.
Signed-off-by: Warner Losh
---
common-user/common-safe
as a supported platform instead)
o side note: the blitz bsd-user branch hasn't been updated yet since
I think the first two of this series may be merged early to solve
a different problem.
Warner Losh (6):
linux-user: Add host_signal_set_pc to set pc in mcontext
linux
On Mon, Nov 8, 2021 at 9:39 AM Warner Losh wrote:
>
>
> On Mon, Nov 8, 2021 at 8:07 AM Richard Henderson <
> richard.hender...@linaro.org> wrote:
>
>> On 11/8/21 3:37 AM, Warner Losh wrote:
>> > All instances of rewind_if_in_safe_syscall are the same, differ
Add a new function host_signal_set_pc to set the next pc in an
mcontext. The caller should ensure this is a valid PC for execution.
Signed-off-by: Warner Losh
Reviewed-by: Philippe Mathieu-Daudé
Reviewed-by: Richard Henderson
---
linux-user/host/aarch64/host-signal.h | 5 +
linux-user
All the *-users generally use the Linux style of negative return codes
for errno. FreeBSD returns errno, not -errno. Add ifdefs for FreeBSD to
make the adjustment on the 4 hosts that we have support for.
Signed-off-by: Warner Losh
---
common-user/host/aarch64/safe-syscall.inc.S | 5
Signed-off-by: Warner Losh
---
common-user/host/mips/safe-syscall.inc.S | 1 +
1 file changed, 1 insertion(+)
create mode 100644 common-user/host/mips/safe-syscall.inc.S
diff --git a/common-user/host/mips/safe-syscall.inc.S
b/common-user/host/mips/safe-syscall.inc.S
new file mode 100644
index
On Wed, Nov 10, 2021 at 8:19 AM Richard Henderson <
richard.hender...@linaro.org> wrote:
> On 11/10/21 4:12 PM, Richard Henderson wrote:
> > On 11/10/21 10:25 AM, Richard Henderson wrote:
> >> On 11/8/21 8:42 PM, Khem Raj wrote:
> >>> uint64_t is available in all userspaces via compiler include
of rewind_if_in_safe_syscall.
Signed-off-by: Warner Losh
Reviewed-by: Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé
---
linux-user/host/aarch64/hostdep.h | 20
linux-user/host/arm/hostdep.h | 20
linux-user/host/i386/hostdep.h| 20
On Wed, Nov 10, 2021 at 10:00 AM Richard Henderson <
richard.hender...@linaro.org> wrote:
> On 11/10/21 5:31 PM, Warner Losh wrote:
> > Signed-off-by: Warner Losh
> > ---
> > common-user/host/mips/safe-syscall.inc.S | 1 +
> > 1 file changed, 1 insertion(+
On Wed, Nov 10, 2021 at 9:42 AM Richard Henderson <
richard.hender...@linaro.org> wrote:
> On 11/10/21 5:31 PM, Warner Losh wrote:
> > +static inline void host_signal_set_pc(ucontext_t *uc, uintptr_t pc)
> > +{
> > +#ifdef __arch64__
> > +uc->uc_mcont
On Wed, Nov 10, 2021 at 9:59 AM Richard Henderson <
richard.hender...@linaro.org> wrote:
> On 11/10/21 5:31 PM, Warner Losh wrote:
> > All the *-users generally use the Linux style of negative return codes
> > for errno. FreeBSD returns errno, not -errno. Add ifdefs fo
On Wed, Nov 10, 2021 at 10:04 AM Richard Henderson <
richard.hender...@linaro.org> wrote:
> On 11/10/21 5:31 PM, Warner Losh wrote:
> > Move linux-user/safe-syscall.S to common-user/common-safe-syscall.S and
> > replace it with a #include "common-safe-syscall.S" so
A simple, tiny, statically linked armv7 'hello world' test. It uses two
system calls (write and exit) and provides a basic sanity check to make
sure that the arm bsd-user binary can interpret FreeBSD armv7 binaries.
Signed-off-by: Warner Losh
---
tests/bsd-user-smoke/h.armv7.S | 37
.
The purpose of this is to give others doing changes in this area a standardized
way to ensure their changes don't fundamentally break bsd-user. This approach
will work for all setups that do a 'make check' to do their testing.
Based-on: 20211108035136.43687-1-...@bsdimp.com
Warner Losh (5):
h.armv7
.
Signed-off-by: Warner Losh
---
tests/bsd-user-smoke/meson.build | 31 +++
tests/meson.build| 1 +
2 files changed, 32 insertions(+)
create mode 100644 tests/bsd-user-smoke/meson.build
diff --git a/tests/bsd-user-smoke/meson.build b/tests/bsd-user-smoke
A simple, tiny, statically linked i386 'hello world' test. It uses two
system calls (write and exit) and provides a basic sanity check to make
sure that the arm bsd-user binary can interpret FreeBSD 32-bit i386
binaries.
Signed-off-by: Warner Losh
---
tests/bsd-user-smoke/h.i386.S | 39
for FreeBSD's clang and it simplifies building a little.
Signed-off-by: Warner Losh
---
tests/bsd-user-smoke/h.amd64.S | 28
1 file changed, 28 insertions(+)
create mode 100644 tests/bsd-user-smoke/h.amd64.S
diff --git a/tests/bsd-user-smoke/h.amd64.S b/tests/bsd-user-smoke
Simple shell script to iterate through all the FreeBSD binaries running
qemu-$binary to ensure that we have minimal functionality for each
platform. When more of the bsd-user fork has been upstreamed, this
will be replaced by more extensive regresion tests.
Signed-off-by: Warner Losh
---
tests
+-
> linux-user/host/x86_64/safe-syscall.inc.S | 2 +-
> 7 files changed, 396 insertions(+), 396 deletions(-)
>
Reviewed-by: Warner Losh
riscv/safe-syscall.inc.S | 20 ++--
> linux-user/host/s390x/safe-syscall.inc.S | 32 ---
> linux-user/host/x86_64/safe-syscall.inc.S | 29 +
> linux-user/meson.build | 1 +
> 10 files changed, 145 insertions(+), 85 deletion
anged, 126 insertions(+)
> create mode 100644 linux-user/host/mips/safe-syscall.inc.S
>
Reviewed-by: Warner Losh
On Wed, Nov 24, 2021 at 7:56 AM Philippe Mathieu-Daudé
wrote:
> On 11/24/21 15:16, Cleber Rosa wrote:
> > Hi,
> >
> > Fosshost.org was kind enough to supply the QEMU project with a public
> > VM hosted by them. The original use case we anticipated was to set up
> > a GitLab CI runner, because
On Mon, Nov 22, 2021 at 6:12 AM Richard Henderson <
richard.hender...@linaro.org> wrote:
> From: Warner Losh
>
> Add a new function host_signal_set_pc to set the next pc in an
> mcontext. The caller should ensure this is a valid PC for execution.
>
> Signed-off-by:
On Mon, Nov 22, 2021 at 6:12 AM Richard Henderson <
richard.hender...@linaro.org> wrote:
> From: Warner Losh
>
> All instances of rewind_if_in_safe_syscall are the same, differing only
> in how the instruction point is fetched from the ucontext and the size
> of the register
ould
remove mips hosts as a supported platform instead)
o side note: the blitz bsd-user branch hasn't been updated yet since
I think the first two of this series may be merged early to solve
a different problem.
Warner Losh (5):
linux-user: Add host_signal_set_pc to se
Move all the safe_syscall.inc.S files to common-user. They are almost
identical between linux-user and bsd-user to re-use.
Signed-off-by: Warner Losh
Reviewed-by: Richard Henderson
---
{linux-user => common-user}/host/aarch64/safe-syscall.inc.S | 0
{linux-user => common-user}/host/ar
401 - 500 of 1609 matches
Mail list logo