[PATCH] linux-user: implement pgid field of /proc/self/stat

2025-05-20 Thread Andreas Schwab
Signed-off-by: Andreas Schwab --- linux-user/syscall.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 8820ca4dfd..5536e364dc 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -8235,6 +8235,9 @@ static int open_self_stat

Re: [PATCH v5 21/24] target/m68k: Implement packed decimal real loads and stores

2025-05-10 Thread Andreas Schwab
-- | | 0 | e3 | e2 | e1 | e4 | X | X | X | | - That is, the fourth digit of the exponent is stored in the upper 4 bits of the padding (OPERR is set if e4 is non-zero). -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552

Re: Generic way to detect qemu linux-user emulation

2025-04-05 Thread Andreas Schwab
ic. For riscv the most reliable way is to look for "uarch *: qemu" in /proc/cpuinfo. -- Andreas Schwab, SUSE Labs, sch...@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different."

Re: Generic way to detect qemu linux-user emulation

2025-04-04 Thread Andreas Schwab
On Mär 18 2025, Daniel P. Berrangé wrote: > Whereever practical, it is preferrable to check a discrete feature > or behaviour in a functional way, rather than matching on "is it QEMU" Do you know a way to detect support for CLONE_VFORK that isn't too expensive? -- Andr

Re: Generic way to detect qemu linux-user emulation

2025-03-18 Thread Andreas Schwab
9, in run [ 666s] 4:55.17 raise CalledProcessError(retcode, process.args, [ 666s] 4:55.17 output=stdout, stderr=stderr) [ 666s] 4:55.17 subprocess.CalledProcessError: Command '['/usr/bin/ccache /usr/bin/gcc', '--version']' retur

Generic way to detect qemu linux-user emulation

2025-03-18 Thread Andreas Schwab
use the emulation of CLONE_VFORK as a true fork makes it impossible for it to report errors back to the parent process. -- Andreas Schwab, SUSE Labs, sch...@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different."

[PATCH] linux-user: fix handling of cpu mask in riscv_hwprobe syscall

2025-03-04 Thread Andreas Schwab
The third argument of the riscv_hwprobe syscall contains the size of the cpu mask in bytes, not bits. Signed-off-by: Andreas Schwab --- linux-user/syscall.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index a22a5df8cc

[PATCH] linux-user: Move TARGET_SA_RESTORER out of generic/signal.h

2025-02-10 Thread Andreas Schwab
-bounds accesses. Move the definition of TARGET_SA_RESTORER out of generic/signal.h into the target_signal.h files that need it. Note that m68k has the sa_restorer field, but does not use it and does not define SA_RESTORER. Reported-by: Thomas Weißschuh Signed-off-by: Andreas Schwab --- linux

Re: linux-user cannot allocate stack memory on riscv64 host due to non-zero guest_base

2024-07-02 Thread Andreas Schwab
On Jul 02 2024, Richard Henderson wrote: > Is /proc mounted in your environment? Sure, it's a fully running system on real hardware. -- Andreas Schwab, SUSE Labs, sch...@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different."

Re: linux-user cannot allocate stack memory on riscv64 host due to non-zero guest_base

2024-07-02 Thread Andreas Schwab
https://build.opensuse.org/package/live_build_log/openSUSE:Factory:RISCV/qemu:qemu-linux-user/standard/riscv64 -- Andreas Schwab, SUSE Labs, sch...@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different."

Re: linux-user cannot allocate stack memory on riscv64 host due to non-zero guest_base

2024-07-02 Thread Andreas Schwab
allocate memory -- Andreas Schwab, SUSE Labs, sch...@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different."

Re: linux-user cannot allocate stack memory on riscv64 host due to non-zero guest_base

2024-07-02 Thread Andreas Schwab
On Jul 01 2024, Richard Henderson wrote: > With -d page, I get > > Locating guest address space @ 0x3f4000 Why do you get a different address? -- Andreas Schwab, SUSE Labs, sch...@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for someth

Re: linux-user cannot allocate stack memory on riscv64 host due to non-zero guest_base

2024-06-27 Thread Andreas Schwab
Perhaps you should refrain from attacking the volunteers that report bugs. -- Andreas Schwab, SUSE Labs, sch...@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different."

Re: linux-user cannot allocate stack memory on riscv64 host due to non-zero guest_base

2024-06-27 Thread Andreas Schwab
On Jun 26 2024, Warner Losh wrote: > On Wed, Jun 26, 2024 at 9:48 AM Richard Henderson < > richard.hender...@linaro.org> wrote: > >> On 6/26/24 01:23, Andreas Schwab wrote: >> > On Jun 25 2024, Richard Henderson wrote: >> > >> >> can al

Re: linux-user cannot allocate stack memory on riscv64 host due to non-zero guest_base

