[PATCH v3 7/9] bsd-user/mmap.c: Don't mmap fd == -1 independently from MAP_ANON flag

2021-10-08 Thread Warner Losh
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 +

[PATCH v3 8/9] bsd-user/mmap.c: Implement MAP_EXCL, required by jemalloc in head

2021-10-08 Thread Warner Losh
-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

[PATCH v3 5/9] bsd-user/mmap.c: mmap prefer MAP_ANON for BSD

2021-10-08 Thread Warner Losh
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

[PATCH v3 6/9] bsd-user/mmap.c: Convert to qemu_log logging for mmap debugging

2021-10-08 Thread Warner Losh
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

Re: [PATCH v2 01/15] meson: *-user: only descend into *-user when configured

2021-10-17 Thread Warner Losh
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

Re: [PATCH v2 01/15] meson: *-user: only descend into *-user when configured

2021-10-17 Thread Warner Losh
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

Re: [PATCH v2 01/15] meson: *-user: only descend into *-user when configured

2021-10-18 Thread Warner Losh
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

Re: [PATCH 14/14] bsd-user/signal: Create a dummy signal queueing function

2021-09-26 Thread Warner Losh
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

Re: [PATCH v2 8/9] bsd-user/mmap.c: Implement MAP_EXCL, required by jemalloc in head

2021-09-26 Thread Warner Losh
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

Re: [PATCH 1/2] bsd-user: Only process meson rules on BSD host

2021-09-26 Thread Warner Losh
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 &

Re: [PATCH v2 7/9] bsd-user/mmap.c: Don't mmap fd == -1 independently from MAP_ANON flag

2021-09-26 Thread Warner Losh
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: > > >

Re: [PATCH v2 6/9] bsd-user/mmap.c: line wrap change

2021-09-26 Thread Warner Losh
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

Re: [PATCH 12/14] bsd-user/sysarch: Provide a per-arch framework for sysarch syscall

2021-09-26 Thread Warner Losh
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

Re: [PATCH 04/14] bsd-user: export get_errno and is_error from syscall.c

2021-09-26 Thread Warner Losh
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

Re: [PATCH 14/14] bsd-user/signal: Create a dummy signal queueing function

2021-09-26 Thread Warner Losh
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: > >

Re: [PULL v3 00/44] tcg patch queue

2021-09-26 Thread Warner Losh
> 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

Re: [PATCH v2 7/9] bsd-user/mmap.c: Don't mmap fd == -1 independently from MAP_ANON flag

2021-09-26 Thread Warner Losh
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, > > -

Re: [PATCH 06/14] bsd-user: move TARGET_MC_GET_CLEAR_RET to target_os_signal.h

2021-09-26 Thread Warner Losh
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

Re: [PATCH 1/2] bsd-user: Only process meson rules on BSD host

2021-09-27 Thread Warner Losh
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

Re: Issue with time going backwards on OSX

2021-09-28 Thread Warner Losh
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

[PATCH v2 5/9] bsd-user/mmap.c: mmap prefer MAP_ANON for BSD

2021-09-21 Thread Warner Losh
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

[PATCH 08/14] bsd-user/target_os_elf: If ELF_HWCAP2 is defined, publish it

2021-09-22 Thread Warner Losh
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

[PATCH 07/14] bsd-user/target_os_elf.h: Remove fallback ELF_HWCAP and reorder

2021-09-22 Thread Warner Losh
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

[PATCH 04/14] bsd-user: export get_errno and is_error from syscall.c

2021-09-22 Thread Warner Losh
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

[PATCH v2 1/9] bsd-user/mmap.c: Always zero MAP_ANONYMOUS memory in mmap_frag()

2021-09-21 Thread Warner Losh
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

[PATCH v2 6/9] bsd-user/mmap.c: line wrap change

2021-09-21 Thread Warner Losh
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

[PATCH v2 9/9] bsd-user/mmap.c: assert that target_mprotect cannot fail

2021-09-21 Thread Warner Losh
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

[PATCH 03/14] bsd-user: TARGET_RESET define is unused, remove it

2021-09-22 Thread Warner Losh
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

[PATCH 11/14] bsd-user/sysarch: Move to using do_freebsd_arch_sysarch interface

2021-09-22 Thread Warner Losh
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

[PATCH v2 7/9] bsd-user/mmap.c: Don't mmap fd == -1 independently from MAP_ANON flag

2021-09-21 Thread Warner Losh
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

[PATCH v2 8/9] bsd-user/mmap.c: Implement MAP_EXCL, required by jemalloc in head

2021-09-21 Thread Warner Losh
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

[PATCH 02/14] bsd-user/strace.list: Remove support for FreeBSD versions older than 12.0

2021-09-22 Thread Warner Losh
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

[PATCH 12/14] bsd-user/sysarch: Provide a per-arch framework for sysarch syscall

2021-09-22 Thread Warner Losh
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

[PATCH 09/14] bsd-user: Remove used from TaskState

2021-09-22 Thread Warner Losh
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

