Re: [PULL 0/2] M68k for 7.2 patches

2022-10-17 Thread Laurent Vivier
Le 17/10/2022 à 05:56, Jason A. Donenfeld via a écrit : On Sun, Oct 16, 2022 at 03:50:54PM -0400, Stefan Hajnoczi wrote: On Fri, 14 Oct 2022 at 03:26, Laurent Vivier wrote: The following changes since commit f1d33f55c47dfdaf8daacd618588ad3ae4c452d1: Merge tag 'pull-testing-gd

[PATCH v2 0/2] virtio-net: re-arm/re-schedule when tx_burst stops virtio_net_flush_tx()

2022-10-14 Thread Laurent Vivier
also managed in the TX timer function. v2: - fix also tx timer Laurent Vivier (2): virtio-net: fix bottom-half packet TX on asynchronous completion virtio-net: fix TX timer with tx_burst hw/net/virtio-net.c | 68 + 1 file changed, 56 insertions(+), 12

[PATCH v2 2/2] virtio-net: fix TX timer with tx_burst

2022-10-14 Thread Laurent Vivier
o-net: Limit number of packets sent per TX flush") Cc: alex.william...@redhat.com Signed-off-by: Laurent Vivier --- hw/net/virtio-net.c | 59 +++-- 1 file changed, 46 insertions(+), 13 deletions(-) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-n

[PATCH v2 1/2] virtio-net: fix bottom-half packet TX on asynchronous completion

2022-10-14 Thread Laurent Vivier
by-passed when the operation needs to be asynchronous. Fixes: a697a334b3c4 ("virtio-net: Introduce a new bottom half packet TX") Cc: alex.william...@redhat.com Signed-off-by: Laurent Vivier Acked-by: Michael S. Tsirkin --- hw/net/virtio-net.c | 13 - 1 file changed, 12

Re: [PATCH RFC] virtio-net: fix bottom-half packet TX on asynchronous completion

2022-10-14 Thread Laurent Vivier
On 10/14/22 09:06, Laurent Vivier wrote: On 10/14/22 05:10, Jason Wang wrote: On Thu, Oct 13, 2022 at 10:48 PM Michael S. Tsirkin wrote: On Thu, Oct 13, 2022 at 04:00:57PM +0200, Laurent Vivier wrote: When virtio-net is used with the socket netdev backend, the backend can be busy and not

[PULL 0/2] M68k for 7.2 patches

2022-10-14 Thread Laurent Vivier
The following changes since commit f1d33f55c47dfdaf8daacd618588ad3ae4c452d1: Merge tag 'pull-testing-gdbstub-plugins-gitdm-061022-3' of https://github.com/stsquad/qemu into staging (2022-10-06 07:11:56 -0400) are available in the Git repository at: https://github.com/vivier/qemu-m68k.git ta

[PULL 2/2] m68k: write bootinfo as rom section and re-randomize on reboot

2022-10-14 Thread Laurent Vivier
l as expected. Then, since the RNG seed needs to be fresh on each boot, regenerate the RNG seed in the ROM when reseting the CPU. Cc: Geert Uytterhoeven Cc: Laurent Vivier Signed-off-by: Jason A. Donenfeld Message-Id: <20221003110221.971024-1-ja...@zx2c4.com> Signed-off-by: Laurent Vivie

[PULL 1/2] m68k: rework BI_VIRT_RNG_SEED as BI_RNG_SEED

2022-10-14 Thread Laurent Vivier
use this as an opportunity to add this to q800, since now we can, which is a nice improvement. Cc: Geert Uytterhoeven Cc: Laurent Vivier Link: https://lore.kernel.org/lkml/20220923170340.4099226-3-ja...@zx2c4.com/ Signed-off-by: Jason A. Donenfeld Message-Id: <20220926113900.1256630-1-ja...@zx

Re: [PATCH RFC] virtio-net: fix bottom-half packet TX on asynchronous completion

2022-10-14 Thread Laurent Vivier
On 10/14/22 05:10, Jason Wang wrote: On Thu, Oct 13, 2022 at 10:48 PM Michael S. Tsirkin wrote: On Thu, Oct 13, 2022 at 04:00:57PM +0200, Laurent Vivier wrote: When virtio-net is used with the socket netdev backend, the backend can be busy and not able to collect new packets. In this case

[PATCH RFC] virtio-net: fix bottom-half packet TX on asynchronous completion

2022-10-13 Thread Laurent Vivier
ottom half packet TX") Cc: alex.william...@redhat.com Signed-off-by: Laurent Vivier --- hw/net/virtio-net.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index e9f696b4cfeb..1fbf2f3e19a7 100644 --- a/hw/net/virtio-n

Re: [PATCH v3] m68k: write bootinfo as rom section and re-randomize on reboot

2022-10-11 Thread Laurent Vivier
Le 11/10/2022 à 16:56, Jason A. Donenfeld a écrit : On Tue, Oct 11, 2022 at 10:29:45AM +0100, Peter Maydell wrote: On Tue, 11 Oct 2022 at 09:41, Laurent Vivier wrote: Le 03/10/2022 à 13:02, Jason A. Donenfeld a écrit : Rather than poking directly into RAM, add the bootinfo block as a proper

[PATCH v11 17/17] net: stream: add QAPI events to report connection state

2022-10-11 Thread Laurent Vivier
The netdev reports NETDEV_STREAM_CONNECTED event when the backend is connected, and NETDEV_STREAM_EOC when it is disconnected. The NETDEV_STREAM_CONNECTED event includes the URI of the destination address. Signed-off-by: Laurent Vivier Acked-by: Michael S. Tsirkin --- net/stream.c | 11