2024-06-26 Thread Andreas Schwab
-B option or choose a different value) -- Andreas Schwab, SUSE Labs, sch...@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different."

linux-user cannot allocate stack memory on riscv64 host due to non-zero guest_base

2024-06-25 Thread Andreas Schwab
base in setup_arg_pages into a host mmap call with non-zero base. On other hosts like x86_64 or aarch64, guest_base remains zero and the issue does not occur. -- Andreas Schwab, SUSE Labs, sch...@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for some

Re: linux-user crash in python test

2024-06-24 Thread Andreas Schwab
On Jun 24 2024, Peter Maydell wrote: > Just to check, does the python you're running this on > have the change from > https://github.com/python/cpython/pull/110659 Yes, this is python 3.11.9. -- Andreas Schwab, SUSE Labs, sch...@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F

linux-user crash in python test

2024-06-24 Thread Andreas Schwab
dumped) -- Andreas Schwab, SUSE Labs, sch...@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different."

linux-user: array overflow in pselect6 emulation

2024-06-17 Thread Andreas Schwab
t;/dev/null",O_RDONLY) = 3 25005 dup2(3,1030) = 1030 25005 pselect6(1031,4207264,0,0,0,0)*** bit out of range 0 - FD_SETSIZE on fd_set ***: terminated Aborted (core dumped) -- Andreas Schwab, SUSE Labs, sch...@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different."

Re: linux-user emulation hangs during fork

2024-06-06 Thread Andreas Schwab
Which ruby? $ ruby --version ruby 3.3.1 (2024-04-23 revision c56cd86388) [x86_64-linux-gnu] -- Andreas Schwab, SUSE Labs, sch...@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different."

Re: linux-user emulation hangs during fork

2024-06-05 Thread Andreas Schwab
igned-off-by: Laurent Vivier linux-user/syscall.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) -- Andreas Schwab, SUSE Labs, sch...@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different."

linux-user emulation hangs during fork

2024-06-05 Thread Andreas Schwab
oc/3221/status:SigBlk: /proc/3224/status:SigBlk: 00000000 /proc/3228/status:SigBlk: fff27ffbfa9f -- Andreas Schwab, SUSE Labs, sch...@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different."

Re: [Stable-8.2.1 61/71] linux-user/riscv: Adjust vdso signal frame cfa offsets

2024-03-28 Thread Andreas Schwab
On Mär 06 2024, Alistair Francis wrote: > On Sun, Mar 3, 2024 at 8:34 PM Andreas Schwab wrote: >> >> On Jan 28 2024, Michael Tokarev wrote: >> >> > From: Richard Henderson >> > >> > A typo in sizeof_reg put the registers at the wrong offset. &g

Re: [Stable-8.2.1 61/71] linux-user/riscv: Adjust vdso signal frame cfa offsets

2024-03-06 Thread Andreas Schwab
= 0 30962 rt_sigprocmask(SIG_SETMASK,0x2b2a1dc8,NULL,8) = 0 30962 rt_sigprocmask(SIG_SETMASK,0x2b2e1050,0x2b2a21a8,8) = 0 30962 rt_sigprocmask(SIG_SETMASK,0x2b2a21a8,NULL,8) = 0 30962 rt_sigprocmask(SIG_SETMASK,0x2b2a2268,NULL,8) = 0 30962 read(3,0xab2a2747,1) = 1 30962

Re: [Stable-8.2.1 61/71] linux-user/riscv: Adjust vdso signal frame cfa offsets

2024-03-03 Thread Andreas Schwab
Also tested with master, same result. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different."

Re: [Stable-8.2.1 61/71] linux-user/riscv: Adjust vdso signal frame cfa offsets

2024-03-03 Thread Andreas Schwab
= 0 30962 rt_sigprocmask(SIG_SETMASK,0x2b2a1dc8,NULL,8) = 0 30962 rt_sigprocmask(SIG_SETMASK,0x2b2e1050,0x2b2a21a8,8) = 0 30962 rt_sigprocmask(SIG_SETMASK,0x2b2a21a8,NULL,8) = 0 30962 rt_sigprocmask(SIG_SETMASK,0x2b2a2268,NULL,8) = 0 30962 read(3,0xab2a2747,1) = 1 30962

Re: [Stable-8.2.1 61/71] linux-user/riscv: Adjust vdso signal frame cfa offsets

2024-03-03 Thread Andreas Schwab
ext. This breaks the testsuite of libunwind. The test Gtest-resume-sig and all dependent tests hang. Reverting this commit fixes them. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different."

Re: [RFC PATCH] target/m68k: Use i128 for 128-bit load/store in m68k_copy_line()

