Re: [PATCH for-8.2 v3 1/6] vfio/migration: Move from STOP_COPY to STOP in vfio_save_cleanup()

2023-08-12 Thread Avihai Horon
On 11/08/2023 13:29, Cédric Le Goater wrote: External email: Use caution opening links or attachments On 8/8/23 08:23, Avihai Horon wrote: On 07/08/2023 18:53, Cédric Le Goater wrote: External email: Use caution opening links or attachments [ Adding Juan and Peter for their awareness ]

Re: [PATCH] Fix signal handler to detect crashes in qemu-linux-user

2023-08-12 Thread Richard Henderson
On 8/12/23 11:12, Helge Deller wrote: I did mention that you should look at adjust_signal_pc, Yes, you did. Maybe I was blind or didn't fully understood yet. which has a lot of commentary on the subject. (0) Place this after the write-protect and restart check just below, since that is not a

Re: [PATCH] Fix signal handler to detect crashes in qemu-linux-user

2023-08-12 Thread Helge Deller
* Richard Henderson : > On 8/12/23 09:43, Helge Deller wrote: > > +/* _init and _fini are provided by the linker */ > > +extern char _init; > > +extern char _fini; > > + > > static void host_signal_handler(int host_sig, siginfo_t *info, void *puc) > > { > > CPUArchState *env = thread_cpu-

Re: [PULL 0/2] pci: last minute bugfixes

2023-08-12 Thread Michael S. Tsirkin
On Fri, Aug 11, 2023 at 06:41:53PM +0100, Peter Maydell wrote: > On Fri, 11 Aug 2023 at 17:18, Michael S. Tsirkin wrote: > > > > The following changes since commit 15b11a1da6a4b7c6b8bb37883f52b544dee2b8fd: > > > > cryptodev: Handle unexpected request to avoid crash (2023-08-03 16:16:17 > > -040

Re: [PATCH] Fix signal handler to detect crashes in qemu-linux-user

2023-08-12 Thread Richard Henderson
On 8/12/23 09:43, Helge Deller wrote: +/* _init and _fini are provided by the linker */ +extern char _init; +extern char _fini; + static void host_signal_handler(int host_sig, siginfo_t *info, void *puc) { CPUArchState *env = thread_cpu->env_ptr; @@ -819,6 +848,13 @@ static void host_si

Re: [PATCH 20/24] tcg/i386: Add cf parameter to tcg_out_cmp

2023-08-12 Thread Richard Henderson
On 8/11/23 08:06, Richard Henderson wrote: Basically, test sets SZ flags, where cmp sets SZCO.  I want to add an optimizaton using C, so "cmp 0,x" should not be silently replaced by "test x,x". This patch can be dropped entirely. TEST clears C (which cmp vs 0 would also do). I was mis-remembe

[PATCH] Fix signal handler to detect crashes in qemu-linux-user

2023-08-12 Thread Helge Deller
If there is an internal program error in the qemu source code which triggers a SIGSEGV, qemu will currently assume this is a SIGSEGV of the target and print: (hppa-chroot)root@p100:/# cat /proc/self/maps ** ERROR:../../home/cvs/qemu/qemu/accel/tcg/cpu-exec.c:532:cpu_exec_longjmp_cleanup: assertio

[PATCH for-8.1] tcg/i386: Output %gs prefix in tcg_out_vex_opc

2023-08-12 Thread Richard Henderson
Missing the segment prefix means that user-only fails to add guest_base for some 128-bit load/store. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1763 Fixes: 098d0fc10d2 ("tcg/i386: Support 128-bit load/store") Signed-off-by: Richard Henderson --- tcg/i386/tcg-target.c.inc | 3 +++ 1

Re: [PATCH] meson: Fix MESONINTROSPECT parsing

2023-08-12 Thread Michael Tokarev
12.08.2023 15:09, Akihiko Odaki wrote: Please do NOT merge this. This will break Windows builds. I'm putting this patch on hold. I don't think this is something to rush about, it definitely can wait 8.2 development cycle. /mjt

[PATCH RFC 5/7] softmmu/vl.c: inline include/qemu/qemu-options.h into vl.c

2023-08-12 Thread Michael Tokarev
qemu-options.h just includes qemu-options.def with some #defines. We already do this in vl.c in other place. Since no other file includes qemu-options.h anymore, just inline it in vl.c. This effectively reverts second half of commit 59a5264b99434. Signed-off-by: Michael Tokarev --- include/qemu

[PATCH RFC 4/7] os-posix.c, softmmu/vl.c: move os_parse_cmd_args() into qemu_init()

2023-08-12 Thread Michael Tokarev
This will stop linking softmmu-specific os_parse_cmd_args() into every qemu executable which happens to use other functions from os-posix.c, such as os_set_line_buffering() or os_setup_signal_handling(). Also, since there's no win32-specific options, *all* option parsing is now done in softmmu/vl.

[PATCH RFC 3/7] os-posix.c: create and export os_set_chroot()

2023-08-12 Thread Michael Tokarev
Signed-off-by: Michael Tokarev --- include/sysemu/os-posix.h | 1 + os-posix.c| 9 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/include/sysemu/os-posix.h b/include/sysemu/os-posix.h index d32630f9e7..8a66763395 100644 --- a/include/sysemu/os-posix.h +++

[PATCH RFC 7/7] util/async-teardown.c: move to softmmu/, only build it when system build is requested

2023-08-12 Thread Michael Tokarev
Signed-off-by: Michael Tokarev --- {util => softmmu}/async-teardown.c | 0 softmmu/meson.build| 1 + util/meson.build | 1 - 3 files changed, 1 insertion(+), 1 deletion(-) rename {util => softmmu}/async-teardown.c (100%) diff --git a/util/async-teardown.c b/sof

[PATCH RFC 0/7] move softmmu options processing from os-posix.c to vl.c

2023-08-12 Thread Michael Tokarev
qemu_init() calls os_parse_cmd_args(), which is obviously a very vl.c-specicic piece of code. It looks like when moving vl.c to softmmu/, os-posix.c should've been moved too (together with os-win32.c). But there are other functions in os-posix.c which are used by other parts of the code, eg qemu-

[PATCH RFC 6/7] os-posix.c: move code around

2023-08-12 Thread Michael Tokarev
this moves code blocks so that functions and variables which belongs to the same concept are now close to each other. There's no actual code changes in there. Signed-off-by: Michael Tokarev --- os-posix.c | 49 +++-- 1 file changed, 27 insertions(+), 2

[PATCH RFC 1/7] include/sysemu/os-posix.h: move *daemonize* declaration together

2023-08-12 Thread Michael Tokarev
Signed-off-by: Michael Tokarev --- include/sysemu/os-posix.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/include/sysemu/os-posix.h b/include/sysemu/os-posix.h index 1030d39904..65b9c94e91 100644 --- a/include/sysemu/os-posix.h +++ b/include/sysemu/os-posix.h @@ -47,13

[PATCH RFC 2/7] os-posix: create and export os_set_runas()

2023-08-12 Thread Michael Tokarev
Signed-off-by: Michael Tokarev --- include/sysemu/os-posix.h | 1 + os-posix.c| 23 --- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/include/sysemu/os-posix.h b/include/sysemu/os-posix.h index 65b9c94e91..d32630f9e7 100644 --- a/include/syse

Re: [PATCH] meson: Fix MESONINTROSPECT parsing

2023-08-12 Thread Akihiko Odaki
On 2023/08/12 15:15, Akihiko Odaki wrote: The arguments in MESONINTROSPECT are quoted with shlex.quote() so it must be parsed with shlex.split(). Fixes: cf60ccc330 ("cutils: Introduce bundle mechanism") Reported-by: Michael Tokarev Signed-off-by: Akihiko Odaki --- scripts/symlink-install-tre

Re: [PATCH] meson: Fix MESONINTROSPECT parsing

2023-08-12 Thread Paolo Bonzini
Please apply this patch without my intervention, I won't have access to Gitlab for a few days. Paolo Il sab 12 ago 2023, 11:16 Akihiko Odaki ha scritto: > On 2023/08/12 17:01, Michael Tokarev wrote: > > 12.08.2023 09:15, Akihiko Odaki wrote: > >> The arguments in MESONINTROSPECT are quoted with

Re: [PATCH] meson: Use subprocess.check_output()

2023-08-12 Thread Michael Tokarev
12.08.2023 12:11, Akihiko Odaki wrote: subprocess.check_output() is a more concise way to execute a subprocess here. Signed-off-by: Akihiko Odaki --- Based-on: <20230812061540.5398-1-akihiko.od...@daynix.com> ("[PATCH] meson: Fix MESONINTROSPECT parsing") scripts/symlink-install-tree.py | 3

Re: util/async-teardown.c: is it really needed for --disable-system build?

2023-08-12 Thread Michael Tokarev
12.08.2023 12:38, Michael Tokarev wrote: ... It smells like, at the very least, os-posix.c should be split. We shouldn't include a ton of qemu-system functionality (like very specific option parsing) into qemu-nbd for example. How about splitting os-posix.c into a few files in util/ (not in th

util/async-teardown.c: is it really needed for --disable-system build?

2023-08-12 Thread Michael Tokarev
Hi! On Debian we're building qemu tools (eg qemu-img &Co) on systems which don't support qemu-system. And after commit c891c24b1a "os-posix: asynchronous teardown for shutdown on Linux", this fails on certain architectures too, notable on ia64. This is because ia64 does not have the "traditiona

Re: [PATCH] meson: Fix MESONINTROSPECT parsing

2023-08-12 Thread Akihiko Odaki
On 2023/08/12 17:01, Michael Tokarev wrote: 12.08.2023 09:15, Akihiko Odaki wrote: The arguments in MESONINTROSPECT are quoted with shlex.quote() so it must be parsed with shlex.split(). Fixes: cf60ccc330 ("cutils: Introduce bundle mechanism") Reported-by: Michael Tokarev Signed-off-by: Akihik

[PATCH] meson: Use subprocess.check_output()

2023-08-12 Thread Akihiko Odaki
subprocess.check_output() is a more concise way to execute a subprocess here. Signed-off-by: Akihiko Odaki --- Based-on: <20230812061540.5398-1-akihiko.od...@daynix.com> ("[PATCH] meson: Fix MESONINTROSPECT parsing") scripts/symlink-install-tree.py | 3 +-- 1 file changed, 1 insertion(+), 2 del

[PATCH] hw/block/fdc: do not set SEEK status bit in multi track commands

2023-08-12 Thread Hervé Poussineau
I don't understand when SEEK must be set or not, but it seems to fix Minix... Fixes: https://gitlab.com/qemu-project/qemu/-/issues/1522 Signed-off-by: Hervé Poussineau --- hw/block/fdc.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/block/fdc.c b/hw/block/fdc.c index d7cc4d3ec19..f627bba

Re: [PATCH] meson: Fix MESONINTROSPECT parsing

2023-08-12 Thread Philippe Mathieu-Daudé
On 12/8/23 08:15, Akihiko Odaki wrote: The arguments in MESONINTROSPECT are quoted with shlex.quote() so it must be parsed with shlex.split(). Fixes: cf60ccc330 ("cutils: Introduce bundle mechanism") Reported-by: Michael Tokarev Signed-off-by: Akihiko Odaki --- scripts/symlink-install-tree.p

Re: [PATCH] meson: Fix MESONINTROSPECT parsing

2023-08-12 Thread Michael Tokarev
12.08.2023 09:15, Akihiko Odaki wrote: The arguments in MESONINTROSPECT are quoted with shlex.quote() so it must be parsed with shlex.split(). Fixes: cf60ccc330 ("cutils: Introduce bundle mechanism") Reported-by: Michael Tokarev Signed-off-by: Akihiko Odaki --- scripts/symlink-install-tree.p