Re: [Qemu-devel] Making qemu use 10.0.3.x not 10.0.2.x

2008-02-05 Thread Warner Losh
From: Andreas Färber <[EMAIL PROTECTED]> Subject: Re: [Qemu-devel] Making qemu use 10.0.3.x not 10.0.2.x Date: Tue, 5 Feb 2008 13:58:28 +0100 > > Am 05.02.2008 um 12:30 schrieb Ian Jackson: > > > I don't believe that 10.0.2.0/24 was chosen randomly :-). It would be > > better for qemu's default

Re: [Qemu-devel] QEMU License and proprietary hardware

2007-06-22 Thread Warner Losh
From: Luke -Jr <[EMAIL PROTECTED]> Subject: Re: [Qemu-devel] QEMU License and proprietary hardware Date: Fri, 22 Jun 2007 10:18:01 -0500 > On Thursday 21 June 2007 17:33, M. Warner Losh wrote: > > The GPL only has as much force of law as copyright law gives it, and in > > o

Re: [Qemu-devel] [PATCH] target_posix_types.h

2007-11-14 Thread Warner Losh
From: Paul Brook <[EMAIL PROTECTED]> Subject: Re: [Qemu-devel] [PATCH] target_posix_types.h Date: Wed, 14 Nov 2007 20:39:36 + > > This means that time_t had to be tracked down on varying architectures > > to find the size and there was an assumption made that time_t is 32 bits > > - which isn'

Re: Thoughts on removing the TARGET_I386 part of hw/display/vga/vbe_portio_list[]

2022-12-06 Thread Warner Losh
On Tue, Dec 6, 2022 at 5:32 AM Dr. David Alan Gilbert wrote: > From intel arch manual 19.3: > '..16-bit ports should be aligned to even addresses (0, 2, 4, ...) so > that all 16 bits can be transferred in a > single bus cycle. Likewise, 32-bit ports should be aligned to addresses > that are mu

Re: how long do we need to retain gitlab CI job stdout logs?

2022-08-08 Thread Warner Losh
On Mon, Aug 8, 2022, 11:49 AM Peter Maydell wrote: > Hi; I just reduced QEMU's storage usage on gitlab by 130GB (no typo!) > using https://gitlab.com/eskultety/gitlab_cleaner, which Dan helpfully > pointed me at. This script removes old pipelines, which take up a > lot of storage space for QEMU b

Re: [PATCH] bsd-user: Properly allocate guest virtual address space

2023-07-27 Thread Warner Losh
ork broke). I can send that second patch out for review. I can queue this fix in the mean time for whenever the tree opens up. Reviewed by: Warner Losh > > r~ > --- > bsd-user/main.c | 37 +++-- > 1 file changed, 19 insertions(+), 18 deletions(-)

[PATCH] bsd-user: Specify host page alignment if none specified

2023-07-27 Thread Warner Losh
We're hitting an assert when we pass in alignment == 0 since that's not a power of two. so pass in the ideal page size. Signed-off-by: Warner Losh --- bsd-user/mmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bsd-user/mmap.c b/bsd-user/mmap.c index 7

Re: [PATCH] bsd-user: Properly allocate guest virtual address space

2023-07-27 Thread Warner Losh
On Thu, Jul 27, 2023 at 6:31 PM Richard Henderson < [email protected]> wrote: > On 7/27/23 17:09, Warner Losh wrote: > > Yes. FreeBSD's bsd-user binary will only run on 64-bit hosts. The project > > has started phasing out support for 32-bit hosts,

[PATCH v2] bsd-user: Specify host page alignment if none specified

2023-07-28 Thread Warner Losh
We're hitting an assert when we pass in alignment == 0 since that's not a power of two. so pass in the ideal page size. Signed-off-by: Warner Losh --- bsd-user/mmap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bsd-user/mmap.c b/bsd-user/mmap.c index 7

Re: [PATCH] bsd-user: Specify host page alignment if none specified

2023-07-28 Thread Warner Losh
On Fri, Jul 28, 2023 at 7:41 AM Richard Henderson < [email protected]> wrote: > On 7/28/23 06:34, Richard Henderson wrote: > > On 7/27/23 20:54, Warner Losh wrote: > >> We're hitting an assert when we pass in alignment == 0 since that's not > &g

Re: [PATCH v4 02/12] {linux,bsd}-user: Introduce get_task_state()

2024-02-19 Thread Warner Losh
ée > Signed-off-by: Ilya Leoshkevich > Reviewed-by: Warner Losh The bsd-user stuff is definitely good. The linux-user seems good, but I didn't look at it as closely. Warner > bsd-user/bsd-file.h | 2 +- > bsd-user/qemu.h | 5 +

Re: [PATCH v4 03/12] {linux,bsd}-user: Update ts_tid after fork()

2024-02-19 Thread Warner Losh
by: Alex Bennée > Signed-off-by: Ilya Leoshkevich > Reviewed-by: Warner Losh Warner > --- > bsd-user/main.c | 1 + > linux-user/main.c | 1 + > 2 files changed, 2 insertions(+) > > diff --git a/bsd-user/main.c b/bsd-user/main.c > index e5efb7b8458..72289673a94 10064

Re: [PATCH] {linux,bsd}-user: Fail mmap() if size doesn't fit into host's size_t