[PATCH v11 15/17] net: stream: move to QIO to enable additional parameters

2022-10-11 Thread Laurent Vivier
Use QIOChannel, QIOChannelSocket and QIONetListener. This allows net/stream to use all the available parameters provided by SocketAddress. Signed-off-by: Laurent Vivier Acked-by: Michael S. Tsirkin --- meson | 2 +- net/stream.c| 493

[PATCH v11 13/17] qemu-sockets: move and rename SocketAddress_to_str()

2022-10-11 Thread Laurent Vivier
Rename SocketAddress_to_str() to socket_uri() and move it to util/qemu-sockets.c close to socket_parse(). socket_uri() generates a string from a SocketAddress while socket_parse() generates a SocketAddress from a string. Signed-off-by: Laurent Vivier Reviewed-by: David Gibson Reviewed-by: Dr

[PATCH v11 16/17] tests/qtest: netdev: test stream and dgram backends

2022-10-11 Thread Laurent Vivier
Signed-off-by: Laurent Vivier Acked-by: Michael S. Tsirkin --- tests/qtest/meson.build | 1 + tests/qtest/netdev-socket.c | 417 2 files changed, 418 insertions(+) create mode 100644 tests/qtest/netdev-socket.c diff --git a/tests/qtest/meson.build b

[PATCH v11 10/17] net: dgram: make dgram_dst generic

2022-10-11 Thread Laurent Vivier
dgram_dst is a sockaddr_in structure. To be able to use it with unix socket, use a pointer to a generic sockaddr structure. Rename it dest_addr, and store socket length in dest_len. Signed-off-by: Laurent Vivier Reviewed-by: Stefano Brivio Acked-by: Michael S. Tsirkin --- net/dgram.c | 82

[PATCH v11 11/17] net: dgram: move mcast specific code from net_socket_fd_init_dgram()

2022-10-11 Thread Laurent Vivier
It is less complex to manage special cases directly in net_dgram_mcast_init() and net_dgram_udp_init(). Signed-off-by: Laurent Vivier Reviewed-by: Stefano Brivio Acked-by: Michael S. Tsirkin --- net/dgram.c | 143 1 file changed, 76

[PATCH v11 07/17] net: socket: Don't ignore EINVAL on netdev socket connection

2022-10-11 Thread Laurent Vivier
From: Stefano Brivio Other errors are treated as failure by net_socket_connect_init(), but if connect() returns EINVAL, we'll fail silently. Remove the related exception. Signed-off-by: Stefano Brivio Signed-off-by: Laurent Vivier Reviewed-by: David Gibson Acked-by: Michael S. Ts

[PATCH v11 12/17] net: dgram: add unix socket

2022-10-11 Thread Laurent Vivier
Signed-off-by: Laurent Vivier Reviewed-by: Stefano Brivio Reviewed-by: David Gibson Acked-by: Michael S. Tsirkin --- net/dgram.c | 54 - qapi/net.json | 2 +- qemu-options.hx | 1 + 3 files changed, 55 insertions(+), 2 deletions(-) diff

[PATCH v11 05/17] net: introduce qemu_set_info_str() function

2022-10-11 Thread Laurent Vivier
Embed the setting of info_str in a function. Signed-off-by: Laurent Vivier Reviewed-by: David Gibson Acked-by: Michael S. Tsirkin --- hw/net/xen_nic.c | 5 ++--- include/net/net.h | 1 + net/l2tpv3.c | 3 +-- net/net.c | 17 - net/slirp.c | 5 ++--- net

[PATCH v11 09/17] net: stream: add unix socket

2022-10-11 Thread Laurent Vivier
Signed-off-by: Laurent Vivier Reviewed-by: Stefano Brivio Acked-by: Michael S. Tsirkin --- net/stream.c| 107 +--- qapi/net.json | 2 +- qemu-options.hx | 1 + 3 files changed, 104 insertions(+), 6 deletions(-) diff --git a/net/stream.c b

[PATCH v11 01/17] net: introduce convert_host_port()

2022-10-11 Thread Laurent Vivier
Signed-off-by: Laurent Vivier Reviewed-by: Stefano Brivio Reviewed-by: David Gibson Acked-by: Michael S. Tsirkin --- include/qemu/sockets.h | 2 ++ net/net.c | 62 ++ 2 files changed, 34 insertions(+), 30 deletions(-) diff --git a/include

[PATCH v11 14/17] qemu-sockets: update socket_uri() and socket_parse() to be consistent

2022-10-11 Thread Laurent Vivier
sock address look like an inet address with CID misinterpreted as host. Goes back to commit 9aca82ba31 "migration: Create socket-address parameter" Signed-off-by: Laurent Vivier Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Markus Armbruster Reviewed-by: David Gibson Acked-by: Michael

[PATCH v11 03/17] net: simplify net_client_parse() error management

2022-10-11 Thread Laurent Vivier
All net_client_parse() callers exit in case of error. Move exit(1) to net_client_parse() and remove error checking from the callers. Suggested-by: Markus Armbruster Signed-off-by: Laurent Vivier Reviewed-by: Markus Armbruster Reviewed-by: David Gibson Acked-by: Michael S. Tsirkin

[PATCH v11 00/17] qapi: net: add unix socket type support to netdev backend