2023-10-30 Thread Andreas Schwab
On Okt 17 2023, Richard Henderson wrote: > The manual says "burst reads and writes" without defining those terms. Burst transfers are explained in the M68040UM (7.4.2 Line Read Transfer and 7.4.4 Line Write Transfers). -- Andreas Schwab, SUSE Labs, sch...@suse.de GPG Key finge

Re: [PATCH] riscv: Call set_satp_mode_max_supported in riscv_host_cpu_init

2023-09-20 Thread Andreas Schwab
On Sep 19 2023, Andrew Jones wrote: > This should be fixed by > > https://lore.kernel.org/all/20230911064320.939791-37-alistair.fran...@wdc.com/ Thanks, I can confirm that it fixes the issue. -- Andreas Schwab, SUSE Labs, sch...@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE

[PATCH] riscv: Call set_satp_mode_max_supported in riscv_host_cpu_init

2023-09-19 Thread Andreas Schwab
When running in KVM mode with -cpu host, cfg.satp_mode.supported is not initialized, causing an infinite loop in riscv_cpu_satp_mode_finalize. Fixes: 6df3747a27 ("riscv: Introduce satp mode hw capabilities") Signed-off-by: Andreas Schwab --- target/riscv/cpu.c | 2 ++ 1 file

Re: qemu-system-riscv64 -cpu host uses wrong privilege spec version

2023-08-15 Thread Andreas Schwab
On Aug 15 2023, Daniel Henrique Barboza wrote: > This was fixed in 8.1 by eddabb6b88 ("target/riscv: skip features setup for > KVM CPUs"). > Which QEMU version/branch are you using? Thanks, this was tested with 8.0.4. -- Andreas Schwab, SUSE Labs, sch...@suse.de GPG Key

qemu-system-riscv64 -cpu host uses wrong privilege spec version

2023-08-14 Thread Andreas Schwab
,h=on,sv48=on. -- Andreas Schwab, SUSE Labs, sch...@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different."

Re: Boot failure after QEMU's upgrade to OpenSBI v1.3 (was Re: [PATCH for-8.2 6/7] target/riscv: add 'max' CPU type)

2023-07-19 Thread Andreas Schwab
I cannot see the 'tag' v1.3.1 being populated in the opensbi > git repo. Am I missing anything? You need to run git fetch --tags, because the tag is not part of any branch, thus not fetched automatically. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 7578 EB

Re: [PATCH 1/6] Revert "linux-user: Make sure initial brk(0) is page-aligned"

2023-07-18 Thread Andreas Schwab
andomize_brk implementations. -- Andreas Schwab, SUSE Labs, sch...@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different."

[PATCH] linux-user: make sure brk(0) returns a page-aligned value

2023-07-06 Thread Andreas Schwab
Fixes: 86f04735ac ("linux-user: Fix brk() to release pages") Signed-off-by: Andreas Schwab --- linux-user/syscall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 08162cc966..e8a17377f5 100644 --- a/linux-user/sysca

Re: [RISC-V] ERROR:../accel/tcg/cpu-exec.c:1028:cpu_exec_setjmp: assertion failed: (cpu == current_cpu)

2023-07-04 Thread Andreas Schwab
tion failed: (cpu == current_cpu) Bail out! ERROR:../accel/tcg/cpu-exec.c:1028:cpu_exec_setjmp: assertion failed: (cpu == current_cpu) -- Andreas Schwab, SUSE Labs, sch...@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different."

Re: [RISC-V] ERROR:../accel/tcg/cpu-exec.c:1028:cpu_exec_setjmp: assertion failed: (cpu == current_cpu)

2023-07-03 Thread Andreas Schwab
On Jul 03 2023, Alex Bennée wrote: > Andreas Schwab writes: > >> On Jul 03 2023, Andreas Schwab wrote: >> >>> This is a regression in 8.0. It causes the testsuite of mold to fail: >>> >>> https://build.opensuse.org/package/live_build_log

[RISC-V] ERROR:../accel/tcg/cpu-exec.c:1028:cpu_exec_setjmp: assertion failed: (cpu == current_cpu)

2023-07-03 Thread Andreas Schwab
== current_cpu) ** ERROR:../accel/tcg/cpu-exec.c:1028:cpu_exec_setjmp: assertion failed: (cpu == current_cpu) -- Andreas Schwab, SUSE Labs, sch...@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different."

Re: [PATCH v3] linux-user, bsd-user: preserve incoming order of environment variables in the target

2023-06-12 Thread Andreas Schwab
Ping? -- Andreas Schwab, SUSE Labs, sch...@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different."

Re: [PATCH v3] linux-user, bsd-user: preserve incoming order of environment variables in the target

2023-05-22 Thread Andreas Schwab
Ping? -- Andreas Schwab, SUSE Labs, sch...@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different."

Re: [PATCH v3] linux-user: Add /proc/cpuinfo handler for RISC-V