[PATCH 14/14] bsd-user/signal: Create a dummy signal queueing function

2021-09-22 Thread Warner Losh
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

[PATCH v2 4/9] bsd-user/mmap.c: mmap return ENOMEM on overflow

2021-09-21 Thread Warner Losh
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

[PATCH v2 2/9] bsd-user/mmap.c: check pread's return value to fix warnings with _FORTIFY_SOURCE

2021-09-21 Thread Warner Losh
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

[PATCH v2 0/9] bsd-user mmap fixes

2021-09-21 Thread Warner Losh
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

[PATCH 05/14] bsd-user/errno_defs.h: Add internal error numbers

2021-09-22 Thread Warner Losh
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

[PATCH v2 3/9] bsd-user/mmap.c: MAP_ symbols are defined, so no need for ifdefs

2021-09-21 Thread Warner Losh
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

[PATCH 00/14] bsd-user: misc cleanup for aarch64 import

2021-09-22 Thread Warner Losh
. 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

[PATCH 01/14] bsd-user/target_os-user.h: Remove support for FreeBSD older than 12.0

2021-09-22 Thread Warner Losh
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

[PATCH 06/14] bsd-user: move TARGET_MC_GET_CLEAR_RET to target_os_signal.h

2021-09-22 Thread Warner Losh
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

[PATCH 13/14] bsd-user: Rename sigqueue to qemu_sigqueue

2021-09-22 Thread Warner Losh
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

[PATCH 10/14] bsd-user: Add stop_all_tasks

2021-09-22 Thread Warner Losh
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

Re: [PATCH 1/2] bsd-user: Only process meson rules on BSD host

2021-10-05 Thread Warner Losh
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

Re: [PATCH 14/14] bsd-user/signal: Create a dummy signal queueing function

2021-09-25 Thread Warner Losh
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

Re: [PATCH v2 2/9] bsd-user/mmap.c: check pread's return value to fix warnings with _FORTIFY_SOURCE

2021-09-24 Thread Warner Losh
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

Re: [PATCH for 7.0 0/5] bsd-user-smoke: A simple smoke test for bsd-user

2021-12-03 Thread Warner Losh
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,

Re: [PATCH for 7.0 0/5] bsd-user-smoke: A simple smoke test for bsd-user

2022-01-04 Thread Warner Losh
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

Re: [PATCH for 7.0 5/5] bsd-user-smoke: Add to build

2022-01-04 Thread Warner Losh
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

Re: [PATCH] FreeBSD: Upgrade to 12.3 release

2022-01-03 Thread Warner Losh
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 >

Re: [PATCH] FreeBSD: Upgrade to 12.3 release

2022-01-03 Thread Warner Losh
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. > > [*] >

Re: [PATCH] qemu-keymap: Add license in generated files

2021-11-17 Thread Warner Losh
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

Re: [PATCH v5 09/17] *-user: Rename TARGET_ERESTARTSYS to QEMU_ERESTARTSYS

2021-11-17 Thread Warner Losh
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

Re: [PATCH v5 10/17] linux-user: Rename TARGET_QEMU_ESIGRETURN to QEMU_ESIGRETURN

2021-11-17 Thread Warner Losh
- > 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 > -

Re: [PATCH v5 16/17] meson: Move linux_user_ss to linux-user/

2021-11-17 Thread Warner Losh
| 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

Re: [PATCH v5 03/17] linux-user/safe-syscall.inc.S: Move to common-user

2021-11-17 Thread Warner Losh
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

Re: [PATCH v5 01/17] linux-user: Add host_signal_set_pc to set pc in mcontext

2021-11-17 Thread 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:

Re: [PATCH v5 02/17] linux-user/signal.c: Create a common rewind_if_in_safe_syscall

2021-11-17 Thread Warner Losh
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

Re: [PATCH v5 04/17] common-user: Move syscall error detection into safe_syscall_base

2021-11-17 Thread Warner Losh
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-

Re: [PATCH v5 13/17] meson: Add build infrastructure for common-user

2021-11-17 Thread Warner Losh
+++- > 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

Re: [PATCH v5 11/17] bsd-user: Create special-errno.h

2021-11-17 Thread Warner Losh
+++- > 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

Re: [PATCH v5 17/17] meson: Move bsd_user_ss to bsd-user/

2021-11-17 Thread Warner Losh
| 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

Re: [PATCH v5 05/17] common-user/host/mips: Add safe-syscall.inc.S

2021-11-17 Thread Warner Losh
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

Re: [PATCH v5 08/17] common-user: Adjust system call return on FreeBSD

2021-11-17 Thread Warner Losh
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

Re: [PATCH v5 12/17] linux-user: Create special-errno.h

2021-11-17 Thread Warner Losh
| 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..

Re: [PATCH v5 15/17] linux-user: Move thunk.c from top-level

2021-11-17 Thread Warner Losh
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

Re: [PATCH v4 7/9] linux-user: Remove HAVE_SAFE_SYSCALL and hostdep.h

2021-11-17 Thread Warner Losh
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