2022-10-11 Thread Laurent Vivier
use &error_fatal directly in net_client_inits() - update qemu-options.hx - move to QIO for stream socket v2: - use "stream" and "dgram" rather than "socket-ng,mode=stream" and ""socket-ng,mode=dgram" - extract code to bypass qemu_o

[PATCH v11 08/17] net: stream: Don't ignore EINVAL on netdev socket connection

2022-10-11 Thread Laurent Vivier
From: Stefano Brivio Other errors are treated as failure by net_stream_client_init(), but if connect() returns EINVAL, we'll fail silently. Remove the related exception. Signed-off-by: Stefano Brivio [lvivier: applied to net/stream.c] Signed-off-by: Laurent Vivier Reviewed-by: Dan

Re: [PATCH v10 00/17] qapi: net: add unix socket type support to netdev backend

2022-10-11 Thread Laurent Vivier
On 10/9/22 07:52, Jason Wang wrote: On Thu, Oct 6, 2022 at 7:21 PM Michael S. Tsirkin wrote: On Wed, Oct 05, 2022 at 06:20:34PM +0200, Laurent Vivier wrote: "-netdev socket" only supports inet sockets. It's not a complex task to add support for unix sockets, but the socket ne

[PATCH v11 02/17] net: remove the @errp argument of net_client_inits()

2022-10-11 Thread Laurent Vivier
The only caller passes &error_fatal, so use this directly in the function. It's what we do for -blockdev, -device, and -object. Suggested-by: Markus Armbruster Signed-off-by: Laurent Vivier Reviewed-by: Markus Armbruster Reviewed-by: David Gibson Acked-by: Michael S. Tsirkin ---

[PATCH v11 06/17] qapi: net: add stream and dgram netdevs

2022-10-11 Thread Laurent Vivier
in way. This maximizes our chance to extract the value of "type", and in turn minimizes the risk of confusing error reporting. Signed-off-by: Laurent Vivier Reviewed-by: Stefano Brivio Acked-by: Markus Armbruster Acked-by: Michael S. Tsirkin --- hmp-commands.hx | 2 +- net/c

[PATCH v11 04/17] qapi: net: introduce a way to bypass qemu_opts_parse_noisily()

2022-10-11 Thread Laurent Vivier
put_visitor_new_str(). It uses keyval_parse() instead of QemuOpts for KEY=VALUE,... syntax, and it also supports JSON syntax. The former isn't quite as expressive as JSON, but it's a lot closer than QemuOpts + opts visitor. This commit paves the way to use of the modern way instead. Signed-off

Re: [PATCH v3] m68k: write bootinfo as rom section and re-randomize on reboot

2022-10-11 Thread Laurent Vivier
also avoid the conditional g_malloc(). Thanks, Laurent Cc: Geert Uytterhoeven Cc: Laurent Vivier Signed-off-by: Jason A. Donenfeld --- hw/m68k/bootinfo.h | 48 +++ hw/m68k/q800.c | 71 +- hw/m68k/

[PATCH v10 17/17] net: stream: add QAPI events to report connection state

2022-10-05 Thread Laurent Vivier
The netdev reports NETDEV_STREAM_CONNECTED event when the backend is connected, and NETDEV_STREAM_EOC when it is disconnected. The NETDEV_STREAM_CONNECTED event includes the URI of the destination address. Signed-off-by: Laurent Vivier --- net/stream.c | 11 +-- qapi/net.json | 46

[PATCH] linux-user: fix pidfd_send_signal()

2022-10-05 Thread Laurent Vivier
According to pidfd_send_signal(2), info argument can be a NULL pointer. Fix strace to correctly manage ending comma in parameters. Fixes: cc054c6f13 ("linux-user: Add pidfd_open(), pidfd_send_signal() and pidfd_getfd() syscalls") cc: Helge Deller Signed-off-by: Laurent Vivier ---

[PATCH v10 15/17] net: stream: move to QIO to enable additional parameters

2022-10-05 Thread Laurent Vivier
Use QIOChannel, QIOChannelSocket and QIONetListener. This allows net/stream to use all the available parameters provided by SocketAddress. Signed-off-by: Laurent Vivier --- net/stream.c| 484 +--- qemu-options.hx | 4 +- 2 files changed, 171

[PATCH v10 16/17] tests/qtest: netdev: test stream and dgram backends

2022-10-05 Thread Laurent Vivier
Signed-off-by: Laurent Vivier --- tests/qtest/meson.build | 1 + tests/qtest/netdev-socket.c | 417 2 files changed, 418 insertions(+) create mode 100644 tests/qtest/netdev-socket.c diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build index

[PATCH v10 07/17] net: socket: Don't ignore EINVAL on netdev socket connection

2022-10-05 Thread Laurent Vivier
From: Stefano Brivio Other errors are treated as failure by net_socket_connect_init(), but if connect() returns EINVAL, we'll fail silently. Remove the related exception. Signed-off-by: Stefano Brivio Signed-off-by: Laurent Vivier --- net/socket.c | 3 +-- 1 file changed, 1 insertion(

[PATCH v10 08/17] net: stream: Don't ignore EINVAL on netdev socket connection

2022-10-05 Thread Laurent Vivier
From: Stefano Brivio Other errors are treated as failure by net_stream_client_init(), but if connect() returns EINVAL, we'll fail silently. Remove the related exception. Signed-off-by: Stefano Brivio [lvivier: applied to net/stream.c] Signed-off-by: Laurent Vivier Reviewed-by: Dan

[PATCH v10 14/17] qemu-sockets: update socket_uri() and socket_parse() to be consistent