2023-05-08 Thread Andreas Schwab
On Mai 05 2023, Laurent Vivier wrote: > [PATCH qemu v2] linux-user: Emulate /proc/cpuinfo output for riscv > https://patchew.org/QEMU/167873059442.9885.1515208531657524845...@git.sr.ht/ This looks better. You can drop my patch. -- Andreas Schwab, SUSE Labs, sch...@suse.de GPG Key finge

[PATCH v3] linux-user: Add /proc/cpuinfo handler for RISC-V

2023-05-03 Thread Andreas Schwab
>From 912af433fa5d93ce81d2054135ed475ab7462d2d Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Tue, 18 Apr 2023 11:54:01 +0200 Signed-off-by: Andreas Schwab --- v3: fix isa order linux-user/syscall.c | 55 ++-- 1 file changed, 53 insertions(+)

[PATCH v2] linux-user: Add /proc/cpuinfo handler for RISC-V

2023-05-03 Thread Andreas Schwab
Signed-off-by: Andreas Schwab --- v2: dynmically compute the isa string linux-user/syscall.c | 55 ++-- 1 file changed, 53 insertions(+), 2 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 69f740ff98..6df138c8b6 100644 --- a

Re: [PATCH] linux-user: Add /proc/cpuinfo handler for RISC-V

2023-05-03 Thread Andreas Schwab
On Mai 02 2023, Andreas Schwab wrote: > None of the currently defined cpus are non-GC cpus (except sifive_e, but > that is not suitable for user-space anyway), and there doesn't appear to > be any properties defined for changing the supported extensions. Actually, modifying the

Re: [PATCH] linux-user: Add /proc/cpuinfo handler for RISC-V

2023-05-02 Thread Andreas Schwab
On Mai 02 2023, Palmer Dabbelt wrote: > On Tue, 02 May 2023 06:44:00 PDT (-0700), sch...@suse.de wrote: >> Signed-off-by: Andreas Schwab >> --- >> linux-user/syscall.c | 30 -- >> 1 file changed, 28 insertions(+), 2 deletions(-) &g

[PATCH] linux-user: Add /proc/cpuinfo handler for RISC-V

2023-05-02 Thread Andreas Schwab
Signed-off-by: Andreas Schwab --- linux-user/syscall.c | 30 -- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 69f740ff98..c72456a34b 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c

[PATCH v3] linux-user, bsd-user: preserve incoming order of environment variables in the target

2023-03-29 Thread Andreas Schwab
Do not reverse the order of environment variables in the target environ array relative to the incoming environ order. Some testsuites depend on a specific order, even though it is not defined by any standard. Signed-off-by: Andreas Schwab --- bsd-user/main.c | 10 +- linux-user

Re: [PATCH v2] linux-user: preserve incoming order of environment variables in the target

2023-03-29 Thread Andreas Schwab
On Mär 29 2023, Philippe Mathieu-Daudé wrote: > On 29/3/23 16:00, Daniel P. Berrangé wrote: >> On Wed, Mar 29, 2023 at 03:55:13PM +0200, Andreas Schwab wrote: >>> Do not reverse the order of environment variables in the target environ >>> array relative to the in

Re: [PATCH v2] linux-user: preserve incoming order of environment variables in the target

2023-03-29 Thread Andreas Schwab
On Mär 29 2023, Daniel P. Berrangé wrote: > On Wed, Mar 29, 2023 at 03:55:13PM +0200, Andreas Schwab wrote: >> Do not reverse the order of environment variables in the target environ >> array relative to the incoming environ order. Some testsuites depend on a >> specific ord

[PATCH v2] linux-user: preserve incoming order of environment variables in the target

2023-03-29 Thread Andreas Schwab
Do not reverse the order of environment variables in the target environ array relative to the incoming environ order. Some testsuites depend on a specific order, even though it is not defined by any standard. Signed-off-by: Andreas Schwab --- linux-user/main.c | 6 ++ 1 file changed, 6

[PATCH] linux-user: preserve incoming order of environment variables in the target

2023-03-29 Thread Andreas Schwab
Do not reverse the order of envionment variables in the target environ array relative to the incoming environ order. Some testsuites depend on a specific order, even though it is not defined by any standard. Signed-off-by: Andreas Schwab --- linux-user/main.c | 7 ++- 1 file changed, 6

[PATCH] linux-user: fill out task state in /proc/self/stat

2023-03-06 Thread Andreas Schwab
Some programs want to match an actual task state character. Signed-off-by: Andreas Schwab --- linux-user/syscall.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 36fffd36ca..eb4c2c3162 100644 --- a/linux-user/syscall.c +++ b/linux-user

Re: [PATCH for 7.1] linux-user: fix compat with glibc >= 2.36 sys/mount.h

