[PATCH v6 13/13] net: stream: move to QIO

2022-07-05 Thread Laurent Vivier
Use QIOChannel, QIOChannelSocket and QIONetListener. Signed-off-by: Laurent Vivier --- net/stream.c | 480 ++- 1 file changed, 168 insertions(+), 312 deletions(-) diff --git a/net/stream.c b/net/stream.c index 0f91ff20df61..c4ddb44fc3ed 100644 ---

Re: [PULL 0/2] Net patches

2022-07-05 Thread Richard Henderson
On 7/6/22 09:17, Jason Wang wrote: The following changes since commit 39e19f5f67d925c60278a6156fd1776d04495a93: Merge tag 'pull-xen-20220705' of https://xenbits.xen.org/git-http/people/aperard/qemu-dm into staging (2022-07-05 22:13:51 +0530) are available in the git rep

[PATCH v6 12/13] qemu-sockets: update socket_uri() to be consistent with socket_parse()

2022-07-05 Thread Laurent Vivier
Remove 'tcp:' prefix for inet type (because inet can be 'tcp' or 'udp' and socket_parse() doesn't recognize it), the format is 'host:port'. Use 'vsock:' prefix for vsock type rather than 'tcp:' because it makes a vsock address look like an inet address with CID misinterpreted as host. Goes back to

[PATCH v6 10/13] net: dgram: add unix socket

2022-07-05 Thread Laurent Vivier
Signed-off-by: Laurent Vivier Reviewed-by: Stefano Brivio --- net/dgram.c | 65 ++--- qapi/net.json | 2 +- qemu-options.hx | 1 + 3 files changed, 64 insertions(+), 4 deletions(-) diff --git a/net/dgram.c b/net/dgram.c index 16e2d909755c..9f3

Re: [PATCH] target/ppc/cpu-models: Remove the "default" CPU alias

2022-07-05 Thread Thomas Huth
On 05/07/2022 17.53, Peter Maydell wrote: On Tue, 5 Jul 2022 at 16:13, Thomas Huth wrote: QEMU emulates a *lot* of PowerPC-based machines - having a CPU that is named "default" and cannot be used with most of those machines sounds just wrong. Thus let's remove this old and confusing alias now.

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

2022-07-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 --- include/net/net.h | 2 +- net/net.c | 20 +++---

[PATCH v6 01/13] net: introduce convert_host_port()

2022-07-05 Thread Laurent Vivier
Signed-off-by: Laurent Vivier Reviewed-by: Stefano Brivio --- 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/sockets.h index 038faa157f5

[PATCH v6 09/13] net: dgram: move mcast specific code from net_socket_fd_init_dgram()

2022-07-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, 73 insertions(+), 70 deletions(-) diff -

[PATCH v6 05/13] qapi: net: add stream and dgram netdevs

2022-07-05 Thread Laurent Vivier
Copied from socket netdev file and modified to use SocketAddress to be able to introduce new features like unix socket. "udp" and "mcast" are squashed into dgram netdev, multicast is detected according to the IP address type. "listen" and "connect" modes are managed by stream netdev. An optional p

[PATCH v6 03/13] net: simplify net_client_parse() error management

2022-07-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 --- include/net/net.h | 2 +- net/net.c | 6 ++ softm

[PATCH v6 08/13] net: dgram: make dgram_dst generic

2022-07-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. Signed-off-by: Laurent Vivier Reviewed-by: Stefano Brivio --- net/dgram.c | 76 +++-- 1 file changed, 45 insertions(+), 31

[PATCH v6 07/13] net: stream: add unix socket

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

[PATCH v6 06/13] net: stream: Don't ignore EINVAL on netdev socket connection

2022-07-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: Daniel P. Berran

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

2022-07-05 Thread Laurent Vivier
"-netdev socket" only supports inet sockets. It's not a complex task to add support for unix sockets, but the socket netdev parameters are not defined to manage well unix socket parameters. As discussed in: "socket.c added support for unix domain socket datagram transport" https://lore.kern

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

2022-07-05 Thread Laurent Vivier
As qemu_opts_parse_noisily() flattens the QAPI structures ("type" field of Netdev structure can collides with "type" field of SocketAddress), we introduce a way to bypass qemu_opts_parse_noisily() and use directly visit_type_Netdev() to parse the backend parameters. More details from Markus: qemu

Re: [PATCH v2 1/9] hw/i2c/pca954x: Add method to get channels

2022-07-05 Thread Cédric Le Goater
On 7/5/22 23:44, Peter Delevoryas wrote: On Tue, Jul 05, 2022 at 02:40:32PM -0700, Peter Delevoryas wrote: On Tue, Jul 05, 2022 at 03:06:24PM -0500, Corey Minyard wrote: On Tue, Jul 05, 2022 at 12:13:52PM -0700, Peter Delevoryas wrote: I added this helper in the Aspeed machine file a while ago

Re: [PATCH v2 9/9] docs: aspeed: Add fby35 multi-SoC machine section

2022-07-05 Thread Cédric Le Goater
On 7/5/22 21:14, Peter Delevoryas wrote: Signed-off-by: Peter Delevoryas Reviewed-by: Cédric Le Goater I fixed inline the URL links and moved the section at the end of the file. Thanks, C. --- docs/system/arm/aspeed.rst | 48 ++ 1 file changed, 48

Re: [PATCH V2 1/4] softmmu/runstate.c: add RunStateTransition support form COLO to PRELAUNCH

2022-07-05 Thread Jason Wang
On Wed, Jul 6, 2022 at 1:02 PM Zhang, Chen wrote: > > > > > > > > On Fri, Apr 1, 2022 at 11:59 AM Zhang Chen > > wrote: > > > > > > > > > > > > > > > > If the checkpoint occurs when the guest finishes restarting > > > > > > > > but has not started running, the runstate_set() may reject > > > > >

RE: [PATCH V2 1/4] softmmu/runstate.c: add RunStateTransition support form COLO to PRELAUNCH

2022-07-05 Thread Zhang, Chen
> > > > > > On Fri, Apr 1, 2022 at 11:59 AM Zhang Chen > wrote: > > > > > > > > > > > > > > If the checkpoint occurs when the guest finishes restarting > > > > > > > but has not started running, the runstate_set() may reject > > > > > > > the transition from COLO to PRELAUNCH with the crash log: >

Re: [PATCH v3 2/2] ui/gtk: a new array param monitor to specify the target displays

2022-07-05 Thread Markus Armbruster
Dongwon Kim writes: > On Thu, Jun 30, 2022 at 05:19:26PM +0200, Markus Armbruster wrote: >> Dongwon Kim writes: >> >> > New integer array parameter, 'monitor' is for specifying the target >> > monitors where individual GTK windows are placed upon launching. >> > >> > Monitor numbers in the arra

[PULL 2/2] ebpf: replace deprecated bpf_program__set_socket_filter

2022-07-05 Thread Jason Wang
From: Haochen Tong bpf_program__set_ functions have been deprecated since libbpf 0.8. Replace with the equivalent bpf_program__set_type call to avoid a deprecation warning. Signed-off-by: Haochen Tong Reviewed-by: Zhang Chen Signed-off-by: Jason Wang --- ebpf/ebpf_rss.c | 2 +- 1 file change

[PULL 1/2] e1000: set RX descriptor status in a separate operation

2022-07-05 Thread Jason Wang
From: Ding Hui The code of setting RX descriptor status field maybe work fine in previously, however with the update of glibc version, it shows two issues when guest using dpdk receive packets: 1. The dpdk has a certain probability getting wrong buffer_addr this impact may be not obvious

[PULL 0/2] Net patches

2022-07-05 Thread Jason Wang
The following changes since commit 39e19f5f67d925c60278a6156fd1776d04495a93: Merge tag 'pull-xen-20220705' of https://xenbits.xen.org/git-http/people/aperard/qemu-dm into staging (2022-07-05 22:13:51 +0530) are available in the git repository at: https://github.com/jasowang/qem

Re: [PATCH v2 1/1] qga: add command 'guest-get-cpustats'

2022-07-05 Thread zhenwei pi
On 7/4/22 16:00, zhenwei pi wrote:     +##     +# @GuestOsType:     +#     +# An enumeration of OS type     +#     +# Since: 7.1     +##     +{ 'enum': 'GuestOsType',     +  'data': [ 'linuxos', 'windowsos' ] } I would rather keep this enum specific to GuestCpuStats, "GuestLinuxCpuStatsType

[PATCH 3/3] meson: Allow to enable gtk and sdl while cocoa is enabled

2022-07-05 Thread Akihiko Odaki
As ui/cocoa does no longer override main(), ui/gtk and ui/sdl can be enabled even ui/cocoa is enabled. Signed-off-by: Akihiko Odaki --- meson.build | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/meson.build b/meson.build index 6e1c3eb2bc5..4714a0d5cf8 100644 --- a

[PATCH 2/3] Revert "main-loop: Disable block backend global state assertion on Cocoa"

2022-07-05 Thread Akihiko Odaki
This reverts commit 47281859f66bdab1974fb122cab2cbb4a1c9af7f. Signed-off-by: Akihiko Odaki --- include/qemu/main-loop.h | 13 - 1 file changed, 13 deletions(-) diff --git a/include/qemu/main-loop.h b/include/qemu/main-loop.h index 5518845299d..0aa36a4f17e 100644 --- a/include/qemu/m

[PATCH 1/3] ui/cocoa: Run qemu_init in the main thread

2022-07-05 Thread Akihiko Odaki
This work is based on: https://patchew.org/QEMU/20220317125534.38706-1-philippe.mathieu.da...@gmail.com/ Simplify the initialization dance by running qemu_init() in the main thread before the Cocoa event loop starts. The secondary thread only runs only qemu_main_loop() and qemu_cleanup(). This fi

[PATCH 0/3] ui/cocoa: Run qemu_init in the main thread

2022-07-05 Thread Akihiko Odaki
This work is based on: https://patchew.org/QEMU/20220317125534.38706-1-philippe.mathieu.da...@gmail.com/ Simplify the initialization dance by running qemu_init() in the main thread before the Cocoa event loop starts. The secondary thread only runs only qemu_main_loop() and qemu_cleanup(). This fi

Re: [PULL 0/2] xen queue

2022-07-05 Thread Richard Henderson
On 7/5/22 19:15, Anthony PERARD via wrote: The following changes since commit 19361471b59441cd6f2aa22d4fbee7a6e9e76586: Merge tag 'pull-la-20220705' of https://gitlab.com/rth7680/qemu into staging (2022-07-05 16:30:52 +0530) are available in the Git repository at:

Re: [PATCH V8 20/39] cpr: restart mode

2022-07-05 Thread Peng Liang
On 7/6/2022 2:29 AM, Steven Sistare wrote: > On 7/3/2022 4:15 AM, Peng Liang wrote: >> On 6/15/2022 10:52 PM, Steve Sistare wrote: >>> Provide the cpr-save restart mode, which preserves the guest VM across a >>> restart of the qemu process. After cpr-save, the caller passes qemu >>> command-lin

Re: [PATCH v2] io_uring: fix short read slow path

2022-07-05 Thread Dominique Martinet
Stefan Hajnoczi wrote on Tue, Jul 05, 2022 at 02:28:08PM +0100: > > The older kernel I have installed right now is 5.16 and that can > > reproduce it -- I'll give my laptop some work over the weekend to test > > still maintained stable branches if that's useful. > > Linux 5.16 contains commit 9d9

[PATCH RESEND] python/machine: Fix AF_UNIX path too long on macOS

2022-07-05 Thread Peter Delevoryas
I noticed that I can't run any avocado tests on macOS because the QMP unix socket path is too long: $ ./configure --target-list=arm-softmmu $ make $ make check-avocado AVOCADO_TESTS=tests/avocado/boot_linux_console.py changing dir to build for /Library/Developer/CommandLineTools/usr/bin/make "che

Re: [PATCH v2 1/9] hw/i2c/pca954x: Add method to get channels

2022-07-05 Thread Peter Delevoryas
On Tue, Jul 05, 2022 at 02:40:32PM -0700, Peter Delevoryas wrote: > On Tue, Jul 05, 2022 at 03:06:24PM -0500, Corey Minyard wrote: > > On Tue, Jul 05, 2022 at 12:13:52PM -0700, Peter Delevoryas wrote: > > > I added this helper in the Aspeed machine file a while ago to help > > > initialize fuji-bmc

Re: [PATCH v2 1/9] hw/i2c/pca954x: Add method to get channels

2022-07-05 Thread Peter Delevoryas
On Tue, Jul 05, 2022 at 03:06:24PM -0500, Corey Minyard wrote: > On Tue, Jul 05, 2022 at 12:13:52PM -0700, Peter Delevoryas wrote: > > I added this helper in the Aspeed machine file a while ago to help > > initialize fuji-bmc i2c devices. This moves it to the official pca954x > > file so that other

Re: [PATCH v3 2/2] ui/gtk: a new array param monitor to specify the target displays

2022-07-05 Thread Dongwon Kim
On Thu, Jun 30, 2022 at 05:19:26PM +0200, Markus Armbruster wrote: > Dongwon Kim writes: > > > New integer array parameter, 'monitor' is for specifying the target > > monitors where individual GTK windows are placed upon launching. > > > > Monitor numbers in the array are associated with virtual

Re: [PATCH v3 2/2] ui/gtk: a new array param monitor to specify the target displays

2022-07-05 Thread Dongwon Kim
Thanks, yeah, I will remove '-' and resubmitt the patch. On Fri, Jul 01, 2022 at 11:58:48AM +0200, Gerd Hoffmann wrote: > Hi, > > > > +# @monitor: Array of numbers, each of which represents physical > > > +# monitor where GTK window containing a given VC will be > > > +#

Re: [RFC] gitlab: introduce s390x wasmtime job

2022-07-05 Thread Ilya Leoshkevich
On Tue, 2022-07-05 at 15:40 +0100, Peter Maydell wrote: > On Tue, 5 Jul 2022 at 15:37, Ilya Leoshkevich > wrote: > > > > On Tue, 2022-07-05 at 14:57 +0100, Peter Maydell wrote: > > > On Tue, 5 Jul 2022 at 14:04, Daniel P. Berrangé > > > > > > wrote: > > > > If we put this job in QEMU CI someone

[PATCH v3] multifd: Copy pages before compressing them with zlib

2022-07-05 Thread Ilya Leoshkevich
zlib_send_prepare() compresses pages of a running VM. zlib does not make any thread-safety guarantees with respect to changing deflate() input concurrently with deflate() [1]. One can observe problems due to this with the IBM zEnterprise Data Compression accelerator capable zlib [2]. When the hard

Re: [PATCH v2 1/9] hw/i2c/pca954x: Add method to get channels

2022-07-05 Thread Corey Minyard
On Tue, Jul 05, 2022 at 12:13:52PM -0700, Peter Delevoryas wrote: > I added this helper in the Aspeed machine file a while ago to help > initialize fuji-bmc i2c devices. This moves it to the official pca954x > file so that other files can use it. > > This does something very similar to pca954x_i2c

[PATCH] scsi/lsi53c895a: fix use-after-free in lsi_do_msgout (CVE-2022-0216)

2022-07-05 Thread Mauro Matteo Cascella
Set current_req->req to NULL to prevent reusing a free'd buffer in case of repeated SCSI cancel requests. Thanks to Thomas Huth for suggesting the patch. Fixes: CVE-2022-0216 Resolves: https://gitlab.com/qemu-project/qemu/-/issues/972 Signed-off-by: Mauro Matteo Cascella --- hw/scsi/lsi53c895a.c

Re: [PATCH v2] io_uring: fix short read slow path

2022-07-05 Thread Jens Axboe
On 7/5/22 7:28 AM, Stefan Hajnoczi wrote: > On Fri, Jul 01, 2022 at 07:52:31AM +0900, Dominique Martinet wrote: >> Stefano Garzarella wrote on Thu, Jun 30, 2022 at 05:49:21PM +0200: so when we ask for more we issue an extra short reads, making sure we go through the two short reads path.

[PATCH v2 8/9] aspeed: Add AST1030 (BIC) to fby35

2022-07-05 Thread Peter Delevoryas
With the BIC, the easiest way to run everything is to create two pty's for each SoC and reserve stdin/stdout for the monitor: wget https://github.com/facebook/openbmc/releases/download/openbmc-e2294ff5d31d/fby35.mtd wget https://github.com/peterdelevoryas/OpenBIC/releases/download/oby35-

[PATCH v2 7/9] aspeed: fby35: Add a bootrom for the BMC

2022-07-05 Thread Peter Delevoryas
From: Cédric Le Goater The BMC boots from the first flash device by fetching instructions from the flash contents. Add an alias region on 0x0 for this purpose. There are currently performance issues with this method (TBs being flushed too often), so as a faster alternative, install the flash cont

[PATCH v2 9/9] docs: aspeed: Add fby35 multi-SoC machine section

2022-07-05 Thread Peter Delevoryas
Signed-off-by: Peter Delevoryas --- docs/system/arm/aspeed.rst | 48 ++ 1 file changed, 48 insertions(+) diff --git a/docs/system/arm/aspeed.rst b/docs/system/arm/aspeed.rst index 5d0a7865d3..b233191b67 100644 --- a/docs/system/arm/aspeed.rst +++ b/docs/system

[PATCH v2 6/9] aspeed: Add AST2600 (BMC) to fby35

2022-07-05 Thread Peter Delevoryas
You can test booting the BMC with both '-device loader' and '-drive file'. This is necessary because of how the fb-openbmc boot sequence works (jump to 0x2000 after U-Boot SPL). wget https://github.com/facebook/openbmc/releases/download/openbmc-e2294ff5d31d/fby35.mtd qemu-system-arm -

[PATCH v2 5/9] aspeed: Add fby35 skeleton

2022-07-05 Thread Peter Delevoryas
Signed-off-by: Peter Delevoryas Reviewed-by: Cédric Le Goater --- MAINTAINERS| 1 + hw/arm/fby35.c | 39 +++ hw/arm/meson.build | 3 ++- 3 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 hw/arm/fby35.c diff --git a/MAINTAINERS

[PATCH v2 4/9] aspeed: Make aspeed_board_init_flashes public

2022-07-05 Thread Peter Delevoryas
Signed-off-by: Peter Delevoryas --- hw/arm/aspeed.c | 2 +- include/hw/arm/aspeed_soc.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c index cc395f988c..b2486a9e78 100644 --- a/hw/arm/aspeed.c +++ b/hw/arm/aspeed.c @@ -262,7 +26

[PATCH v2 3/9] aspeed: Refactor UART init for multi-SoC machines

2022-07-05 Thread Peter Delevoryas
This change moves the code that connects the SoC UART's to serial_hd's to the machine. It makes each UART a proper child member of the SoC, and then allows the machine to selectively initialize the chardev for each UART with a serial_hd. This should preserve backwards compatibility, but also allo

[PATCH v2 1/9] hw/i2c/pca954x: Add method to get channels

2022-07-05 Thread Peter Delevoryas
I added this helper in the Aspeed machine file a while ago to help initialize fuji-bmc i2c devices. This moves it to the official pca954x file so that other files can use it. This does something very similar to pca954x_i2c_get_bus, but I think this is useful when you have a very complicated dts wi

[PATCH v2 2/9] aspeed: Create SRAM name from first CPU index

2022-07-05 Thread Peter Delevoryas
To support multiple SoC's running simultaneously, we need a unique name for each RAM region. DRAM is created by the machine, but SRAM is created by the SoC, since in hardware it is part of the SoC's internals. We need a way to uniquely identify each SRAM region though, for VM migration. Since each

Re: [PATCH V8 38/39] python/machine: add QEMUMachine accessors

2022-07-05 Thread Steven Sistare
On 6/17/2022 10:16 AM, John Snow wrote: > On Wed, Jun 15, 2022, 11:27 AM Steve Sistare > wrote: > > Provide full_args() to return all command-line arguments used to start a > vm, some of which are not otherwise visible to QEMUMachine clients.  This >

Re: [PATCH V8 36/39] chardev: cpr for sockets

2022-07-05 Thread Steven Sistare
On 7/3/2022 4:19 AM, Peng Liang wrote: > On 6/15/2022 10:52 PM, Steve Sistare wrote: >> Save accepted socket fds before cpr-save, and look for them after cpr-load. >> Block cpr-exec if a socket enables the TLS or websocket option. Allow a >> monitor socket by closing it on exec. >> >> Signed-off-b

Re: [PATCH v4] hw/nvme: Use ioeventfd to handle doorbell updates

2022-07-05 Thread Keith Busch
On Tue, Jul 05, 2022 at 07:11:36PM +0200, Klaus Jensen wrote: > On Jul 5 22:24, Jinhao Fan wrote: > > @@ -1374,7 +1374,14 @@ static void nvme_enqueue_req_completion(NvmeCQueue > > *cq, NvmeRequest *req) > > > > QTAILQ_REMOVE(&req->sq->out_req_list, req, entry); > > QTAILQ_INSERT_TAIL(

Re: [PATCH V8 20/39] cpr: restart mode

2022-07-05 Thread Steven Sistare
On 7/3/2022 4:15 AM, Peng Liang wrote: > On 6/15/2022 10:52 PM, Steve Sistare wrote: >> Provide the cpr-save restart mode, which preserves the guest VM across a >> restart of the qemu process. After cpr-save, the caller passes qemu >> command-line arguments to cpr-exec, which directly exec's the n

Re: [PATCH V8 27/39] vfio-pci: cpr part 1 (fd and dma)

2022-07-05 Thread Steven Sistare
On 7/3/2022 4:32 AM, Peng Liang wrote: > On 6/15/2022 10:52 PM, Steve Sistare wrote: [...] >> diff --git a/hw/vfio/cpr.c b/hw/vfio/cpr.c [...] >> +static int vfio_container_pre_save(void *opaque) >> +{ >> +VFIOContainer *container = (VFIOContainer *)opaque; >> +Error *err; > > According

Re: [PATCH V8 14/39] qapi: strList_from_string

2022-07-05 Thread Steven Sistare
On 6/16/2022 12:04 PM, Marc-André Lureau wrote: > Hi > > On Wed, Jun 15, 2022 at 7:04 PM Steve Sistare > wrote: > > Generalize strList_from_comma_list() to take any delimiter character, > rename > as strList_from_string(), and move it to qapi/util.c. >

Re: [PATCH V8 16/39] qapi: strv_from_strList

2022-07-05 Thread Steven Sistare
On 6/16/2022 12:08 PM, Marc-André Lureau wrote: > Hi > > On Wed, Jun 15, 2022 at 7:30 PM Steve Sistare > wrote: > > Signed-off-by: Steve Sistare > > --- >  include/qapi/util.h |  6 ++ >  qapi/qapi-util.c   

Re: [PATCH V8 24/39] pci: export export msix_is_pending

2022-07-05 Thread Steven Sistare
On 6/27/2022 6:44 PM, Michael S. Tsirkin wrote: > On Wed, Jun 15, 2022 at 07:52:11AM -0700, Steve Sistare wrote: >> Export msix_is_pending for use by cpr. No functional change. >> >> Signed-off-by: Steve Sistare > > the subject repeats export twice. > With that fixed: > > Acked-by: Michael S. T

Re: [PATCH V8 02/39] migration: qemu file wrappers

2022-07-05 Thread Steven Sistare
On 6/16/2022 11:29 AM, Daniel P. Berrangé wrote: > On Wed, Jun 15, 2022 at 07:51:49AM -0700, Steve Sistare wrote: >> Add qemu_file_open and qemu_fd_open to create QEMUFile objects for unix >> files and file descriptors. >> >> Signed-off-by: Steve Sistare >> --- >> migration/qemu-file-channel.c |

Re: [PATCH V8 13/39] oslib: qemu_clear_cloexec

2022-07-05 Thread Steven Sistare
On 6/16/2022 12:07 PM, Daniel P. Berrangé wrote: > On Wed, Jun 15, 2022 at 07:52:00AM -0700, Steve Sistare wrote: >> Define qemu_clear_cloexec, analogous to qemu_set_cloexec. >> >> Reviewed-by: Dr. David Alan Gilbert >> Signed-off-by: Steve Sistare >> --- >> include/qemu/osdep.h | 1 + >> util/o

Re: [PATCH V8 12/39] memory: flat section iterator

2022-07-05 Thread Steven Sistare
On 7/3/2022 3:52 AM, Peng Liang wrote: > On 6/15/2022 10:51 PM, Steve Sistare wrote: >> Add an iterator over the sections of a flattened address space. >> >> Signed-off-by: Steve Sistare >> Reviewed-by: Marc-André Lureau >> --- >> include/exec/memory.h | 31 +++ >> so

Re: [PATCH V8 02/39] migration: qemu file wrappers

2022-07-05 Thread Steven Sistare
On 6/16/2022 10:55 AM, Marc-André Lureau wrote: > Hi > > On Wed, Jun 15, 2022 at 6:54 PM Steve Sistare > wrote: > > Add qemu_file_open and qemu_fd_open to create QEMUFile objects for unix > files and file descriptors. > > File descriptors are not really

Re: [PATCH V8 06/39] cpr: reboot mode

2022-07-05 Thread Steven Sistare
On 6/16/2022 7:10 AM, Daniel P. Berrangé wrote: > On Wed, Jun 15, 2022 at 07:51:53AM -0700, Steve Sistare wrote: >> Provide the cpr-save and cpr-load functions for live update. These save and >> restore VM state, with minimal guest pause time, so that qemu may be updated >> to a new version in bet

Re: [PATCH V8 04/39] memory: RAM_ANON flag

2022-07-05 Thread Steven Sistare
On 6/15/2022 4:25 PM, David Hildenbrand wrote: > On 15.06.22 16:51, Steve Sistare wrote: >> A memory-backend-ram or a memory-backend-memfd block with the RAM_SHARED >> flag set is not migrated when migrate_ignore_shared() is true, but this >> is wrong, because it has no named backing store, and its

Re: [PATCH V8 05/39] vl: start on wakeup request

2022-07-05 Thread Steven Sistare
On 6/16/2022 11:55 AM, Marc-André Lureau wrote: > Hi > > On Wed, Jun 15, 2022 at 7:27 PM Steve Sistare > wrote: > > If qemu starts and loads a VM in the suspended state, then a later wakeup > request will set the state to running, which is not sufficient

Re: [PATCH V8 02/39] migration: qemu file wrappers

2022-07-05 Thread Steven Sistare
On 6/15/2022 10:18 PM, Guoyi Tu wrote: > On 2022/6/15 22:51, Steve Sistare wrote: >> Add qemu_file_open and qemu_fd_open to create QEMUFile objects for unix >> files and file descriptors. >> > the function names should be updated. > > -- > Guoyi Yes indeed, thanks - Steve >> Signed-off-by: Stev

[PATCH v6 01/13] net: introduce convert_host_port()

2022-07-05 Thread Laurent Vivier
Signed-off-by: Laurent Vivier Reviewed-by: Stefano Brivio --- 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/sockets.h index 038faa157f5

[PATCH v6 08/13] net: dgram: make dgram_dst generic

2022-07-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. Signed-off-by: Laurent Vivier Reviewed-by: Stefano Brivio --- net/dgram.c | 76 +++-- 1 file changed, 45 insertions(+), 31

[PATCH v6 07/13] net: stream: add unix socket

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

[PATCH v6 06/13] net: stream: Don't ignore EINVAL on netdev socket connection

2022-07-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: Daniel P. Berran

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

2022-07-05 Thread Laurent Vivier
As qemu_opts_parse_noisily() flattens the QAPI structures ("type" field of Netdev structure can collides with "type" field of SocketAddress), we introduce a way to bypass qemu_opts_parse_noisily() and use directly visit_type_Netdev() to parse the backend parameters. More details from Markus: qemu

[PATCH v6 09/13] net: dgram: move mcast specific code from net_socket_fd_init_dgram()

2022-07-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, 73 insertions(+), 70 deletions(-) diff -

[PATCH v6 10/13] net: dgram: add unix socket

2022-07-05 Thread Laurent Vivier
Signed-off-by: Laurent Vivier Reviewed-by: Stefano Brivio --- net/dgram.c | 65 ++--- qapi/net.json | 2 +- qemu-options.hx | 1 + 3 files changed, 64 insertions(+), 4 deletions(-) diff --git a/net/dgram.c b/net/dgram.c index 16e2d909755c..9f3

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

2022-07-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 --- include/net/net.h | 2 +- net/net.c | 20 +++---

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

2022-07-05 Thread Laurent Vivier
"-netdev socket" only supports inet sockets. It's not a complex task to add support for unix sockets, but the socket netdev parameters are not defined to manage well unix socket parameters. As discussed in: "socket.c added support for unix domain socket datagram transport" https://lore.kern

[PATCH v6 05/13] qapi: net: add stream and dgram netdevs

2022-07-05 Thread Laurent Vivier
Copied from socket netdev file and modified to use SocketAddress to be able to introduce new features like unix socket. "udp" and "mcast" are squashed into dgram netdev, multicast is detected according to the IP address type. "listen" and "connect" modes are managed by stream netdev. An optional p

[PATCH v6 03/13] net: simplify net_client_parse() error management

2022-07-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 --- include/net/net.h | 2 +- net/net.c | 6 ++ softm

Re: [PATCH] iotests: fix copy-before-write for macOS and FreeBSD

2022-07-05 Thread Vladimir Sementsov-Ogievskiy
On 7/5/22 20:22, Richard Henderson wrote: On 7/5/22 21:07, Vladimir Sementsov-Ogievskiy wrote: strerror() represents ETIMEDOUT a bit different in Linux and macOS / FreeBSD. Let's support the latter too. Fixes: 9d05a87b77 ("iotests: copy-before-write: add cases for cbw-timeout option") Signed-o

[PATCH v4 0/1] target/riscv: Add Zihintpause support

2022-07-05 Thread Dao Lu
This patch adds RISC-V Zihintpause support. The extension is set to be enabled by default and opcode has been added to insn32.decode. Added trans_pause to exit the TB and return to main loop. The change can also be found in: https://github.com/dlu42/qemu/tree/zihintpause_support_v1 Tested along

[PATCH v4 1/1] target/riscv: Add Zihintpause support

2022-07-05 Thread Dao Lu
Added support for RISC-V PAUSE instruction from Zihintpause extension, enabled by default. Tested-by: Heiko Stuebner Signed-off-by: Dao Lu --- target/riscv/cpu.c | 2 ++ target/riscv/cpu.h | 1 + target/riscv/insn32.decode | 7 ++- t

[PATCH] usb/hcd-xhci: check slotid in xhci_wakeup_endpoint()

2022-07-05 Thread Mauro Matteo Cascella
This prevents an OOB read (followed by an assertion failure in xhci_kick_ep) when slotid > xhci->numslots. Reported-by: Soul Chen Signed-off-by: Mauro Matteo Cascella --- hw/usb/hcd-xhci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.

Re: [PATCH] multifd: Copy pages before compressing them with zlib

2022-07-05 Thread Dr. David Alan Gilbert
* Ilya Leoshkevich (i...@linux.ibm.com) wrote: > On Tue, 2022-07-05 at 16:27 +0100, Dr. David Alan Gilbert wrote: > > * Ilya Leoshkevich (i...@linux.ibm.com) wrote: > > > zlib_send_prepare() compresses pages of a running VM. zlib does not > > > make any thread-safety guarantees with respect to chan

Re: [PATCH] multifd: Copy pages before compressing them with zlib

2022-07-05 Thread Ilya Leoshkevich
On Tue, 2022-07-05 at 16:27 +0100, Dr. David Alan Gilbert wrote: > * Ilya Leoshkevich (i...@linux.ibm.com) wrote: > > zlib_send_prepare() compresses pages of a running VM. zlib does not > > make any thread-safety guarantees with respect to changing > > deflate() > > input concurrently with deflate(

Re: [PATCH] iotests: fix copy-before-write for macOS and FreeBSD

2022-07-05 Thread Richard Henderson
On 7/5/22 21:07, Vladimir Sementsov-Ogievskiy wrote: strerror() represents ETIMEDOUT a bit different in Linux and macOS / FreeBSD. Let's support the latter too. Fixes: 9d05a87b77 ("iotests: copy-before-write: add cases for cbw-timeout option") Signed-off-by: Vladimir Sementsov-Ogievskiy --- A

Re: [PATCH 5/5] multifd: Only sync once each full round of memory

2022-07-05 Thread Dr. David Alan Gilbert
* Daniel P. Berrangé (berra...@redhat.com) wrote: > On Tue, Jul 05, 2022 at 06:13:40PM +0100, Dr. David Alan Gilbert wrote: > > * Daniel P. Berrangé (berra...@redhat.com) wrote: > > > On Tue, Jul 05, 2022 at 05:11:46PM +0200, Juan Quintela wrote: > > > > "Dr. David Alan Gilbert" wrote: > > > > > *

Re: [PATCH 5/5] multifd: Only sync once each full round of memory

2022-07-05 Thread Daniel P . Berrangé
On Tue, Jul 05, 2022 at 06:13:40PM +0100, Dr. David Alan Gilbert wrote: > * Daniel P. Berrangé (berra...@redhat.com) wrote: > > On Tue, Jul 05, 2022 at 05:11:46PM +0200, Juan Quintela wrote: > > > "Dr. David Alan Gilbert" wrote: > > > > * Juan Quintela (quint...@redhat.com) wrote: > > > >> We need

Re: [PATCH 5/5] target/arm: Correctly implement Feat_DoubleLock

2022-07-05 Thread Richard Henderson
On 7/5/22 21:06, Peter Maydell wrote: On Sat, 2 Jul 2022 at 15:19, Richard Henderson wrote: On 7/1/22 01:11, Peter Maydell wrote: +static inline bool isar_feature_any_doublelock(const ARMISARegisters *id) +{ +/* + * We can't just OR together the aa32 and aa64 checks, because + * i

Re: [PATCH 5/5] multifd: Only sync once each full round of memory

2022-07-05 Thread Dr. David Alan Gilbert
* Daniel P. Berrangé (berra...@redhat.com) wrote: > On Tue, Jul 05, 2022 at 05:11:46PM +0200, Juan Quintela wrote: > > "Dr. David Alan Gilbert" wrote: > > > * Juan Quintela (quint...@redhat.com) wrote: > > >> We need to add a new flag to mean to sync at that point. > > >> Notice that we still sync

Re: [PATCH v4] hw/nvme: Use ioeventfd to handle doorbell updates

2022-07-05 Thread Klaus Jensen
On Jul 5 22:24, Jinhao Fan wrote: > Add property "ioeventfd" which is enabled by default. When this is > enabled, updates on the doorbell registers will cause KVM to signal > an event to the QEMU main loop to handle the doorbell updates. > Therefore, instead of letting the vcpu thread run both gue

Re: [RFC PATCH v2 5/8] qapi: golang: Generate qapi's event types in Go

2022-07-05 Thread Daniel P . Berrangé
On Tue, Jul 05, 2022 at 08:45:54AM -0700, Andrea Bolognani wrote: > On Fri, Jun 17, 2022 at 02:19:29PM +0200, Victor Toso wrote: > > This patch handles QAPI event types and generates data structures in > > Go that handles it. > > > > We also define a Event interface and two helper functions Marshal

Re: [PATCH] multifd: Copy pages before compressing them with zlib

2022-07-05 Thread Christian Borntraeger
Am 05.07.22 um 18:16 schrieb Dr. David Alan Gilbert: * Peter Maydell (peter.mayd...@linaro.org) wrote: On Mon, 4 Jul 2022 at 17:43, Ilya Leoshkevich wrote: zlib_send_prepare() compresses pages of a running VM. zlib does not make any thread-safety guarantees with respect to changing deflate()

Re: [RFC PATCH v2 7/8] qapi: golang: Add CommandResult type to Go

2022-07-05 Thread Daniel P . Berrangé
On Tue, Jul 05, 2022 at 08:46:21AM -0700, Andrea Bolognani wrote: > On Fri, Jun 17, 2022 at 02:19:31PM +0200, Victor Toso wrote: > > +type EmptyCommandReturn struct { > > +CommandId string `json:"id,omitempty"` > > +Error *QapiError `json:"error,omitempty"` > > +Name

Re: [PATCH] multifd: Copy pages before compressing them with zlib

2022-07-05 Thread Dr. David Alan Gilbert
* Christian Borntraeger (borntrae...@de.ibm.com) wrote: > Am 05.07.22 um 18:16 schrieb Dr. David Alan Gilbert: > > * Peter Maydell (peter.mayd...@linaro.org) wrote: > > > On Mon, 4 Jul 2022 at 17:43, Ilya Leoshkevich wrote: > > > > > > > > zlib_send_prepare() compresses pages of a running VM. zli

Re: [PATCH 5/5] multifd: Only sync once each full round of memory

2022-07-05 Thread Daniel P . Berrangé
On Tue, Jul 05, 2022 at 05:11:46PM +0200, Juan Quintela wrote: > "Dr. David Alan Gilbert" wrote: > > * Juan Quintela (quint...@redhat.com) wrote: > >> We need to add a new flag to mean to sync at that point. > >> Notice that we still synchronize at the end of setup and at the end of > >> complete

Re: [PULL 00/14] Testing and misc patches

2022-07-05 Thread Richard Henderson
On 7/5/22 16:08, Thomas Huth wrote: Hi Richard! The following changes since commit dfe2382f0641f537fdd33399d579215077c8f68c: Merge tag 'kraxel-20220704-pull-request' of https://gitlab.com/kraxel/qemu into staging (2022-07-04 14:57:21 +0530) are available in the Git repository at: htt

Re: [PATCH 2/5] ppc/40x: Allocate IRQ lines with qdev_init_gpio_in()

2022-07-05 Thread BALATON Zoltan
On Tue, 5 Jul 2022, Cédric Le Goater wrote: Signed-off-by: Cédric Le Goater --- hw/ppc/ppc.c | 5 + hw/ppc/ppc405_uc.c | 4 ++-- hw/ppc/ppc440_bamboo.c | 4 ++-- hw/ppc/sam460ex.c | 4 ++-- hw/ppc/virtex_ml507.c | 10 +- 5 files changed, 12 insertions(+), 15 deleti

[PATCH v2 14/18] block: Implement blk_flush() using generated_co_wrapper

2022-07-05 Thread Alberto Faria
Signed-off-by: Alberto Faria Reviewed-by: Paolo Bonzini Reviewed-by: Hanna Reitz --- block/block-backend.c | 11 --- block/coroutines.h| 2 -- include/sysemu/block-backend-io.h | 2 +- 3 files changed, 1 insertion(+), 14 deletions(-) diff --git a/block/blo

Re: [RFC PATCH v2 4/8] qapi: golang: Generate qapi's union types in Go

2022-07-05 Thread Daniel P . Berrangé
On Tue, Jul 05, 2022 at 08:45:30AM -0700, Andrea Bolognani wrote: > On Fri, Jun 17, 2022 at 02:19:28PM +0200, Victor Toso wrote: > > qapi: > > | { 'union': 'SetPasswordOptions', > > | 'base': { 'protocol': 'DisplayProtocol', > > | 'password': 'str', > > | '*connect

[PATCH v2 12/18] block: Implement blk_pwrite_zeroes() using generated_co_wrapper

2022-07-05 Thread Alberto Faria
Signed-off-by: Alberto Faria Reviewed-by: Paolo Bonzini Reviewed-by: Hanna Reitz --- block/block-backend.c | 8 include/sysemu/block-backend-io.h | 5 +++-- tests/unit/test-block-iothread.c | 17 + 3 files changed, 20 insertions(+), 10 deletions(-) diff

Re: [PATCH 2/5] ppc/40x: Allocate IRQ lines with qdev_init_gpio_in()

2022-07-05 Thread Cédric Le Goater
On 7/5/22 18:27, BALATON Zoltan wrote: On Tue, 5 Jul 2022, Cédric Le Goater wrote: Signed-off-by: Cédric Le Goater --- hw/ppc/ppc.c   |  5 + hw/ppc/ppc405_uc.c |  4 ++-- hw/ppc/ppc440_bamboo.c |  4 ++-- hw/ppc/sam460ex.c  |  4 ++-- hw/ppc/virtex_ml507.c  | 10 +- 5 fi

  1   2   3   >