2024-01-29 Thread Warner Losh
gned(abi_ulong > start, abi_ulong size, > > size = HOST_PAGE_ALIGN(size); > > +if (size != (size_t)size) { > +return (abi_ulong)(-1); > +} > + > if (reserved_va) { > return mmap_find_vma_reserved(start, size, > (align

Re: [PATCH 3/3] meson: Disable CONFIG_NOTIFY1 on FreeBSD

2024-02-05 Thread Warner Losh
On Wed, Jan 31, 2024 at 9:42 AM Daniel P. Berrangé wrote: > On Wed, Jan 31, 2024 at 05:24:10PM +0100, Philippe Mathieu-Daudé wrote: > > Hi, > > > > Warner, do you remember what this is about? > > > > ( > https://cgit.freebsd.org/ports/commit/emulators/qemu-devel/files/patch-util_meson.build?id=2a

Re: [PATCH v2 07/14] test-util-filemonitor: Adapt to the FreeBSD inotify rename semantics

2024-02-07 Thread Warner Losh
real users, so > teach the test to accept it. > Reviewed-by: Warner Losh Suggested-by: Daniel P. Berrange > Signed-off-by: Ilya Leoshkevich > Message-Id: <[email protected]> > Signed-off-by: Alex Bennée > --- > tests/unit/test-util-filemonito

Re: [PATCH v2 06/14] tests/vm/freebsd: Reload the sshd configuration

2024-02-07 Thread Warner Losh
> > Reviewed-by: Thomas Huth > Signed-off-by: Ilya Leoshkevich > Message-Id: <[email protected]> > Signed-off-by: Alex Bennée > --- > tests/vm/freebsd | 1 + > 1 file changed, 1 insertion(+) > Reviewed-by: Warner Losh > diff

Re: [PATCH v2 08/14] meson: Link with libinotify on FreeBSD

2024-02-07 Thread Warner Losh
age-Id: <[email protected]> > Signed-off-by: Alex Bennée > --- > meson.build | 23 +++ > util/meson.build | 6 +++++- > 2 files changed, 24 insertions(+), 5 deletions(-) > Reviewed-by: Warner Losh > diff --git a/

Re: [PATCH v3 29/29] user: Prefer fast cpu_env() over slower CPU QOM cast macro

2024-02-07 Thread Warner Losh
bsd-user/signal.c | 3 +-- > linux-user/signal.c | 6 ++ > 2 files changed, 3 insertions(+), 6 deletions(-) > Reviewed-by: Warner Losh > diff --git a/bsd-user/signal.c b/bsd-user/signal.c > index ca31470772..c6f0b1be38 100644 > --- a/bsd-user/signal.c > +++ b/bsd-user

Re: QEMU headers in C++

2024-05-02 Thread Warner Losh
On Thu, May 2, 2024 at 12:20 AM Thomas Huth wrote: > On 02/05/2024 06.40, Roman Kiryanov wrote: > > Hi QEMU, > > > > I work in Android Studio Emulator and we would like to develop devices > > in C++. Unfortunately, QEMU headers cannot be used with C++ as is > > (e.g. they use C++ keywords as vari

Re: [RFC] QEMU Gating CI

2019-12-02 Thread Warner Losh
On Mon, Dec 2, 2019 at 11:29 AM Cleber Rosa wrote: > On Mon, Dec 02, 2019 at 05:08:35PM +, Peter Maydell wrote: > > On Mon, 2 Dec 2019 at 17:00, Stefan Hajnoczi > wrote: > > > > > > On Mon, Dec 02, 2019 at 09:05:52AM -0500, Cleber Rosa wrote: > > > > To exemplify my point, if one specific te

Re: [PATCH 2/3] bsd-user/mmap: use TSA_NO_TSA to suppress clang TSA warnings

2023-01-17 Thread Warner Losh
On Tue, Jan 17, 2023 at 6:52 AM Emanuele Giuseppe Esposito < [email protected]> wrote: > QEMU does not compile when enabling clang's thread safety analysis > (TSA), > because some functions create wrappers for pthread mutexes but do > not use any TSA macro. Therefore the compiler fails. > > In o

Re: [PATCH 2/3] bsd-user/mmap: use TSA_NO_TSA to suppress clang TSA warnings

2023-01-17 Thread Warner Losh
On Tue, Jan 17, 2023 at 9:25 AM Kevin Wolf wrote: > Am 17.01.2023 um 17:16 hat Warner Losh geschrieben: > > On Tue, Jan 17, 2023 at 6:52 AM Emanuele Giuseppe Esposito < > > [email protected]> wrote: > > > > > QEMU does not compile when enabling clang

Re: [PATCH 2/3] bsd-user/mmap: use TSA_NO_TSA to suppress clang TSA warnings

2023-01-18 Thread Warner Losh
On Wed, Jan 18, 2023 at 8:12 AM Emanuele Giuseppe Esposito < [email protected]> wrote: > > > Am 17/01/2023 um 18:17 schrieb Kevin Wolf: > > Am 17.01.2023 um 17:43 hat Warner Losh geschrieben: > >> On Tue, Jan 17, 2023 at 9:25 AM Kevin Wolf wrote: > >>

Re: [PATCH v4 04/19] bsd-user: Clean up includes

2023-01-19 Thread Warner Losh
On Thu, Jan 19, 2023 at 12:00 AM Markus Armbruster wrote: > Clean up includes so that osdep.h is included first and headers > which it implies are not included manually. > > This commit was created with scripts/clean-includes. > > Signed-off-by: Markus Armbruster > --- > bsd-user/bsd-proc.h

Re: [PATCH v4 04/19] bsd-user: Clean up includes

2023-01-19 Thread Warner Losh
On Thu, Jan 19, 2023 at 9:42 AM Markus Armbruster wrote: > Warner Losh writes: > > > On Thu, Jan 19, 2023 at 12:00 AM Markus Armbruster > > wrote: > > > >> Clean up includes so that osdep.h is included first and headers > >> which it implies are not in

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

2023-03-29 Thread Warner Losh
On Wed, Mar 29, 2023, 4:00 PM 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 order

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

2023-03-29 Thread Warner Losh
off-by: Andreas Schwab > --- > bsd-user/main.c | 10 +- > linux-user/main.c | 10 +- > 2 files changed, 18 insertions(+), 2 deletions(-) > Reviewed-by: Warner Losh > diff --git a/bsd-user/main.c b/bsd-user/main.c > index 89f225dead..eff834e8d8 100644 >

Re: [PATCH 03/11] MAINTAINERS: add a section for policy documents

2023-03-30 Thread Warner Losh
ces ;-) > > Who's with me? > > Signed-off-by: Alex Bennée > Cc: Thomas Huth > Cc: Daniel P. Berrangé > Cc: Markus Armbruster > Cc: Kashyap Chamarthy > Cc: Paolo Bonzini > Cc: Peter Maydell > Cc: Philippe Mathieu-Daudé > Cc: Bernhard Beschow > Rev

Re: [PATCH 0/7] bsd-user: remove bitrotted NetBSD and OpenBSD bsd-user support

2023-03-31 Thread Warner Losh
, Mar 31, 2023 at 8:19 AM Warner Losh wrote: > The NetBSD and OpenBSD support in bsd-user hasn't built since before the > meson > conversion. It's also out of sync with many of the recent changes in the > bsd-user fork and has just been removed there. Remove it from master for

[PATCH 0/7] bsd-user: remove bitrotted NetBSD and OpenBSD bsd-user support

2023-03-31 Thread Warner Losh
h grep and has increasingly gotten in the way. The bsd-user fork code is much more advanced, and even it doesn't compile and is out of date. Remove this from both branches. If others wish to bring it up to speed, I'm happy to help them. Warner Losh (7): bsd-user: Remove obsolete p

[PATCH 3/7] bsd-user: Remove netbsd system call tracing

2023-03-31 Thread Warner Losh
Remove NetBSD system call tracing. We've not supported building all the BSDs into one module for some time, and the NetBSD support hasn't even built since the meson conversion. Signed-off-by: Warner Losh --- bsd-user/qemu.h | 5 - bsd-user/strace.c | 17 - 2 fil

[PATCH 1/7] bsd-user: Remove obsolete prototypes

2023-03-31 Thread Warner Losh
These prototypes have been obsolete since 304f944e5104. Signed-off-by: Warner Losh --- bsd-user/qemu.h | 6 -- 1 file changed, 6 deletions(-) diff --git a/bsd-user/qemu.h b/bsd-user/qemu.h index 41d84e0b81..4062ee720f 100644 --- a/bsd-user/qemu.h +++ b/bsd-user/qemu.h @@ -169,12 +169,6

[PATCH 2/7] bsd-user: Remove netbsd system call inclusion and defines

2023-03-31 Thread Warner Losh
Remove NetBSD system call inclusion and defines. We've not supported building all the BSDs into one module for some time, and the NetBSD support hasn't even built since the meson conversion. Signed-off-by: Warner Losh --- bsd-user/syscall_defs.h | 16 1 file c

[PATCH 5/7] bsd-user: Remove openbsd system call tracing

2023-03-31 Thread Warner Losh
Remove OpenBSD system call tracing. We've not supported building all the BSDs into one module for some time, and the OpenBSD support hasn't even built since the meson conversion. Signed-off-by: Warner Losh --- bsd-user/qemu.h | 5 - bsd-user/strace.c | 17

[PATCH 7/7] bsd-user: Remove openbsd directory

2023-03-31 Thread Warner Losh
The OpenBSD support in the bsd-user fork can't even compile. It is being removed there. Remove it here as well. If someone wants to revive it, then I'm happy to help them do so. This hasn't built since the conversion to meson. Signed-off-by: Warner Losh --- bsd-user/op

[PATCH 4/7] bsd-user: Remove openbsd system call inclusion and defines

2023-03-31 Thread Warner Losh
Remove OpenBSD system call inclusion and defines. We've not supported building all the BSDs into one module for some time, and the OpenBSD support hasn't even built since the meson conversion. --- bsd-user/syscall_defs.h | 13 + 1 file changed, 1 insertion(+), 12 deletions(-) diff --g

[PATCH 6/7] bsd-user: Remove netbsd directory

2023-03-31 Thread Warner Losh
The NetBSD support in the bsd-user fork can't even compile. It is being removed there. Remove it here as well. If someone wants to revive it, then I'm happy to help them do so. This hasn't built since the conversion to meson. Signed-off-by: Warner Losh --- bsd-user/n

Re: [PATCH 0/7] bsd-user: remove bitrotted NetBSD and OpenBSD bsd-user support

2023-04-01 Thread Warner Losh
t; Dear Qemu folks, > > I'll throw it in the NetBSD group for feedback. > > With regards, > Reinoud > > On Fri, Mar 31, 2023 at 08:18:26AM -0600, Warner Losh wrote: > > The NetBSD and OpenBSD support in bsd-user hasn't built since before the > meson >

Re: [PATCH 0/7] bsd-user: remove bitrotted NetBSD and OpenBSD bsd-user support

2023-04-02 Thread Warner Losh
eventually become what's in qemu-project's master branch. I'll replace this series with some other changes that try to accomplish the same base goals. Warner On Fri, Mar 31, 2023 at 8:19 AM Warner Losh wrote: > The NetBSD and OpenBSD support in bsd-user hasn't built sinc

Re: [RFC PATCH] gdbstub: don't report auxv feature unless on Linux

2023-04-03 Thread Warner Losh
SER_ONLY) && defined(CONFIG_LINUX) > > if (gdbserver_state.c_cpu->opaque) { > > g_string_append(gdbserver_state.str_buf, ";qXfer:auxv:read+"); > > } > > Fixes: 51c623b0de ("gdbstub: add support to Xfer:auxv:read: packet") > Repor

Re: [PATCH v2 05/10] bsd-user: Add '-one-insn-per-tb' option equivalent to '-singlestep'

2023-04-03 Thread Warner Losh
> It looks good in theory. It may even compile. If ti does: Reviewed-by: Warner Losh > docs/user/main.rst | 7 ++- > bsd-user/main.c| 5 +++-- > 2 files changed, 9 insertions(+), 3 deletions(-) > > diff --git a/docs/user/main.rst b/docs/user/main.rst > index f

Re: [PATCH v2 04/10] linux-user: Add '-one-insn-per-tb' option equivalent to '-singlestep'

2023-04-03 Thread Warner Losh
gt; and eventually perhaps drop it. > > > > Signed-off-by: Peter Maydell > > --- > > docs/user/main.rst | 7 ++- > > linux-user/main.c | 9 ++--- > > 2 files changed, 12 insertions(+), 4 deletions(-) > > Reviewed-by: Richard Henderson > Reviewed-by: Warner Losh > r~ >

[PATCH 04/16] bsd-user: Move system FreeBSD call table to freebsd/os-syscall.c

2023-04-05 Thread Warner Losh
Move the system call table, and FreeBSD helper routines out of strace.c. We do not support multiple BSD-types in one binary, so simplify things by moving it. Signed-off-by: Warner Losh --- bsd-user/freebsd/os-syscall.c | 19 +++ bsd-user/qemu.h | 5 - bsd-user

[PATCH 02/16] bsd-user: Ifdef a few MAP_ constants for NetBSD

2023-04-05 Thread Warner Losh
MAP_GUARD, MAP_EXCL, and MAP_NOCORE are FreeBSD only. Add back the ifdefs that I removed in 36d5d891559f (but only these ifdefs, the rest of the commit is not reverted). Signed-off-by: Warner Losh --- bsd-user/mmap.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/bsd-user

[PATCH 14/16] bsd-user: Implment core dumps

2023-04-05 Thread Warner Losh
on in 227070562fc in one commit, with very few followup tweaks). Since the original commit, this code has been moved, and updated by sson and ed slightly. That makes it hard to split into smaller commits. Signed-off-by: Stacey Son Signed-off-by: Ed Schouten Signed-off-by: Warner Losh --- bsd

[PATCH 05/16] bsd-user: Remove NetBSD specific syscall printing

2023-04-05 Thread Warner Losh
Nothing calls these routines now. In the bsd-user fork, though, they've moved to netbsd/os-syscall.c, but those aren't ready for upstreaming. Signed-off-by: Warner Losh --- bsd-user/qemu.h | 5 - bsd-user/strace.c | 17 - 2 files changed, 22 deletions(-) diff -

[PATCH 15/16] bsd-user: Add SIGSYS to core dump signals.

2023-04-05 Thread Warner Losh
SIGSYS creates a core by default if uncaught. Follow that here. Sort with the same order as is in the kernel. Signed-off-by: Warner Losh --- bsd-user/signal.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/bsd-user/signal.c b/bsd-user/signal.c index

[PATCH 03/16] bsd-user: Cleanup style.

2023-04-05 Thread Warner Losh
The only diffs between bsd-user fork and qemu upstream is style. Make mmap.c pass checkpatch.pl. Signed-off-by: Warner Losh --- bsd-user/mmap.c | 91 - 1 file changed, 60 insertions(+), 31 deletions(-) diff --git a/bsd-user/mmap.c b/bsd-user

[PATCH 10/16] bsd-user: Implmenet do_sysctl_kern_getprocs

2023-04-05 Thread Warner Losh
From: Stacey Son Implement do_sysctl_kern_getprocs to retrieve proc info from the kernel. Signed-off-by: Stacey Son Signed-off-by: Warner Losh --- bsd-user/freebsd/os-sys.c | 165 +- bsd-user/qemu.h | 3 + 2 files changed, 167 insertions(+), 1

[PATCH 01/16] bsd-user: Make print_* public

2023-04-05 Thread Warner Losh
Make these functions public. Due to coming restructuring, we'll need to call these from *bsd/os-syscall.c. Add declarations to qemu.h. Signed-off-by: Warner Losh --- bsd-user/qemu.h | 20 bsd-user/strace.c | 29 + 2 files changed, 33 inser

[PATCH 09/16] bsd-user: h2g_rusage

2023-04-05 Thread Warner Losh
From: Stacey Son Converts host's rusage to the guest's rusage. Signed-off-by: Stacey Son Signed-off-by: Warner Losh --- bsd-user/bsd-proc.c | 48 bsd-user/meson.build | 1 + bsd-user/qemu-bsd.h | 30 +++ 3 fil

[PATCH 06/16] bsd-user: Remove OpenBSD specific syscall printing

2023-04-05 Thread Warner Losh
Nothing calls these routines now. In the bsd-user fork, though, they've moved to openbsd/os-syscall.c, but those aren't ready for upstreaming. Signed-off-by: Warner Losh --- bsd-user/qemu.h | 5 - bsd-user/strace.c | 25 - 2 files changed, 30 deletion

[PATCH 13/16] bsd-user: Implement sysctl kern.proc, except kern.proc.full_path

2023-04-05 Thread Warner Losh
From: Stacey Son Use the recently committed conversion routines to implement all the kern.proc flavors, except for the full path (the prereqs of which aren't yet in qemu-project's master branch). Signed-off-by: Stacey Son Signed-off-by: Warner Losh --- bsd-user/freebsd/os-

[PATCH 16/16] bsd-user: Implement SIGSYS on arm

2023-04-05 Thread Warner Losh
When a system call returns ENOSYS, send a SIGSYS to the process (to generate a core dump). Signed-off-by: Warner Losh --- bsd-user/arm/target_arch_cpu.h | 8 1 file changed, 8 insertions(+) diff --git a/bsd-user/arm/target_arch_cpu.h b/bsd-user/arm/target_arch_cpu.h index 517d0087644

[PATCH 08/16] bsd-user: Remove useless mmap definitions

2023-04-05 Thread Warner Losh
On BSD, all architectures have the same mmap flags. Since we don't translate the flags, we don't need these defines here. We can't cross-run different BSD binaries. Signed-off-by: Warner Losh --- bsd-user/syscall_defs.h | 36 1 file change

[PATCH 00/16] bsd-user 2023 Q2 first batch

2023-04-05 Thread Warner Losh
bsd-user: h2g_rusage bsd-user: Implmenet do_sysctl_kern_getprocs bsd-user: Implement do_sysctl_kern_proc_filedesc bsd-user: Implement do_sysctl_kern_proc_vmmap bsd-user: Implement sysctl kern.proc, except kern.proc.full_path bsd-user: Implment core dumps Warner Losh (10): bsd-user:

[PATCH 07/16] bsd-user: Move system call include to os-syscall.h

2023-04-05 Thread Warner Losh
Move the include of the system calls to os-syscall.h. Include that from syscall_defs.h. Use target_time_t and target_suseconds_t instead of the variant that has _freebsd_ in the name. Define these for OpenBSD and NetBSD based on comments in the file. Signed-off-by: Warner Losh --- bsd-user

[PATCH 12/16] bsd-user: Implement do_sysctl_kern_proc_vmmap

2023-04-05 Thread Warner Losh
From: Stacey Son Implement do_sysctl_kern_proc_vmmap. This pulls kern.proc.vmmap out of the host kernel and converts it to the guest's format. Signed-off-by: Stacey Son Signed-off-by: Warner Losh --- bsd-user/freebsd/os-sys.c | 115 ++ bsd-user/q

[PATCH 11/16] bsd-user: Implement do_sysctl_kern_proc_filedesc

2023-04-05 Thread Warner Losh
From: Stacey Son Implement do_sysctl_kern_proc_filedesc. This pulls kern.proc.filedesc out of the host kernel and converts it to the guest's format. Signed-off-by: Stacey Son Signed-off-by: Warner Losh --- bsd-user/freebsd/os-sys.c | 193 ++ bsd

Re: [PATCH 02/16] bsd-user: Ifdef a few MAP_ constants for NetBSD

2023-04-08 Thread Warner Losh
On Sat, Apr 8, 2023 at 1:03 PM Richard Henderson < [email protected]> wrote: > On 4/5/23 14:35, Warner Losh wrote: > > MAP_GUARD, MAP_EXCL, and MAP_NOCORE are FreeBSD only. Add back the > > ifdefs that I removed in 36d5d891559f (but only these ifdefs, the > >

Re: [PATCH 14/16] bsd-user: Implment core dumps

2023-04-08 Thread Warner Losh
On Sat, Apr 8, 2023 at 1:15 PM Richard Henderson < [email protected]> wrote: > On 4/5/23 14:36, Warner Losh wrote: > > From: Stacey Son > > > > Bring in the code that was originally copied from linxu-user/elfload.c > > and moved to elfcore.c. This cod

Re: qemu-user: avoid allocations to convert stuff when not necessary

2023-04-09 Thread Warner Losh
On Sun, Apr 9, 2023 at 2:53 AM Michael Tokarev wrote: > Hi! > > In the qemu-user case, we allocate various structures and arrays > for conversion of data between host and guest byte orders and sizes. > But it is actually not necessary to do such allocation when the > *size* is the same, and only

Re: [PATCH 14/16] bsd-user: Implment core dumps

2023-04-10 Thread Warner Losh
On Sat, Apr 8, 2023 at 11:00 PM Warner Losh wrote: > > > On Sat, Apr 8, 2023 at 1:15 PM Richard Henderson < > [email protected]> wrote: > >> On 4/5/23 14:36, Warner Losh wrote: >> > From: Stacey Son >> > >> > Bring in the cod

Re: [PATCH 07/16] bsd-user: Move system call include to os-syscall.h

2023-04-10 Thread Warner Losh
On Sat, Apr 8, 2023 at 1:08 PM Richard Henderson < [email protected]> wrote: > On 4/5/23 14:36, Warner Losh wrote: > > @@ -98,11 +75,9 @@ struct target_iovec { > >* sys/timex.h > >*/ > > > > -typedef abi_long target_freebsd_suseconds_t; &

[PATCH v2 05/19] bsd-user: Remove NetBSD specific syscall printing

2023-04-10 Thread Warner Losh
Nothing calls these routines now. In the bsd-user fork, though, they've moved to netbsd/os-syscall.c, but those aren't ready for upstreaming. Signed-off-by: Warner Losh Reviewed-by: Richard Henderson --- bsd-user/qemu.h | 5 - bsd-user/strace.c | 17 - 2 fil

[PATCH v2 06/19] bsd-user: Remove OpenBSD specific syscall printing

2023-04-10 Thread Warner Losh
Nothing calls these routines now. In the bsd-user fork, though, they've moved to openbsd/os-syscall.c, but those aren't ready for upstreaming. Signed-off-by: Warner Losh Reviewed-by: Richard Henderson --- bsd-user/qemu.h | 5 - bsd-user/strace.c | 25

[PATCH v2 01/19] bsd-user: Make print_* public

2023-04-10 Thread Warner Losh
Make these functions public. Due to coming restructuring, we'll need to call these from *bsd/os-syscall.c. Add declarations to qemu.h. Signed-off-by: Warner Losh Reviewed-by: Richard Henderson --- bsd-user/qemu.h | 20 bsd-user/strace.c

[PATCH v2 03/19] bsd-user: Cleanup style.

2023-04-10 Thread Warner Losh
The only diffs between bsd-user fork and qemu upstream is style. Make mmap.c pass checkpatch.pl. Signed-off-by: Warner Losh Acked-by: Richard Henderson --- bsd-user/mmap.c | 91 - 1 file changed, 60 insertions(+), 31 deletions(-) diff --git a

[PATCH v2 10/19] bsd-user: Implement do_sysctl_kern_getprocs

2023-04-10 Thread Warner Losh
From: Stacey Son Implement do_sysctl_kern_getprocs to retrieve proc info from the kernel. Signed-off-by: Stacey Son Signed-off-by: Warner Losh Reviewed-by: Richard Henderson --- bsd-user/freebsd/os-sys.c | 165 +- bsd-user/qemu.h | 3 + 2

[PATCH v2 00/19] bsd-user 2023 Q2 first batch

2023-04-10 Thread Warner Losh
or parts 2, 17, 18, 19 for sure. Parts 3 and 14 just have Acked-by. Stacey Son (6): bsd-user: h2g_rusage bsd-user: Implement do_sysctl_kern_getprocs bsd-user: Implement do_sysctl_kern_proc_filedesc bsd-user: Implement do_sysctl_kern_proc_vmmap bsd-user: Implement sysctl kern.proc, except kern.proc.fu

[PATCH v2 12/19] bsd-user: Implement do_sysctl_kern_proc_vmmap

2023-04-10 Thread Warner Losh
From: Stacey Son Implement do_sysctl_kern_proc_vmmap. This pulls kern.proc.vmmap out of the host kernel and converts it to the guest's format. Signed-off-by: Stacey Son Signed-off-by: Warner Losh Reviewed-by: Richard Henderson --- bsd-user/freebsd/os-sys.c

[PATCH v2 08/19] bsd-user: Remove useless mmap definitions

2023-04-10 Thread Warner Losh
On BSD, all architectures have the same mmap flags. Since we don't translate the flags, we don't need these defines here. We can't cross-run different BSD binaries. Signed-off-by: Warner Losh Reviewed-by: Richard Henderson --- bsd-user/sysc

[PATCH v2 15/19] bsd-user: Add SIGSYS to core dump signals.

2023-04-10 Thread Warner Losh
SIGSYS creates a core by default if uncaught. Follow that here. Sort with the same order as is in the kernel. Signed-off-by: Warner Losh Reviewed-by: Richard Henderson --- bsd-user/signal.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/bsd-user/signal.c b

[PATCH v2 16/19] bsd-user: Implement SIGSYS on arm

2023-04-10 Thread Warner Losh
When a system call returns ENOSYS, send a SIGSYS to the process (to generate a core dump). Signed-off-by: Warner Losh Reviewed-by: Richard Henderson --- bsd-user/arm/target_arch_cpu.h | 8 1 file changed, 8 insertions(+) diff --git a/bsd-user/arm/target_arch_cpu.h b/bsd-user/arm

[PATCH v2 13/19] bsd-user: Implement sysctl kern.proc, except kern.proc.full_path

2023-04-10 Thread Warner Losh
From: Stacey Son Use the recently committed conversion routines to implement all the kern.proc flavors, except for the full path (the prereqs of which aren't yet in qemu-project's master branch). Signed-off-by: Stacey Son Signed-off-by: Warner Losh Reviewed-by: Richard Henderson

[PATCH v2 07/19] bsd-user: Move system call include to os-syscall.h

2023-04-10 Thread Warner Losh
Move the include of the system calls to os-syscall.h. Include that from syscall_defs.h. Use target_time_t and target_suseconds_t instead of the variant that has _freebsd_ in the name. Define these for OpenBSD and NetBSD based on comments in the file. Signed-off-by: Warner Losh Reviewed-by

[PATCH v2 11/19] bsd-user: Implement do_sysctl_kern_proc_filedesc

2023-04-10 Thread Warner Losh
From: Stacey Son Implement do_sysctl_kern_proc_filedesc. This pulls kern.proc.filedesc out of the host kernel and converts it to the guest's format. Signed-off-by: Stacey Son Signed-off-by: Warner Losh Reviewed-by: Richard Henderson --- bsd-user/freebsd/os-sys.c

[PATCH v2 18/19] bsd-user: Update system call list

2023-04-10 Thread Warner Losh
the few lines of code for the new system calls. Signed-off-by: Warner Losh --- bsd-user/freebsd/os-syscall.h |2 + bsd-user/freebsd/syscall_nr.h | 1035 + 2 files changed, 529 insertions(+), 508 deletions(-) diff --git a/bsd-user/freebsd/os-syscall.h b/bsd

[PATCH v2 04/19] bsd-user: Move system FreeBSD call table to freebsd/os-syscall.c

2023-04-10 Thread Warner Losh
Move the system call table, and FreeBSD helper routines out of strace.c. We do not support multiple BSD-types in one binary, so simplify things by moving it. Signed-off-by: Warner Losh Reviewed-by: Richard Henderson --- bsd-user/freebsd/os-syscall.c | 19 +++ bsd-user/qemu.h

[PATCH v2 17/19] bsd-user: Remove host-os.h

2023-04-10 Thread Warner Losh
It only defines the default system call scheme to use. However, that feature was removed in a941a16f6f52. Signed-off-by: Warner Losh --- bsd-user/freebsd/host-os.h | 25 - bsd-user/main.c| 1 - bsd-user/netbsd/host-os.h | 25 - bsd

[PATCH v2 14/19] bsd-user: Implement core dumps

2023-04-10 Thread Warner Losh
on in 227070562fc in one commit, with very few followup tweaks). Since the original commit, this code has been moved, and updated by sson and ed slightly. That makes it hard to split into smaller commits. Signed-off-by: Stacey Son Signed-off-by: Ed Schouten Signed-off-by: Warner Losh Acked-by: Ri

[PATCH v2 02/19] bsd-user: Ifdef a few MAP_ constants for NetBSD / OpenBSD.

2023-04-10 Thread Warner Losh
MAP_GUARD, MAP_EXCL, and MAP_NOCORE are FreeBSD only. Define them to be 0 if they aren't defined, and rely on the compiler to optimize away sections not relevant. Added only to the top of mmap.c since that's the only place we need this. Signed-off-by: Warner Losh --- bsd-user/m

[PATCH v2 09/19] bsd-user: h2g_rusage

2023-04-10 Thread Warner Losh
From: Stacey Son Converts host's rusage to the guest's rusage. Signed-off-by: Stacey Son Signed-off-by: Warner Losh Reviewed-by: Richard Henderson --- bsd-user/bsd-proc.c | 48 bsd-user/meson.build | 1 + bsd-user/qemu-b

[PATCH v2 19/19] bsd-user: Eliminate USE_ELF_CORE_DUMP

2023-04-10 Thread Warner Losh
It's enabled on all platforms (even in the fork), so we can remove it from here. Signed-off-by: Warner Losh --- bsd-user/arm/target_arch_elf.h| 1 - bsd-user/elfcore.c| 3 --- bsd-user/elfload.c| 5 - bsd-user/i386/target_arch_elf.h | 1 - bsd

Re: [PATCH v2 18/19] bsd-user: Update system call list

2023-04-10 Thread Warner Losh
On Mon, Apr 10, 2023 at 7:37 PM Richard Henderson < [email protected]> wrote: > On 4/10/23 11:20, Warner Losh wrote: > > Update the system call list. We have one hokey thing in here for swapoff > > that depends on the version number (so this is not completely

Re: [PATCH v2 18/19] bsd-user: Update system call list

2023-04-11 Thread Warner Losh
On Mon, Apr 10, 2023 at 7:37 PM Richard Henderson < [email protected]> wrote: > On 4/10/23 11:20, Warner Losh wrote: > > Update the system call list. We have one hokey thing in here for swapoff > > that depends on the version number (so this is not completely

[PATCH v3 02/20] bsd-user: Ifdef a few MAP_ constants for NetBSD / OpenBSD.

2023-04-11 Thread Warner Losh
MAP_GUARD, MAP_EXCL, and MAP_NOCORE are FreeBSD only. Define them to be 0 if they aren't defined, and rely on the compiler to optimize away sections not relevant. Added only to the top of mmap.c since that's the only place we need this. Signed-off-by: Warner Losh Reviewed-by: Richard

[PATCH v3 00/20] bsd-user 2023 Q2 first batch

2023-04-11 Thread Warner Losh
_getprocs bsd-user: Implement do_sysctl_kern_proc_filedesc bsd-user: Implement do_sysctl_kern_proc_vmmap bsd-user: Implement sysctl kern.proc, except kern.proc.full_path bsd-user: Implement core dumps Warner Losh (14): bsd-user: Make print_* public bsd-user: Ifdef a few MAP_ constants for

[PATCH v3 04/20] bsd-user: Move system FreeBSD call table to freebsd/os-syscall.c

2023-04-11 Thread Warner Losh
Move the system call table, and FreeBSD helper routines out of strace.c. We do not support multiple BSD-types in one binary, so simplify things by moving it. Signed-off-by: Warner Losh Reviewed-by: Richard Henderson --- bsd-user/freebsd/os-syscall.c | 19 +++ bsd-user/qemu.h

[PATCH v3 01/20] bsd-user: Make print_* public

2023-04-11 Thread Warner Losh
Make these functions public. Due to coming restructuring, we'll need to call these from *bsd/os-syscall.c. Add declarations to qemu.h. Signed-off-by: Warner Losh Reviewed-by: Richard Henderson --- bsd-user/qemu.h | 20 bsd-user/strace.c

[PATCH v3 05/20] bsd-user: Remove NetBSD specific syscall printing

2023-04-11 Thread Warner Losh
Nothing calls these routines now. In the bsd-user fork, though, they've moved to netbsd/os-syscall.c, but those aren't ready for upstreaming. Signed-off-by: Warner Losh Reviewed-by: Richard Henderson --- bsd-user/qemu.h | 5 - bsd-user/strace.c | 17 - 2 fil

[PATCH v3 12/20] bsd-user: Implement do_sysctl_kern_proc_vmmap

2023-04-11 Thread Warner Losh
From: Stacey Son Implement do_sysctl_kern_proc_vmmap. This pulls kern.proc.vmmap out of the host kernel and converts it to the guest's format. Signed-off-by: Stacey Son Signed-off-by: Warner Losh Reviewed-by: Richard Henderson --- bsd-user/freebsd/os-sys.c

[PATCH v3 10/20] bsd-user: Implement do_sysctl_kern_getprocs

2023-04-11 Thread Warner Losh
From: Stacey Son Implement do_sysctl_kern_getprocs to retrieve proc info from the kernel. Signed-off-by: Stacey Son Signed-off-by: Warner Losh Reviewed-by: Richard Henderson --- bsd-user/freebsd/os-sys.c | 165 +- bsd-user/qemu.h | 3 + 2

[PATCH v3 19/20] bsd-user: remove syscall_nr.h

2023-04-11 Thread Warner Losh
It's generated now, so just remove it. --- bsd-user/freebsd/syscall_nr.h | 515 -- 1 file changed, 515 deletions(-) delete mode 100644 bsd-user/freebsd/syscall_nr.h diff --git a/bsd-user/freebsd/syscall_nr.h b/bsd-user/freebsd/syscall_nr.h deleted file mode 100644

[PATCH v3 13/20] bsd-user: Implement sysctl kern.proc, except kern.proc.full_path

2023-04-11 Thread Warner Losh
From: Stacey Son Use the recently committed conversion routines to implement all the kern.proc flavors, except for the full path (the prereqs of which aren't yet in qemu-project's master branch). Signed-off-by: Stacey Son Signed-off-by: Warner Losh Reviewed-by: Richard Henderson

[PATCH v3 07/20] bsd-user: Move system call include to os-syscall.h

2023-04-11 Thread Warner Losh
Move the include of the system calls to os-syscall.h. Include that from syscall_defs.h. Use target_time_t and target_suseconds_t instead of the variant that has _freebsd_ in the name. Define these for OpenBSD and NetBSD based on comments in the file. Signed-off-by: Warner Losh Reviewed-by

[PATCH v3 14/20] bsd-user: Implement core dumps

2023-04-11 Thread Warner Losh
on in 227070562fc in one commit, with very few followup tweaks). Since the original commit, this code has been moved, and updated by sson and ed slightly. That makes it hard to split into smaller commits. Signed-off-by: Stacey Son Signed-off-by: Ed Schouten Signed-off-by: Warner Losh Acked-by: Ri

[PATCH v3 06/20] bsd-user: Remove OpenBSD specific syscall printing

2023-04-11 Thread Warner Losh
Nothing calls these routines now. In the bsd-user fork, though, they've moved to openbsd/os-syscall.c, but those aren't ready for upstreaming. Signed-off-by: Warner Losh Reviewed-by: Richard Henderson --- bsd-user/qemu.h | 5 - bsd-user/strace.c | 25

[PATCH v3 17/20] bsd-user: Remove host-os.h

2023-04-11 Thread Warner Losh
It only defines the default system call scheme to use. However, that feature was removed in a941a16f6f52. Signed-off-by: Warner Losh Reviewed-by: Richard Henderson --- bsd-user/freebsd/host-os.h | 25 - bsd-user/main.c| 1 - bsd-user/netbsd/host-os.h | 25

[PATCH v3 18/20] bsd-user: Automatically generate syscall_nr.h

2023-04-11 Thread Warner Losh
Automatically generate syscall_nr.h from /usr/include/sys/syscall.h since we can only run on a system that matches... This should reduce the churn in the future. Signed-off-by: Warner Losh --- bsd-user/freebsd/os-syscall.h | 2 +- bsd-user/meson.build | 4 bsd-user/syscallhdr.sh

  1   2   3   4   5   6   7   8   9   10   >