2022-10-01 Thread Andreas Schwab
GETBSZ _IO(0x00,2) -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different."

qemu-x86_64 runs out of memory

2022-09-13 Thread Andreas Schwab
ot;%zx\n", Max); } $ cc -O2 -g -Wall -std=gnu11 -g mmap.c -o mmap $ ./mmap 7f672e5ff000 $ qemu-x86_64 ./mmap Killed -- Andreas Schwab, SUSE Labs, sch...@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different."

[PATCH v2] linux-user: implement more loop ioctls

2021-11-22 Thread Andreas Schwab
LOOP_CONFIGURE is now used by losetup, and it cannot cope with ENOSYS. Signed-off-by: Andreas Schwab --- v2: fix s/loop_configure/loop_config/ typo linux-user/ioctls.h| 4 linux-user/linux_loop.h| 2 ++ linux-user/syscall_defs.h | 4 linux-user/syscall_types.h | 6

[PATCH] linux-user: implement more loop ioctls

2021-11-22 Thread Andreas Schwab
LOOP_CONFIGURE is now used by losetup, and it cannot cope with ENOSYS. Signed-off-by: Andreas Schwab --- linux-user/ioctls.h| 4 linux-user/linux_loop.h| 2 ++ linux-user/syscall_defs.h | 4 linux-user/syscall_types.h | 6 ++ 4 files changed, 16 insertions(+) diff

[PATCH] linux-user/syscall: add support for CLONE_PIDFD

2021-09-21 Thread Andreas Schwab
Add basic support for CLONE_PIDFD, only fork-like clone without additional flags. This is enough to make Qt/forkfd working. Signed-off-by: Andreas Schwab --- linux-user/syscall.c | 52 ++-- 1 file changed, 50 insertions(+), 2 deletions(-) diff --git a

[PATCH] linux-user/syscall: add support for CLONE_PIDFD

2021-08-02 Thread Andreas Schwab
Add basic support for CLONE_PIDFD, only fork-like clone without additional flags. This is enough to make Qt/forkfd working. Signed-off-by: Andreas Schwab --- linux-user/syscall.c | 52 ++-- 1 file changed, 50 insertions(+), 2 deletions(-) diff --git a

[PATCH] linux-user: fill ppid field in /proc/self/stat