2022-10-05 Thread Laurent Vivier
sock address look like an inet address with CID misinterpreted as host. Goes back to commit 9aca82ba31 "migration: Create socket-address parameter" Signed-off-by: Laurent Vivier Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Markus Armbruster Reviewed-by: David Gibson --- util/qemu-

[PATCH v10 10/17] net: dgram: make dgram_dst generic

2022-10-05 Thread Laurent Vivier
dgram_dst is a sockaddr_in structure. To be able to use it with unix socket, use a pointer to a generic sockaddr structure. Rename it dest_addr, and store socket length in dest_len. Signed-off-by: Laurent Vivier Reviewed-by: Stefano Brivio --- net/dgram.c | 82

[PATCH v10 11/17] net: dgram: move mcast specific code from net_socket_fd_init_dgram()

2022-10-05 Thread Laurent Vivier
It is less complex to manage special cases directly in net_dgram_mcast_init() and net_dgram_udp_init(). Signed-off-by: Laurent Vivier Reviewed-by: Stefano Brivio --- net/dgram.c | 143 1 file changed, 76 insertions(+), 67 deletions(-) diff

[PATCH v10 03/17] net: simplify net_client_parse() error management

2022-10-05 Thread Laurent Vivier
All net_client_parse() callers exit in case of error. Move exit(1) to net_client_parse() and remove error checking from the callers. Suggested-by: Markus Armbruster Signed-off-by: Laurent Vivier Reviewed-by: Markus Armbruster Reviewed-by: David Gibson --- include/net/net.h | 2 +- net

[PATCH v10 12/17] net: dgram: add unix socket

2022-10-05 Thread Laurent Vivier
Signed-off-by: Laurent Vivier Reviewed-by: Stefano Brivio Reviewed-by: David Gibson --- net/dgram.c | 54 - qapi/net.json | 2 +- qemu-options.hx | 1 + 3 files changed, 55 insertions(+), 2 deletions(-) diff --git a/net/dgram.c b/net

[PATCH v10 04/17] qapi: net: introduce a way to bypass qemu_opts_parse_noisily()

2022-10-05 Thread Laurent Vivier
put_visitor_new_str(). It uses keyval_parse() instead of QemuOpts for KEY=VALUE,... syntax, and it also supports JSON syntax. The former isn't quite as expressive as JSON, but it's a lot closer than QemuOpts + opts visitor. This commit paves the way to use of the modern way instead. Signed-off

[PATCH v10 13/17] qemu-sockets: move and rename SocketAddress_to_str()

2022-10-05 Thread Laurent Vivier
Rename SocketAddress_to_str() to socket_uri() and move it to util/qemu-sockets.c close to socket_parse(). socket_uri() generates a string from a SocketAddress while socket_parse() generates a SocketAddress from a string. Signed-off-by: Laurent Vivier Reviewed-by: David Gibson Reviewed-by: Dr

[PATCH v10 06/17] qapi: net: add stream and dgram netdevs

2022-10-05 Thread Laurent Vivier
in way. This maximizes our chance to extract the value of "type", and in turn minimizes the risk of confusing error reporting. Signed-off-by: Laurent Vivier Reviewed-by: Stefano Brivio Acked-by: Markus Armbruster --- hmp-commands.hx | 2 +- net/clients.h | 6 + net/dgram.c

[PATCH v10 00/17] qapi: net: add unix socket type support to netdev backend

2022-10-05 Thread Laurent Vivier
an "socket-ng,mode=stream" and ""socket-ng,mode=dgram" - extract code to bypass qemu_opts_parse_noisily() to a new patch - do not ignore EINVAL (Stefano) - fix "-net" option CC: Ralph Schmieder CC: Stefano Brivio CC: Daniel P. Berrangé CC: M

[PATCH v10 05/17] net: introduce qemu_set_info_str() function

2022-10-05 Thread Laurent Vivier
Embed the setting of info_str in a function. Signed-off-by: Laurent Vivier --- include/net/net.h | 1 + net/l2tpv3.c | 3 +-- net/net.c | 17 - net/slirp.c | 5 ++--- net/socket.c | 33 ++--- net/tap-win32.c | 3 +-- net

[PATCH v10 02/17] net: remove the @errp argument of net_client_inits()

2022-10-05 Thread Laurent Vivier
The only caller passes &error_fatal, so use this directly in the function. It's what we do for -blockdev, -device, and -object. Suggested-by: Markus Armbruster Signed-off-by: Laurent Vivier Reviewed-by: Markus Armbruster Reviewed-by: David Gibson --- include/net/net.h | 2 +-

[PATCH v10 01/17] net: introduce convert_host_port()

2022-10-05 Thread Laurent Vivier
Signed-off-by: Laurent Vivier Reviewed-by: Stefano Brivio Reviewed-by: David Gibson --- include/qemu/sockets.h | 2 ++ net/net.c | 62 ++ 2 files changed, 34 insertions(+), 30 deletions(-) diff --git a/include/qemu/sockets.h b/include/qemu

[PATCH v10 09/17] net: stream: add unix socket

2022-10-05 Thread Laurent Vivier
Signed-off-by: Laurent Vivier Reviewed-by: Stefano Brivio --- net/stream.c| 107 +--- qapi/net.json | 2 +- qemu-options.hx | 1 + 3 files changed, 104 insertions(+), 6 deletions(-) diff --git a/net/stream.c b/net/stream.c index

Re: [PATCH v9 08/16] net: stream: add unix socket