Re: [PATCH v5 14/17] common-user: Move safe-syscall.* from linux-user

2021-11-17 Thread Warner Losh
| 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}

Re: [PATCH v4 3/9] linux-user/safe-syscall.inc.S: Move to common-user

2021-11-17 Thread Warner Losh
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 > >

Re: [PATCH v5 00/17] linux-user: simplify safe signal handling

2021-11-17 Thread Warner Losh
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

Re: [RFC 4/4] common-user: Allow return codes to be adjusted after sytsem call

2021-11-09 Thread Warner Losh
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 > > >

[RFC v2 3/6] linux-user/safe-syscall.inc.S: Move to common-user

2021-11-10 Thread 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 --- {linux-user => common-user}/host/aarch64/safe-syscall.inc.S | 0 {linux-user => common-user}/host/arm/safe-syscall.inc.S | 0 {linu

[RFC v2 6/6] *-user: move safe-syscall.* to common-user

2021-11-10 Thread Warner Losh
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

[RFC v2 0/6] linux-user: simplify safe signal handling

2021-11-10 Thread Warner Losh
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

Re: [RFC 2/4] linux-user/signal.c: Create a common rewind_if_in_safe_syscall

2021-11-10 Thread Warner Losh
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

[RFC v2 1/6] linux-user: Add host_signal_set_pc to set pc in mcontext

2021-11-10 Thread 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: Warner Losh Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- linux-user/host/aarch64/host-signal.h | 5 + linux-user

[RFC v2 4/6] common-user: Adjust system call return on FreeBSD

2021-11-10 Thread Warner Losh
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

[RFC v2 5/6] common-user/host/mips: create, though mips hosts likely don't work reliably

2021-11-10 Thread Warner Losh
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

Re: [PATCH] linux-user: Replace __u64 with uint64_t

2021-11-10 Thread Warner Losh
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

[RFC v2 2/6] linux-user/signal.c: Create a common rewind_if_in_safe_syscall

2021-11-10 Thread Warner Losh
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

Re: [RFC v2 5/6] common-user/host/mips: create, though mips hosts likely don't work reliably

2021-11-10 Thread Warner Losh
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(+

Re: [RFC v2 1/6] linux-user: Add host_signal_set_pc to set pc in mcontext

2021-11-10 Thread Warner Losh
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

Re: [RFC v2 4/6] common-user: Adjust system call return on FreeBSD

2021-11-10 Thread Warner Losh
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

Re: [RFC v2 6/6] *-user: move safe-syscall.* to common-user

2021-11-10 Thread Warner Losh
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

[PATCH for 7.0 1/5] h.armv7: Simple hello-world test for armv7

2021-11-27 Thread Warner Losh
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

[PATCH for 7.0 0/5] bsd-user-smoke: A simple smoke test for bsd-user

2021-11-27 Thread Warner Losh
. 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

[PATCH for 7.0 5/5] bsd-user-smoke: Add to build

2021-11-27 Thread Warner Losh
. 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

[PATCH for 7.0 2/5] h.i386: Simple hello-world test for i386

2021-11-27 Thread Warner Losh
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

[PATCH for 7.0 3/5] h.amd64: Simple hello-world test for x86_64

2021-11-27 Thread Warner Losh
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

[PATCH for 7.0 4/5] smoke-bsd-user: A test script to run all the FreeBSD binaries

2021-11-27 Thread Warner Losh
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

Re: [PATCH v6 01/16] linux-user: Untabify all safe-syscall.inc.S

2021-11-25 Thread Warner Losh
+- > linux-user/host/x86_64/safe-syscall.inc.S | 2 +- > 7 files changed, 396 insertions(+), 396 deletions(-) > Reviewed-by: Warner Losh

Re: [PATCH v6 03/16] linux-user: Move syscall error detection into safe_syscall_base

2021-11-25 Thread 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

Re: [PATCH v6 04/16] linux-user/host/mips: Add safe-syscall.inc.S

2021-11-25 Thread Warner Losh
anged, 126 insertions(+) > create mode 100644 linux-user/host/mips/safe-syscall.inc.S > Reviewed-by: Warner Losh

Re: Give the fosshost.org VM a purpose or a retirement

2021-11-25 Thread 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

Re: [PATCH for-6.2 1/2] linux-user: Add host_signal_set_pc to set pc in mcontext

2021-11-22 Thread Warner Losh
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:

Re: [PATCH for-6.2 2/2] linux-user/signal.c: Create a common rewind_if_in_safe_syscall

2021-11-22 Thread Warner Losh
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

[RFC v3 0/5] linux-user: simplify safe signal handling

2021-11-12 Thread Warner Losh
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

[RFC v3 3/5] linux-user/safe-syscall.inc.S: Move to common-user

2021-11-12 Thread 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 Reviewed-by: Richard Henderson --- {linux-user => common-user}/host/aarch64/safe-syscall.inc.S | 0 {linux-user => common-user}/host/ar

<    1   2   3   4   5   6   7   8   9   10   >