2021-06-21 Thread Andreas Schwab
Signed-off-by: Andreas Schwab --- linux-user/syscall.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 974dd46c9a..dababe463c 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -7940,6 +7940,9 @@ static int open_self_stat(void

[PATCH] linux-user: Implement copy_file_range

2020-11-12 Thread Andreas Schwab
Signed-off-by: Andreas Schwab --- linux-user/syscall.c | 40 1 file changed, 40 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 3160a9ba06..c3373af4c7 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -813,6

[Bug 1793539] Re: qemu:handle_cpu_signal received signal outside vCPU context @ pc=0x6003ddc5

2020-08-10 Thread Andreas Schwab
As you can see in the build log the package builds sucessfully. ** Changed in: qemu Status: New => Fix Released -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1793539 Title: qemu:handle_cpu_

Re: [PATCH for 5.1] docs: fix trace docs build with sphinx 3.1.1

2020-07-26 Thread Andreas Schwab
syntax, but it is not being triggered. While > it is only complaining about the first option, I changed all > the options to give consistency. > > Signed-off-by: Daniel P. Berrangé Running Sphinx v1.7.6 [...] Warning, treated as error: ../qemu-5.0.0/docs/qemu-option-trace.rst.inc:21:Dupli

[PATCH] linux-user: Use getcwd syscall directly

2020-07-23 Thread Andreas Schwab
The glibc getcwd function returns different errors than the getcwd syscall, which triggers an assertion failure in the glibc getcwd function when running under the emulation. Signed-off-by: Andreas Schwab --- linux-user/syscall.c | 9 + 1 file changed, 1 insertion(+), 8 deletions

[PATCH] linux-user: implement the semtimedop syscall

2020-07-13 Thread Andreas Schwab
Signed-off-by: Andreas Schwab --- linux-user/syscall.c | 32 +++- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 9ec03a889d..7c0f5b83ff 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c

Re: [PATCH 1/2] softfloat: m68k: infinity is a valid encoding

2020-07-13 Thread Andreas Schwab
ly by fpsp040, to be compatible with the 68881. Andreas. -- Andreas Schwab, SUSE Labs, sch...@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different."

[PATCH] linux-user: implement OFD locks

2020-05-25 Thread Andreas Schwab
Signed-off-by: Andreas Schwab --- linux-user/generic/fcntl.h | 4 linux-user/syscall.c | 6 ++ 2 files changed, 10 insertions(+) diff --git a/linux-user/generic/fcntl.h b/linux-user/generic/fcntl.h index 9f727d4df2..c85c5b9fed 100644 --- a/linux-user/generic/fcntl.h +++ b/linux

Re: [PATCH] linux-user: Use getcwd syscall directly

2020-04-07 Thread Andreas Schwab
On Apr 07 2020, Peter Maydell wrote: > On Tue, 7 Apr 2020 at 11:37, Laurent Vivier wrote: >> >> Le 06/04/2020 à 17:18, Andreas Schwab a écrit : >> > The glibc getcwd function returns different errors than the getcwd >> > syscall, which triggers an assertion fai

[PATCH] linux-user: Use getcwd syscall directly

2020-04-06 Thread Andreas Schwab
The glibc getcwd function returns different errors than the getcwd syscall, which triggers an assertion failure in the glibc getcwd function when running under the emulation. Signed-off-by: Andreas Schwab --- linux-user/syscall.c | 9 + 1 file changed, 1 insertion(+), 8 deletions

[PATCH] linux-user: add strace for dup3

2019-09-30 Thread Andreas Schwab
Signed-off-by: Andreas Schwab --- linux-user/strace.list | 3 +++ 1 file changed, 3 insertions(+) diff --git a/linux-user/strace.list b/linux-user/strace.list index 63a946642d..863283418e 100644 --- a/linux-user/strace.list +++ b/linux-user/strace.list @@ -121,6 +121,9 @@ #ifdef TARGET_NR_dup2

[Qemu-devel] [PATCH] roms/Makefile: fix command for opensbi64-sifive_u

2019-08-12 Thread Andreas Schwab
Copy the correct firmware file Signed-off-by: Andreas Schwab --- roms/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roms/Makefile b/roms/Makefile index dc70fb5aea..775c963f9d 100644 --- a/roms/Makefile +++ b/roms/Makefile @@ -183,7 +183,7 @@ opensbi64-sifive_u

[Qemu-devel] [PATCH] linux-user: implement getsockopt SO_RCVTIMEO and SO_SNDTIMEO

2019-05-13 Thread Andreas Schwab
Signed-off-by: Andreas Schwab --- linux-user/syscall.c | 36 ++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index d113a65831..ba5775a94e 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c

[Qemu-devel] [PATCH] linux-user: Implement membarrier syscall

2019-05-13 Thread Andreas Schwab
Signed-off-by: Andreas Schwab --- linux-user/syscall.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index f5ff6f5dc8..80399f4eb0 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -313,6 +313,9 @@ _syscall3(int, getrandom

[Qemu-devel] [PATCH] linux-user: don't short-circuit read with zero length

2019-03-05 Thread Andreas Schwab
A zero-length read still needs to do the usual checks, thus it may return errors like EBADF. This makes the read syscall emulation consistent with the pread64 syscall emulation. Signed-off-by: Andreas Schwab --- linux-user/syscall.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions

[Qemu-devel] [PATCH] linux-user: fix emulation of accept4/getpeername/getsockname/recvfrom syscalls

2019-02-14 Thread Andreas Schwab
value of the addrlen parameter, so that it doesn't write past the buffer limits. Signed-off-by: Andreas Schwab --- linux-user/syscall.c | 41 + 1 file changed, 25 insertions(+), 16 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c

[Qemu-devel] [PATCH] linux-user: fix recvmsg emulation

2019-02-12 Thread Andreas Schwab
Set msg_flags in the returned struct msghdr. Signed-off-by: Andreas Schwab --- linux-user/syscall.c | 1 + 1 file changed, 1 insertion(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 90bfda3563..b6b566a6fa 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c

[Qemu-devel] [PATCH] linux-user: fix emulation of accept4/getpeername/getsockname/recvfrom syscalls

2019-02-07 Thread Andreas Schwab
the addrlen parameter, so that it doesn't write past the buffer limits. Signed-off-by: Andreas Schwab --- linux-user/syscall.c | 38 ++ 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 55fa2

[Qemu-devel] [PATCH] linux-user: fix emulation of accept4/getpeername/getsockname/recvfrom syscalls

2019-01-28 Thread Andreas Schwab
the addrlen parameter, so that it doesn't write past the buffer limits. Signed-off-by: Andreas Schwab --- linux-user/syscall.c | 38 ++ 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index d5db011

[Qemu-devel] [Bug 1793539] [NEW] qemu:handle_cpu_signal received signal outside vCPU context @ pc=0x6003ddc5

2018-09-20 Thread Andreas Schwab
Public bug reported: During the build of gedit for RISC-V this error occurs: $ qemu-riscv64 -E LD_LIBRARY_PATH=gedit/.libs ./gedit/.libs/gedit qemu:handle_cpu_signal received signal outside vCPU context @ pc=0x6003ddc5 qemu:handle_cpu_signal received signal outside vCPU context @ pc=0x69e4 h

[Qemu-devel] [PATCH] linux-user: don't short-circuit read with zero length

2018-09-11 Thread Andreas Schwab
A zero-length read still needs to do the usual checks, thus it may return errors like EBADF. Signed-off-by: Andreas Schwab --- linux-user/syscall.c | 18 +++--- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index

Re: [Qemu-devel] [PULL v4 0/7] riscv-pull queue

2018-07-10 Thread Andreas Schwab
On Jul 09 2018, Alistair Francis wrote: > On Mon, Jul 9, 2018 at 3:00 AM, Andreas Schwab wrote: >> What is the state of the sifive_u emulation? When I tried to boot a bbl >> with an included kernel I get these errors: >> >> qemu-system-riscv64: plic: invalid regis

Re: [Qemu-devel] [PULL v4 0/7] riscv-pull queue

2018-07-09 Thread Andreas Schwab
qemu-system-riscv64: plic: invalid register write: 20b0 qemu-system-riscv64: plic: invalid register write: 20b4 Andreas. -- Andreas Schwab, SUSE Labs, sch...@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different."

Re: [Qemu-devel] qemu:handle_cpu_signal received signal outside vCPU context

2018-05-30 Thread Andreas Schwab
On Mär 19 2018, Michael Clark wrote: > On Mon, Mar 19, 2018 at 9:17 AM, Andreas Schwab wrote: > >> I'm seeing this error while building gedit for riscv64 with linux-user >> emulation: >> >> $ LD_LIBRARY_PATH=gedit/.libs qemu-riscv64 gedit/.libs/

Re: [Qemu-devel] qemu:handle_cpu_signal received signal outside vCPU context

2018-03-20 Thread Andreas Schwab
kage/show/openSUSE:Factory:RISCV/gedit> with osc and use osc build. Andreas. -- Andreas Schwab, SUSE Labs, sch...@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different."

[Qemu-devel] qemu:handle_cpu_signal received signal outside vCPU context

2018-03-19 Thread Andreas Schwab
vCPU context @ pc=0x6003d7d5 qemu:handle_cpu_signal received signal outside vCPU context @ pc=0x60106a16 This is qemu as of today with the patches from git://github.com/riscv/riscv-qemu / riscv-all on top. Andreas. -- Andreas Schwab, SUSE Labs, sch...@suse.de GPG Key fingerprint = 0196 BAD8 1CE9

Re: [Qemu-devel] [PATCH 5/7] block: convert bdrv_invalidate_cache callback to coroutine_fn

2018-03-15 Thread Andreas Schwab
e block/iscsi.c:2247:31: error: 'iscsi_invalidate_cache' undeclared here (not in a function); did you mean 'iscsi_co_invalidate_cache'? .bdrv_invalidate_cache = iscsi_invalidate_cache, ^~

Re: [Qemu-devel] [PATCH v6 00/23] RISC-V QEMU Port Submission

2018-02-26 Thread Andreas Schwab
This is being used to build openSUSE Factory for riscv64 with linux-user emulation: https://build.opensuse.org/project/show/openSUSE:Factory:RISCV Andreas. -- Andreas Schwab, SUSE Labs, sch...@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And no

Re: [Qemu-devel] [PATCH v2] linux-user: Implement copy_file_range

2018-02-15 Thread Andreas Schwab
On Feb 15 2018, Laurent Vivier wrote: > Le 06/02/2018 à 11:31, Andreas Schwab a écrit : >> No attempt is made to emulate it on the host. > > I don't understand what you mean here... If your host doesn't have it, neither will the emulation. Andreas. -- Andre

[Qemu-devel] [PATCH v2] linux-user: Implement copy_file_range

2018-02-06 Thread Andreas Schwab
No attempt is made to emulate it on the host. Signed-off-by: Andreas Schwab --- v2: fix spacing --- linux-user/syscall.c | 39 +++ 1 file changed, 39 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index bed154139e..92b4f59c05 100644

[Qemu-devel] [PATCH] linux-user: Implement copy_file_range

2018-02-05 Thread Andreas Schwab
No attempt is made to emulate it on the host. Signed-off-by: Andreas Schwab --- linux-user/syscall.c | 39 +++ 1 file changed, 39 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 07fb8de921..ff89016adc 100644 --- a/linux-user

[Qemu-devel] [PATCH] linux-user: Implement setsockopt SOL_SOCKET/SO_LINGER

2018-02-05 Thread Andreas Schwab
Signed-off-by: Andreas Schwab --- linux-user/syscall.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index ff89016adc..82848fd97d 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -3130,6 +3130,29

Re: [Qemu-devel] [PATCH v4 10/22] RISC-V Linux User Emulation

2018-02-05 Thread Andreas Schwab
GET_NR_rt_tgsigqueueinfo 240 > +#define TARGET_NR_perf_event_open 241 > +#define TARGET_NR_accept4 242 > +#define TARGET_NR_recvmmsg 243 > +#define TARGET_NR_arch_specific_syscall 244 > +#define TARGET_NR_wait4 260 > +#define TARGET_NR_prlimit64 261 > +#define TARGET_NR_fanotify_init 262 > +#define TARGET_NR_fanotify_mark 263 > +#define TARGET_NR_name_to_handle_at 264 > +#define TARGET_NR_open_by_handle_at 265 > +#define TARGET_NR_clock_adjtime 266 > +#define TARGET_NR_syncfs 267 > +#define TARGET_NR_setns 268 > +#define TARGET_NR_sendmmsg 269 > +#define TARGET_NR_process_vm_readv 270 > +#define TARGET_NR_process_vm_writev 271 > +#define TARGET_NR_kcmp 272 > +#define TARGET_NR_finit_module 273 > + > +#define TARGET_NR_syscalls (__NR_finit_module + 1) This is very much out of date, missing some important entries. Also, TARGET_NR_syscalls needs to refer to TARGET_NR_*. Andreas. -- Andreas Schwab, SUSE Labs, sch...@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different."

[Qemu-devel] [PATCH v3] linux-user: Implement ioctl cmd TIOCGPTPEER

2018-01-29 Thread Andreas Schwab
With glibc 2.27 the openpty function prefers the TIOCGPTPEER ioctl. Signed-off-by: Andreas Schwab Reviewed-by: Laurent Vivier --- v2: handle host with old kernel headers v3: fix sparc typos --- linux-user/aarch64/termbits.h| 2 ++ linux-user/alpha/termbits.h | 1 + linux-user/arm

[Qemu-devel] [PATCH v2] linux-user: Implement ioctl cmd TIOCGPTPEER

2018-01-25 Thread Andreas Schwab
With glibc 2.27 the openpty function will prefer the TIOCGPTPEER ioctl. Signed-off-by: Andreas Schwab --- v2: handle host with old kernel headers --- linux-user/aarch64/termbits.h| 2 ++ linux-user/alpha/termbits.h | 1 + linux-user/arm/termbits.h| 1 + linux-user/cris

[Qemu-devel] [PATCH] linux-user: Implement ioctl cmd TIOCGPTPEER

2018-01-24 Thread Andreas Schwab
With glibc 2.27 the openpty function will prefer the TIOCGPTPEER ioctl. Signed-off-by: Andreas Schwab --- linux-user/aarch64/termbits.h| 2 ++ linux-user/alpha/termbits.h | 1 + linux-user/arm/termbits.h| 1 + linux-user/cris/termbits.h | 1 + linux-user/hppa/termbits.h

[Qemu-devel] [PATCH v2] linux-user: implement renameat2

2018-01-23 Thread Andreas Schwab
This is needed for new architectures like RISC-V which do not provide any other rename-like syscall. Signed-off-by: Andreas Schwab --- linux-user/syscall.c | 34 ++ 1 file changed, 34 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index

Re: [Qemu-devel] [PATCH] linux-user: implement renameat2

2018-01-23 Thread Andreas Schwab
On Jan 23 2018, Laurent Vivier wrote: > And, please, test it (build/run). This was tested by bootstrapping openSUSE Factory for RISC-V. Andreas. -- Andreas Schwab, SUSE Labs, sch...@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for s

Re: [Qemu-devel] [PATCH] linux-user: implement renameat2

2018-01-23 Thread Andreas Schwab
You can't use fcntl_flags_tbl Of course! I was confused by another patch I was working on which does need such a conversion. :-/ Andreas. -- Andreas Schwab, SUSE Labs, sch...@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different."

[Qemu-devel] [PATCH] linux-user: implement renameat2

2018-01-22 Thread Andreas Schwab
This is needed for new architectures like RISC-V which do not provide any other rename-like syscall. Signed-off-by: Andreas Schwab --- linux-user/syscall.c | 33 + 1 file changed, 33 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index

Re: [Qemu-devel] /usr/bin/m4: internal error detected

2017-12-01 Thread Andreas Schwab
n qemu-linux-user, which ignores CLONE_VFORK, turning vfork into fork. This breaks the expected semantics of vfork (VM sharing and blocking the child until exec). Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And

Re: [Qemu-devel] [PATCH] qemu-binfmt-conf.sh: Fix m68k_mask

2017-03-22 Thread Andreas Schwab
On Mär 22 2017, Thomas Huth wrote: > On 21.03.2017 10:38, Andreas Schwab wrote: >> The m68k mask should not remove the low bit of the ELF version field and >> should ignore the OS/ABI field. > > Did you encounter a problem with a real binary here? Yes, some binaries a

  1   2   >