2022-10-05 Thread Laurent Vivier
On 9/28/22 08:12, David Gibson wrote: @@ -253,9 +253,27 @@ static void net_stream_accept(void *opaque) s->fd = fd; s->nc.link_down = false; net_stream_connect(s); -snprintf(s->nc.info_str, sizeof(s->nc.info_str), - "connection from %s:%d", - inet_ntoa

Re: [PATCH v9 05/16] qapi: net: add stream and dgram netdevs

2022-10-05 Thread Laurent Vivier
On 9/28/22 07:55, David Gibson wrote: +static int net_stream_server_init(NetClientState *peer, + const char *model, + const char *name, + SocketAddress *addr, + Erro

[PULL 1/8] hw/virtio/vhost-shadow-virtqueue: Silence GCC error "maybe-uninitialized"

2022-10-03 Thread Laurent Vivier
(GCC) 12.2.0 Fixes: 9c2ab2f1ec333be8614cc12272d4b91960704dbe ("vhost: stop transfer elem ownership in vhost_handle_guest_kick") Signed-off-by: Bernhard Beschow Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20220910151117.6665-1-shen...@gmail.com> Signed-off-by: Laurent Vivier ---

Re: [PULL 0/8] Trivial branch for 7.2 patches

2022-10-03 Thread Laurent Vivier
Le 03/10/2022 à 21:04, Stefan Hajnoczi a écrit : On Fri, 30 Sept 2022 at 16:22, Laurent Vivier wrote: Philippe Mathieu-Daudé via (1): block/qcow2-bitmap: Add missing cast to silent GCC error Hi Laurent, This commit uses a mailing list email, probably due to DKIM/SPF issues: Author

[PULL 0/8] Trivial branch for 7.2 patches

2022-10-03 Thread Laurent Vivier
The following changes since commit c8de6ec63d766ca1998c5af468483ce912fdc0c2: Merge tag 'pull-request-2022-09-28' of https://gitlab.com/thuth/qemu into staging (2022-09-28 17:04:11 -0400) are available in the Git repository at: https://gitlab.com/laurent_vivier/qemu.git tags/trivial-branch-

[PULL 1/8] hw/virtio/vhost-shadow-virtqueue: Silence GCC error "maybe-uninitialized"

2022-09-30 Thread Laurent Vivier
(GCC) 12.2.0 Fixes: 9c2ab2f1ec333be8614cc12272d4b91960704dbe ("vhost: stop transfer elem ownership in vhost_handle_guest_kick") Signed-off-by: Bernhard Beschow Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20220910151117.6665-1-shen...@gmail.com> Signed-off-by: Laurent Vivier ---

[PULL 0/8] Trivial branch for 7.2 patches

2022-09-30 Thread Laurent Vivier
The following changes since commit c8de6ec63d766ca1998c5af468483ce912fdc0c2: Merge tag 'pull-request-2022-09-28' of https://gitlab.com/thuth/qemu into staging (2022-09-28 17:04:11 -0400) are available in the Git repository at: https://gitlab.com/laurent_vivier/qemu.git tags/trivial-branch-

Re: [PATCH] docs: Update TPM documentation for usage of a TPM 2

2022-09-29 Thread Laurent Vivier
Le 27/09/2022 à 14:21, Stefan Berger a écrit : Update the TPM documentation for usage of a TPM 2 rather than a TPM 1.2. Adjust the command lines and expected outputs inside the VM accordingly. Update the command line to start a TPM 2 with swtpm. Signed-off-by: Stefan Berger --- docs/specs/tpm

Re: [PATCH] Use g_new() & friends where that makes obvious sense

2022-09-29 Thread Laurent Vivier
Le 23/09/2022 à 10:42, Markus Armbruster a écrit : g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer, for two reasons. One, it catches multiplication overflowing size_t. Two, it returns T * rather than void *, which lets the compiler catch more type errors. This commit only t

Re: [PATCH] Drop superfluous conditionals around g_free()

2022-09-29 Thread Laurent Vivier
Le 23/09/2022 à 11:04, Markus Armbruster a écrit : There is no need to guard g_free(P) with if (P): g_free(NULL) is safe. Signed-off-by: Markus Armbruster --- replay/replay.c | 6 ++ target/i386/kvm/kvm.c | 12 target/i386/whpx/whpx-all.c | 14 ++-

Re: [PATCH] block/qcow2-bitmap: Add missing cast to silent GCC error

2022-09-29 Thread Laurent Vivier
Le 22/09/2022 à 17:37, Kevin Wolf a écrit : Am 19.09.2022 um 20:27 hat Philippe Mathieu-Daudé geschrieben: Commit d1258dd0c8 ("qcow2: autoloading dirty bitmaps") added the set_readonly_helper() GFunc handler, correctly casting the gpointer user_data in both the g_slist_foreach() caller and the h

Re: [PATCH] checkpatch: ignore target/hexagon/imported/* files

2022-09-29 Thread Laurent Vivier
Le 20/09/2022 à 15:42, Matheus Tavares Bernardino a écrit : These files come from an external project (the hexagon archlib), so they deliberately do not follow QEMU's coding style. To avoid false positives from checkpatch.pl, let's disable the checking for those. Signed-off-by: Matheus Tavares B

Re: [PATCH] mem/cxl_type3: fix GPF DVSEC

2022-09-29 Thread Laurent Vivier
Le 15/09/2022 à 19:59, Tong Zhang a écrit : The structure is for device dvsec not port dvsec. Change type to fix this issue. Signed-off-by: Tong Zhang --- hw/mem/cxl_type3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/mem/cxl_type3.c b/hw/mem/cxl_type3.c index 3bf2

Re: [PATCH] .gitignore: add .cache/ to .gitignore

2022-09-29 Thread Laurent Vivier
Le 07/09/2022 à 17:00, Wang, Lei a écrit : $PROJECT/.cache/clangd/index is the intended location for project index data when using clangd as the language server. Ignore this directory to keep the git status clean. Signed-off-by: Wang, Lei --- .gitignore | 1 + 1 file changed, 1 insertion(+)

Re: [PATCH v2] hw/virtio/vhost-shadow-virtqueue: Silence GCC error "maybe-uninitialized"

2022-09-29 Thread Laurent Vivier
Le 10/09/2022 à 17:11, Bernhard Beschow a écrit : GCC issues a false positive warning, resulting in build failure with -Werror: In file included from /usr/include/glib-2.0/glib.h:114, from src/include/glib-compat.h:32, from src/include/qemu/osdep.h:144,

Re: [PATCH qemu v2 1/2] m68k: rework BI_VIRT_RNG_SEED as BI_RNG_SEED

2022-09-28 Thread Laurent Vivier
then use this as an opportunity to add this to q800, since now we can, which is a nice improvement. Cc: Geert Uytterhoeven Cc: Laurent Vivier Link: https://lore.kernel.org/lkml/20220923170340.4099226-3-ja...@zx2c4.com/ Signed-off-by: Jason A. Donenfeld --- hw/m68k/q

Re: [PATCH 8/8] linux-user: Log tid for strace

2022-09-28 Thread Laurent Vivier
Le 29/08/2022 à 04:10, Richard Henderson a écrit : Printing the same pid for all threads isn't helpful. Signed-off-by: Richard Henderson --- linux-user/strace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux-user/strace.c b/linux-user/strace.c index c47d91bb3d..ca9

[PULL 34/37] linux-user: Implement PI futexes

2022-09-28 Thread Laurent Vivier
From: Richard Henderson Define the missing FUTEX_* constants in syscall_defs.h Signed-off-by: Richard Henderson Reviewed-by: Laurent Vivier Message-Id: <20220829021006.67305-6-richard.hender...@linaro.org> Signed-off-by: Laurent Vivier --- linux-user/syscall.c | 10 ++

[PULL 36/37] linux-user: Lock log around strace

2022-09-28 Thread Laurent Vivier
From: Richard Henderson Do not allow syscall arguments to be interleaved between threads. Signed-off-by: Richard Henderson Reviewed-by: Laurent Vivier Message-Id: <20220829021006.67305-8-richard.hender...@linaro.org> Signed-off-by: Laurent Vivier --- linux-user/strace.

[PULL 32/37] linux-user: Implement FUTEX_WAKE_BITSET

2022-09-28 Thread Laurent Vivier
From: Richard Henderson Signed-off-by: Richard Henderson Reviewed-by: Laurent Vivier Message-Id: <20220829021006.67305-4-richard.hender...@linaro.org> Signed-off-by: Laurent Vivier --- linux-user/syscall.c | 1 + 1 file changed, 1 insertion(+) diff --git a/linux-user/syscall.c b/linu

[PULL 37/37] linux-user: Add parameters of getrandom() syscall for strace

2022-09-28 Thread Laurent Vivier
From: Helge Deller Signed-off-by: Helge Deller Reviewed-by: Laurent Vivier Message-Id: <20220927093538.8954-2-del...@gmx.de> Signed-off-by: Laurent Vivier --- linux-user/strace.list | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux-user/strace.list b/linu

[PULL 30/37] linux-user: Combine do_futex and do_futex_time64

2022-09-28 Thread Laurent Vivier
From: Richard Henderson Pass a boolean to select between time32 and time64. Signed-off-by: Richard Henderson Reviewed-by: Laurent Vivier Message-Id: <20220829021006.67305-2-richard.hender...@linaro.org> Signed-off-by: Laurent Vivier --- linux-user/syscall.

[PULL 25/37] linux-user: fix bug about missing signum convert of sigqueue

2022-09-28 Thread Laurent Vivier
From: fanwenjie Fixes: 66fb9763af ("basic signal handling") Fixes: cf8b8bfc50 ("linux-user: add support for rt_tgsigqueueinfo() system call") Signed-off-by: fanwenjie Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Laurent Vivier --- linux-user/syscall.c | 4 ++-

[PULL 20/37] linux-user/hppa: Add signal trampoline for hppa target

2022-09-28 Thread Laurent Vivier
off-by: Laurent Vivier --- linux-user/hppa/signal.c| 41 + linux-user/hppa/target_signal.h | 14 +-- 2 files changed, 32 insertions(+), 23 deletions(-) diff --git a/linux-user/hppa/signal.c b/linux-user/hppa/signal.c index 962f551c0429..396e310dc92d

[PULL 33/37] linux-user: Convert signal number for FUTEX_FD

2022-09-28 Thread Laurent Vivier
From: Richard Henderson The val argument to FUTEX_FD is a signal number. Convert to match the host, as it will be converted back when the signal is delivered. Signed-off-by: Richard Henderson Reviewed-by: Laurent Vivier Message-Id: <20220829021006.67305-5-richard.hender...@linaro.org>

[PULL 35/37] linux-user: Update print_futex_op

2022-09-28 Thread Laurent Vivier
strace for futex()"] Signed-off-by: Laurent Vivier --- linux-user/strace.c | 70 + 1 file changed, 33 insertions(+), 37 deletions(-) diff --git a/linux-user/strace.c b/linux-user/strace.c index 2deb84a2c106..faa733125624 100644 --- a/linux-user/stra

[PULL 31/37] linux-user: Sink call to do_safe_futex

2022-09-28 Thread Laurent Vivier
From: Richard Henderson Leave only the argument adjustments within the shift, and sink the actual syscall to the end. Sink the timespec conversion as well, as there will be more users. Signed-off-by: Richard Henderson Reviewed-by: Laurent Vivier Message-Id: <20220829021006.6730

[PULL 21/37] linux-user/hppa: Drop stack guard page on hppa target

2022-09-28 Thread Laurent Vivier
The Linux kernel on a physical machine doesn't install a guard page either, so drop it and as such fix the build of "grep". Signed-off-by: Helge Deller Message-Id: <20220924114501.21767-5-del...@gmx.de> Signed-off-by: Laurent Vivier --- linux-user/elfload.c | 13 +---

[PULL 24/37] linux-user/hppa: Fix setup_sigcontext()

2022-09-28 Thread Laurent Vivier
-by: Helge Deller Message-Id: <20220924114501.21767-8-del...@gmx.de> Signed-off-by: Laurent Vivier --- linux-user/hppa/signal.c | 16 +++- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/linux-user/hppa/signal.c b/linux-user/hppa/signal.c index 396e310dc92d..f25

[PULL 27/37] linux-user/s390x: Save/restore fpc when handling a signal

2022-09-28 Thread Laurent Vivier
.ibm.com> Signed-off-by: Laurent Vivier --- linux-user/s390x/signal.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/linux-user/s390x/signal.c b/linux-user/s390x/signal.c index 4979c4b01791..f72165576f3b 100644 --- a/linux-user/s390x/signal.c +++ b/linux-user/s390x/signal.c @@ -1

[PULL 16/37] linux-user: Passthrough MADV_DONTNEED for certain file mappings

2022-09-28 Thread Laurent Vivier
eviewed-by: Richard Henderson Message-Id: <20220725125043.43048-1-...@linux.ibm.com> Message-Id: <20220906000839.1672934-5-...@linux.ibm.com> Signed-off-by: Laurent Vivier --- accel/tcg/translate-all.c | 2 +- include/exec/cpu-all.h| 6 ++ linux-user/mmap.c | 27

[PULL 18/37] linux-user: Fix TARGET_PROT_SEM for XTENSA

2022-09-28 Thread Laurent Vivier
From: Helge Deller The xtensa platform has a value of 0x10 for PROT_SEM. Signed-off-by: Helge Deller Reviewed-by: Laurent Vivier Message-Id: <20220924114501.21767-2-del...@gmx.de> Signed-off-by: Laurent Vivier --- linux-user/syscall_defs.h | 2 +- 1 file changed, 1 insertion(+), 1 de

[PULL 06/37] linux-user: Log failing executable in EXCP_DUMP()

2022-09-28 Thread Laurent Vivier
From: Helge Deller Enhance the EXCP_DUMP() macro to print out the failing program too. During debugging it's sometimes hard to track down the actual failing program if you are e.g. building a whole debian package. Signed-off-by: Helge Deller Reviewed-by: Laurent Vivier Reviewed-by: Phi

[PULL 26/37] linux-user: Don't assume 0 is not a valid host timer_t value

2022-09-28 Thread Laurent Vivier
n the error paths in timer_create where we forgot to release the slot we grabbed, or forgot to free the host timer Reported-by: Jon Alduan Signed-off-by: Peter Maydell Message-Id: <20220725110035.1273441-1-peter.mayd...@linaro.org> Signed-off-by: Laurent Vivier ---

[PULL 13/37] linux-user: Provide MADV_* definitions

2022-09-28 Thread Laurent Vivier
4-2-...@linux.ibm.com> Signed-off-by: Laurent Vivier --- linux-user/aarch64/target_mman.h | 1 + linux-user/alpha/target_mman.h | 8 +++ linux-user/arm/target_mman.h | 1 + linux-user/cris/target_mman.h| 1 + linux-user/generic/target_mman.h

[PULL 29/37] linux-user: Set ELF_BASE_PLATFORM for MIPS

2022-09-28 Thread Laurent Vivier
n.y...@flygoat.com> Signed-off-by: Laurent Vivier --- linux-user/elfload.c | 31 +++ 1 file changed, 31 insertions(+) diff --git a/linux-user/elfload.c b/linux-user/elfload.c index 581fbc858b48..20894b633f58 100644 --- a/linux-user/elfload.c +++ b/linux-user/elfload.c @@ -

[PULL 01/37] linux-user: use 'max' instead of 'qemu32' / 'qemu64' by default

2022-09-28 Thread Laurent Vivier
ewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Daniel P. Berrangé Message-Id: <20220923110413.70593-1-berra...@redhat.com> Signed-off-by: Laurent Vivier --- linux-user/i386/target_elf.h | 2 +- linux-user/x86_64/target_elf.h | 2 +- 2 files changed, 2 insert

[PULL 22/37] linux-user/hppa: Increase guest stack size to 80MB for hppa target

2022-09-28 Thread Laurent Vivier
off-by: Laurent Vivier --- linux-user/hppa/target_syscall.h | 2 ++ linux-user/main.c| 9 +++-- linux-user/syscall.c | 4 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/linux-user/hppa/target_syscall.h b/linux-user/hppa/target_syscall.h index 4b382c

[PULL 15/37] linux-user: Implement stracing madvise()

2022-09-28 Thread Laurent Vivier
Message-Id: <20220906000839.1672934-4-...@linux.ibm.com> Signed-off-by: Laurent Vivier --- linux-user/strace.c| 41 + linux-user/strace.list | 2 +- 2 files changed, 42 insertions(+), 1 deletion(-) diff --git a/linux-user/strace.c b/linu

[PULL 28/37] linux-user: Introduce stubs for ELF AT_BASE_PLATFORM

2022-09-28 Thread Laurent Vivier
off-by: Laurent Vivier --- linux-user/elfload.c | 29 +++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/linux-user/elfload.c b/linux-user/elfload.c index c7e3f1d47c16..581fbc858b48 100644 --- a/linux-user/elfload.c +++ b/linux-user/elfload.c @@ -1776,6 +1

[PULL 23/37] linux-user/hppa: Allow PROT_GROWSUP and PROT_GROWSDOWN in mprotect()

2022-09-28 Thread Laurent Vivier
ssage-Id: <20220924114501.21767-7-del...@gmx.de> [lvivier: s/elif TARGET_HPPA/elif defined(TARGET_HPPA)/] Signed-off-by: Laurent Vivier --- linux-user/mmap.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/linux-user/mmap.c b/linux-user/mmap.c index e557f3626e5d..28f3bc85ed45 100644 --- a/lin

[PULL 14/37] linux-user: Fix madvise(MADV_DONTNEED) on alpha

2022-09-28 Thread Laurent Vivier
eviewed-by: Richard Henderson Message-Id: <20220906000839.1672934-3-...@linux.ibm.com> Signed-off-by: Laurent Vivier --- linux-user/mmap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/linux-user/mmap.c b/linux-user/mmap.c index 83fdae7034ea..942bec7e8528 100644 --- a/l

[PULL 10/37] linux-user/hppa: Set TASK_UNMAPPED_BASE to 0xfa000000 for hppa arch

2022-09-28 Thread Laurent Vivier
From: Helge Deller On the parisc architecture the stack grows upwards. Move the TASK_UNMAPPED_BASE to high memory area as it's done by the kernel on physical machines. Signed-off-by: Helge Deller Message-Id: <20220918194555.83535-9-del...@gmx.de> Signed-off-by: Laurent Vivier ---

[PULL 17/37] tests/tcg/linux-test: Add linux-madvise test

2022-09-28 Thread Laurent Vivier
From: Ilya Leoshkevich Add a test that checks madvise(MADV_DONTNEED) behavior with anonymous and file mappings in order to prevent regressions. Signed-off-by: Ilya Leoshkevich Reviewed-by: Richard Henderson Message-Id: <20220906000839.1672934-6-...@linux.ibm.com> Signed-off-by: Laurent

[PULL 19/37] linux-user: Add proper strace format strings for getdents()/getdents64()

2022-09-28 Thread Laurent Vivier
From: Helge Deller Signed-off-by: Helge Deller Message-Id: <20220924114501.21767-3-del...@gmx.de> Signed-off-by: Laurent Vivier --- linux-user/strace.list | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/linux-user/strace.list b/linux-user/strace.list index c6f748

[PULL 12/37] linux-user: Show timespec on strace for futex()

2022-09-28 Thread Laurent Vivier
From: Helge Deller Signed-off-by: Helge Deller Reviewed-by: Laurent Vivier Message-Id: <20220918194555.83535-11-del...@gmx.de> Signed-off-by: Laurent Vivier --- linux-user/strace.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/linux-user/strace.c b

[PULL 02/37] linux-user: fix readlinkat handling with magic exe symlink

2022-09-28 Thread Laurent Vivier
From: Jameson Nash Exactly the same as f17f4989fa193fa8279474c5462289a3cfe69aea before was for readlink. I suppose this was simply missed at the time. Signed-off-by: Jameson Nash Reviewed-by: Laurent Vivier Message-Id: <20220808190727.875155-1-vtjn...@gmail.com> Signed-off-by: Laurent

[PULL 07/37] linux-user/hppa: Use EXCP_DUMP() to show enhanced debug info

2022-09-28 Thread Laurent Vivier
From: Helge Deller Enhance the hppa linux-user cpu_loop() to show more debugging info on hard errors. Signed-off-by: Helge Deller Reviewed-by: Laurent Vivier Message-Id: <20220918194555.83535-6-del...@gmx.de> Signed-off-by: Laurent Vivier --- linux-user/hppa/cpu_loop.c | 6 +-

[PULL 11/37] linux-user: Add strace for clock_nanosleep()

2022-09-28 Thread Laurent Vivier
From: Helge Deller Signed-off-by: Helge Deller Reviewed-by: Laurent Vivier Message-Id: <20220918194555.83535-10-del...@gmx.de> Signed-off-by: Laurent Vivier --- linux-user/strace.c| 15 +++ linux-user/strace.list | 3 ++- 2 files changed, 17 insertions(+), 1 de

[PULL 04/37] linux-user: Add missing clock_gettime64() syscall strace

2022-09-28 Thread Laurent Vivier
From: Helge Deller Allow linux-user to strace the clock_gettime64() syscall. This syscall is used a lot on 32-bit guest architectures which use newer glibc versions. Signed-off-by: Helge Deller Reviewed-by: Laurent Vivier Message-Id: <20220918194555.83535-3-del...@gmx.de> Signed-

<    3   4   5   6   7   8   9   10   11   12   >