Re: [PATCH v2 1/2] file-posix: add the tracking of the zones wp

2022-10-05 Thread Damien Le Moal
On 10/5/22 10:44, Damien Le Moal wrote: > On 9/29/22 18:31, Sam Li wrote: >> Since Linux doesn't have a user API to issue zone append operations to >> zoned devices from user space, the file-posix driver is modified to add >> zone append emulation using regular writes. To do this, the file-posix >>

Re: [PATCH 0/2] Fix the virito features negotiation flaw

2022-10-05 Thread Hyman Huang
Ping, Hi, Michael and Jason, how does this patchset feel think? :) Sorry if i made noise. Yong 在 2022/9/26 14:36, huang...@chinatelecom.cn 写道: From: "Hyman Huang(黄勇)" This patchset aim to fix the unexpected negotiation features for vhost-user netdev interface. Steps to reproduce the is

Re: [PATCH v2 1/2] file-posix: add the tracking of the zones wp

2022-10-05 Thread Sam Li
Damien Le Moal 于2022年10月5日周三 15:34写道: > > On 10/5/22 10:44, Damien Le Moal wrote: > > On 9/29/22 18:31, Sam Li wrote: > >> Since Linux doesn't have a user API to issue zone append operations to > >> zoned devices from user space, the file-posix driver is modified to add > >> zone append emulation

Re: [RFC v2 13/15] vfio/iommufd: Implement the iommufd backend

2022-10-05 Thread Eric Auger
Hi Alister, On 10/4/22 08:47, Alistair Popple wrote: > Yi Liu writes: > > [...] > >> +static int vfio_get_devicefd(const char *sysfs_path, Error **errp) >> +{ >> +long int ret = -ENOTTY; >> +char *path, *vfio_dev_path = NULL, *vfio_path = NULL; >> +DIR *dir; >> +struct dirent *dent

Re: [RFC patch 0/1] block: vhost-blk backend

2022-10-05 Thread Andrey Zhadchenko
On 10/4/22 21:13, Stefan Hajnoczi wrote: On Mon, Jul 25, 2022 at 11:55:26PM +0300, Andrey Zhadchenko wrote: Although QEMU virtio-blk is quite fast, there is still some room for improvements. Disk latency can be reduced if we handle virito-blk requests in host kernel so we avoid a lot of syscalls

Re: [PATCH v6] 9pfs: use GHashTable for fid table

2022-10-05 Thread Christian Schoenebeck
On Dienstag, 4. Oktober 2022 14:54:16 CEST Christian Schoenebeck wrote: > On Dienstag, 4. Oktober 2022 12:41:21 CEST Linus Heckemann wrote: > > The previous implementation would iterate over the fid table for > > lookup operations, resulting in an operation with O(n) complexity on > > the number of

回复:Question about RISC-V brom register a1 set value

2022-10-05 Thread 刘志伟
I think the a1 from QEMU reset vector is the device tree(fdt_laddr) though I don't know if it is directly used by the OpenSBI or just passed to the Linux kernel. Thanks, Zhiwei -- 发件人:Philippe Mathieu-Daudé via 发送时间:2022年10月3日(星期一)

Re: [PATCH] Revert "qapi: fix examples of blockdev-add with qcow2"

2022-10-05 Thread Kevin Wolf
Am 30.09.2022 um 19:19 hat Markus Armbruster geschrieben: > This reverts commit b6522938327141235b97ab38e40c6c4512587373. > > Kevin Wolf NAKed this patch, because: > > 'file' is a required member (defined in BlockdevOptionsGenericFormat), > removing it makes the example invalid. 'data-fil

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

Re: [RFC patch 0/1] block: vhost-blk backend

2022-10-05 Thread Andrey Zhadchenko
On 10/4/22 21:26, Stefan Hajnoczi wrote: On Mon, Jul 25, 2022 at 11:55:26PM +0300, Andrey Zhadchenko wrote: Although QEMU virtio-blk is quite fast, there is still some room for improvements. Disk latency can be reduced if we handle virito-blk requests in host kernel so we avoid a lot of sysca

Re: [PATCH 06/26] blkdebug: add missing coroutine_fn annotations

2022-10-05 Thread Kevin Wolf
Am 22.09.2022 um 10:49 hat Paolo Bonzini geschrieben: > Callers of coroutine_fn must be coroutine_fn themselves, or the call > must be within "if (qemu_in_coroutine())". Apply coroutine_fn to > functions where this holds. > > Reviewed-by: Alberto Faria > Reviewed-by: Eric Blake > Signed-off-by:

Re: [PATCH 13/26] parallels: add missing coroutine_fn annotations

2022-10-05 Thread Kevin Wolf
Am 22.09.2022 um 10:49 hat Paolo Bonzini geschrieben: > Callers of coroutine_fn must be coroutine_fn themselves, or the call > must be within "if (qemu_in_coroutine())". Apply coroutine_fn to > functions where this holds. > > Reviewed-by: Alberto Faria > Signed-off-by: Paolo Bonzini > --- > bl

Re: [PATCH v2 5/5] migration: Disable multifd explicitly with compression

2022-10-05 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > Multifd thread model does not work for compression, explicitly disable it. > > Note that previuosly even we can enable both of them, nothing will go > wrong, because the compression code has higher priority so multifd feature > will just be ignored. Now we'

Re: Question about RISC-V brom register a1 set value

2022-10-05 Thread Eric Chan
Hi Zhiwei, thanks for your reply, I make a mistake, t0 is 0x1000 so both lw a1, 32(t0) or ld a1, 32(t0) just read from the brom offset 32byte. Thanks, Eric Chan 刘志伟 於 2022年10月5日 週三 下午5:47寫道: > I think the a1 from QEMU reset vector is the device tree(fdt_laddr) though > I don't know if

Re: [PATCH 07/14] migration: Teach PSS about host page

2022-10-05 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > Migration code has a lot to do with host pages. Teaching PSS core about > the idea of host page helps a lot and makes the code clean. Meanwhile, > this prepares for the future changes that can leverage the new PSS helpers > that this patch introduces to sen

Re: [PATCH 05/14] migration: Yield bitmap_mutex properly when sending/sleeping

2022-10-05 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > On Tue, Oct 04, 2022 at 02:55:10PM +0100, Dr. David Alan Gilbert wrote: > > * Peter Xu (pet...@redhat.com) wrote: > > > Don't take the bitmap mutex when sending pages, or when being throttled by > > > migration_rate_limit() (which is a bit tricky to call it h

Re: [PATCH 06/14] migration: Use atomic ops properly for page accountings

2022-10-05 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > On Tue, Oct 04, 2022 at 05:59:36PM +0100, Dr. David Alan Gilbert wrote: > > * Peter Xu (pet...@redhat.com) wrote: > > > To prepare for thread-safety on page accountings, at least below counters > > > need to be accessed only atomically, they are: > > > > > >

Re: [RFC patch 0/1] block: vhost-blk backend

2022-10-05 Thread Andrey Zhadchenko
On 10/4/22 22:00, Stefan Hajnoczi wrote: On Mon, Jul 25, 2022 at 11:55:26PM +0300, Andrey Zhadchenko wrote: Although QEMU virtio-blk is quite fast, there is still some room for improvements. Disk latency can be reduced if we handle virito-blk requests in host kernel so we avoid a lot of sysca

Re: [PATCH 0/3] Add TCG & KVM support for MSR_CORE_THREAD_COUNT

2022-10-05 Thread Paolo Bonzini
On 10/5/22 00:56, Alexander Graf wrote: Commit 027ac0cb516 ("target/i386/hvf: add rdmsr 35H MSR_CORE_THREAD_COUNT") added support for the MSR_CORE_THREAD_COUNT MSR to HVF. This MSR is mandatory to execute macOS when run with -cpu host,+hypervisor. This patch set adds support for the very same MS

Re: [PATCH v6 00/25] ppc4xx_sdram QOMify and clean ups

2022-10-05 Thread BALATON Zoltan
On Tue, 27 Sep 2022, BALATON Zoltan wrote: On Mon, 26 Sep 2022, Daniel Henrique Barboza wrote: On 9/26/22 14:09, Daniel Henrique Barboza wrote: Zoltan, I've started to push some patches to ppc-next. Patches 1-13 are already pushed and I'm running tests on patches 14-17. Assuming everything i

[PATCH] target/ppc: Fix xvcmp* clearing FI bit

2022-10-05 Thread Víctor Colombo
Vector instructions in general are not supposed to change the FI bit. However, xvcmp* instructions are calling gen_helper_float_check_status, which is leading to a cleared FI flag where it should be kept unchanged. As helper_float_check_status only affects inexact, overflow and underflow, and the x

Re: ublk-qcow2: ublk-qcow2 is available

2022-10-05 Thread Stefan Hajnoczi
On Wed, 5 Oct 2022 at 00:19, Ming Lei wrote: > > On Tue, Oct 04, 2022 at 09:53:32AM -0400, Stefan Hajnoczi wrote: > > On Tue, 4 Oct 2022 at 05:44, Ming Lei wrote: > > > > > > On Mon, Oct 03, 2022 at 03:53:41PM -0400, Stefan Hajnoczi wrote: > > > > On Fri, Sep 30, 2022 at 05:24:11PM +0800, Ming Le

Re: ublk-qcow2: ublk-qcow2 is available

2022-10-05 Thread Denis V. Lunev
On 10/5/22 14:21, Stefan Hajnoczi wrote: On Wed, 5 Oct 2022 at 00:19, Ming Lei wrote: On Tue, Oct 04, 2022 at 09:53:32AM -0400, Stefan Hajnoczi wrote: On Tue, 4 Oct 2022 at 05:44, Ming Lei wrote: On Mon, Oct 03, 2022 at 03:53:41PM -0400, Stefan Hajnoczi wrote: On Fri, Sep 30, 2022 at 05:24:

Re: [PATCH 08/14] migration: Introduce pss_channel

2022-10-05 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > Introduce pss_channel for PageSearchStatus, define it as "the migration > channel to be used to transfer this host page". > > We used to have rs->f, which is a mirror to MigrationState.to_dst_file. > > After postcopy preempt initial version, rs->f can be dy

Re: [PATCH v8 2/8] KVM: Extend the memslot to support fd-based private memory

2022-10-05 Thread Jarkko Sakkinen
On Thu, Sep 15, 2022 at 10:29:07PM +0800, Chao Peng wrote: > In memory encryption usage, guest memory may be encrypted with special > key and can be accessed only by the VM itself. We call such memory > private memory. It's valueless and sometimes can cause problem to allow > userspace to access gu

Re: [RFC PATCH 1/1] block: add vhost-blk backend

2022-10-05 Thread Andrey Zhadchenko
Thanks for the review! On 10/4/22 21:45, Stefan Hajnoczi wrote: On Mon, Jul 25, 2022 at 11:55:27PM +0300, Andrey Zhadchenko wrote: Although QEMU virtio is quite fast, there is still some room for improvements. Disk latency can be reduced if we handle virito-blk requests in host kernel istead of

Re: [PATCH 09/14] migration: Add pss_init()

2022-10-05 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > Helper to init PSS structures. > > Signed-off-by: Peter Xu Reviewed-by: Dr. David Alan Gilbert > --- > migration/ram.c | 12 +--- > 1 file changed, 9 insertions(+), 3 deletions(-) > > diff --git a/migration/ram.c b/migration/ram.c > index 40ff5

Re: [PATCH 05/14] migration: Yield bitmap_mutex properly when sending/sleeping

2022-10-05 Thread Peter Xu
On Wed, Oct 05, 2022 at 12:18:00PM +0100, Dr. David Alan Gilbert wrote: > * Peter Xu (pet...@redhat.com) wrote: > > On Tue, Oct 04, 2022 at 02:55:10PM +0100, Dr. David Alan Gilbert wrote: > > > * Peter Xu (pet...@redhat.com) wrote: > > > > Don't take the bitmap mutex when sending pages, or when bei

Re: [PATCH] target/ppc: Fix xvcmp* clearing FI bit

2022-10-05 Thread Richard Henderson
On 10/5/22 05:15, Víctor Colombo wrote: Vector instructions in general are not supposed to change the FI bit. However, xvcmp* instructions are calling gen_helper_float_check_status, which is leading to a cleared FI flag where it should be kept unchanged. As helper_float_check_status only affects

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 06/14] migration: Use atomic ops properly for page accountings

2022-10-05 Thread Peter Xu
On Wed, Oct 05, 2022 at 12:38:05PM +0100, Dr. David Alan Gilbert wrote: > * Peter Xu (pet...@redhat.com) wrote: > > On Tue, Oct 04, 2022 at 05:59:36PM +0100, Dr. David Alan Gilbert wrote: > > > * Peter Xu (pet...@redhat.com) wrote: > > > > To prepare for thread-safety on page accountings, at least

Re: [PULL v3 00/15] x86 + misc changes for 2022-09-29

2022-10-05 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/7.2 for any user-visible changes. signature.asc Description: PGP signature

[PATCH] coroutine: Make qemu_coroutine_self() return NULL if not in coroutine

2022-10-05 Thread Alberto Faria
qemu_coroutine_self() is used in several places outside of coroutine context (mostly in qcow2 tracing calls). Ensure qemu_coroutine_self() works properly when not called from coroutine context, returning NULL in that case, and remove its coroutine_fn annotation. Signed-off-by: Alberto Faria ---

Re: [PATCH v5 6/9] target/arm: Change gen_jmp* to work on displacements

2022-10-05 Thread Peter Maydell
On Tue, 4 Oct 2022 at 21:57, Richard Henderson wrote: > > On 10/4/22 08:58, Peter Maydell wrote: > > On Fri, 30 Sept 2022 at 23:10, Richard Henderson > > wrote: > >> > >> In preparation for TARGET_TB_PCREL, reduce reliance on absolute values. > >> > >> Signed-off-by: Richard Henderson > >> --- >

[PATCH v4] RISC-V: Add Zawrs ISA extension support

2022-10-05 Thread Christoph Muellner
This patch adds support for the Zawrs ISA extension. Given the current (incomplete) implementation of reservation sets there seems to be no way to provide a full emulation of the WRS instruction (wake on reservation set invalidation or timeout or interrupt). Therefore, we just exit the TB and retur

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

2022-10-05 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/7.2 for any user-visible changes. signature.asc Description: PGP signature

[RFC PATCH 1/4] target/ppc: prepare instructions to work with caching last FP insn

2022-10-05 Thread Víctor Colombo
When enabling hardfpu for Power and adding the instruction caching feature, it will be necessary to uncache when the instruction is garanteed to be executed in softfloat. If the cache is not cleared in this situation, it could lead to a previous instruction being reexecuted and yield a different re

[RFC PATCH 4/4] target/ppc: Enable hardfpu for Power

2022-10-05 Thread Víctor Colombo
Remove the build conditional from softfloat.c, allowing TARGET_PPC to use hardfpu. Signed-off-by: Víctor Colombo --- fpu/softfloat.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fpu/softfloat.c b/fpu/softfloat.c index c7454c3eb1..de94732f6a 100644 --- a/fpu/softfloat

Re: [PULL 00/54] testing, gdbstub, plugin and gitdm updates

2022-10-05 Thread Stefan Hajnoczi
On Tue, 4 Oct 2022 at 09:38, Alex Bennée wrote: > > The following changes since commit efbf38d73e5dcc4d5f8b98c6e7a12be1f3b91745: > > Merge tag 'for-upstream' of git://repo.or.cz/qemu/kevin into staging > (2022-10-03 15:06:07 -0400) > > are available in the Git repository at: > > https://githu

[RFC PATCH 3/4] target/ppc: Implement instruction caching for muladd

2022-10-05 Thread Víctor Colombo
This patch adds the code necessary to cache muladd instructions for usage with hardfpu in Power. muladd is an instruction that receives four arguments, three f64 and one status, and returns f64. This info will be cached inside the union in env, which grows when other instructions with other signat

Re: ublk-qcow2: ublk-qcow2 is available

2022-10-05 Thread Stefan Hajnoczi
On Tue, Oct 04, 2022 at 01:57:50AM +0200, Denis V. Lunev wrote: > On 10/3/22 21:53, Stefan Hajnoczi wrote: > > On Fri, Sep 30, 2022 at 05:24:11PM +0800, Ming Lei wrote: > > > ublk-qcow2 is available now. > > Cool, thanks for sharing! > yep > > > > So far it provides basic read/write function, and

Re: [RFC patch 0/1] block: vhost-blk backend

2022-10-05 Thread Stefan Hajnoczi
On Wed, Oct 05, 2022 at 12:14:18PM +0300, Andrey Zhadchenko wrote: > On 10/4/22 21:13, Stefan Hajnoczi wrote: > > On Mon, Jul 25, 2022 at 11:55:26PM +0300, Andrey Zhadchenko wrote: > > > Although QEMU virtio-blk is quite fast, there is still some room for > > > improvements. Disk latency can be red

[RFC PATCH 0/4] Idea for using hardfloat in PPC

2022-10-05 Thread Víctor Colombo
As can be seem in the mailing thread that added hardfloat support in QEMU [1], a requirement for it to work is to have float_flag_inexact set when entering the API in softfloat.c. However, in the same thread, it was explained that PPC target would not work by default with this implementation. The p

Re: [PULL 00/54] testing, gdbstub, plugin and gitdm updates

2022-10-05 Thread Alex Bennée
Stefan Hajnoczi writes: > On Tue, 4 Oct 2022 at 09:38, Alex Bennée wrote: >> >> The following changes since commit efbf38d73e5dcc4d5f8b98c6e7a12be1f3b91745: >> >> Merge tag 'for-upstream' of git://repo.or.cz/qemu/kevin into staging >> (2022-10-03 15:06:07 -0400) >> >> are available in the G

[RFC PATCH 2/4] target/ppc: Implement instruction caching for fsqrt

2022-10-05 Thread Víctor Colombo
This patch adds the code necessary to cache fsqrt for usage with hardfpu in Power. It is also the first instruction to use the new cache instruction system. fsqrt is an instruction that receives two arguments, one f64 and one status, and returns f64. This info will be cached inside a new union in

Re: [RFC patch 0/1] block: vhost-blk backend

2022-10-05 Thread Stefan Hajnoczi
On Wed, Oct 05, 2022 at 01:28:14PM +0300, Andrey Zhadchenko wrote: > > > On 10/4/22 21:26, Stefan Hajnoczi wrote: > > On Mon, Jul 25, 2022 at 11:55:26PM +0300, Andrey Zhadchenko wrote: > > > Although QEMU virtio-blk is quite fast, there is still some room for > > > improvements. Disk latency can

Re: [RFC patch 0/1] block: vhost-blk backend

2022-10-05 Thread Stefan Hajnoczi
On Wed, Oct 05, 2022 at 02:50:06PM +0300, Andrey Zhadchenko wrote: > > > On 10/4/22 22:00, Stefan Hajnoczi wrote: > > On Mon, Jul 25, 2022 at 11:55:26PM +0300, Andrey Zhadchenko wrote: > > > Although QEMU virtio-blk is quite fast, there is still some room for > > > improvements. Disk latency can

Re: [RFC PATCH 1/1] block: add vhost-blk backend

2022-10-05 Thread Stefan Hajnoczi
On Wed, Oct 05, 2022 at 04:06:58PM +0300, Andrey Zhadchenko wrote: > Thanks for the review! > > On 10/4/22 21:45, Stefan Hajnoczi wrote: > > On Mon, Jul 25, 2022 at 11:55:27PM +0300, Andrey Zhadchenko wrote: > > > Although QEMU virtio is quite fast, there is still some room for > > > improvements.

[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 26e485438718

[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 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 +- net/net.c

[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/t

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

2022-10-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 v10 06/17] qapi: net: add stream and dgram netdevs

2022-10-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 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. D

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

2022-10-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 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/dgra

[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/net.c

[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 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 14/17] qemu-sockets: update socket_uri() and socket_parse() to be consistent

2022-10-05 Thread Laurent Vivier
To be consistent with socket_uri(), add 'tcp:' prefix for inet type in socket_parse(), by default socket_parse() use tcp when no prefix is provided (format is host:port). In socket_uri(), use 'vsock:' prefix for vsock type rather than 'tcp:' because it makes a vsock address look like an inet addre

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

[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(+), 2 de

[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 4

[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 inse

[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 --- linux-user/st

[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

Re: [PATCH] coroutine: Make qemu_coroutine_self() return NULL if not in coroutine

2022-10-05 Thread Kevin Wolf
Am 05.10.2022 um 16:20 hat Alberto Faria geschrieben: > qemu_coroutine_self() is used in several places outside of coroutine > context (mostly in qcow2 tracing calls). > > Ensure qemu_coroutine_self() works properly when not called from > coroutine context, returning NULL in that case, and remove

[PULL v2 00/53] testing, gdbstub, plugin and gitdm updates

2022-10-05 Thread Alex Bennée
The following changes since commit fafd35a6dab8e70a7c395aaa8e1273267cf9f3c8: Merge tag 'trivial-branch-for-7.2-pull-request' of https://gitlab.com/laurent_vivier/qemu into staging (2022-10-04 14:04:18 -0400) are available in the Git repository at: https://github.com/stsquad/qemu.git tags/p

Re: [PATCH] coroutine: Make qemu_coroutine_self() return NULL if not in coroutine

2022-10-05 Thread Alberto Campinho Faria
On Wed, Oct 5, 2022 at 5:34 PM Kevin Wolf wrote: > The coroutine_fn annotation for qemu_coroutine_self() is wrong, but I > think it already works outside of coroutine context, and consistently in > all three backends, by returning &leader. > > Changing that to NULL makes me kind of nervous because

Re: [PULL v3 0/4] Hexagon (target/hexagon) improve store handling and gen_tcg_funcs.py

2022-10-05 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/7.2 for any user-visible changes. signature.asc Description: PGP signature

[PATCH] coroutine: Drop coroutine_fn annotation from qemu_coroutine_self()

2022-10-05 Thread Alberto Faria
qemu_coroutine_self() can be called from outside coroutine context, returning the leader coroutine, and several such invocations currently exist (mostly in qcow2 tracing calls). Signed-off-by: Alberto Faria --- include/qemu/coroutine.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

Re: [PATCH] linux-user: fix pidfd_send_signal()

2022-10-05 Thread Helge Deller
On 10/5/22 18:38, Laurent Vivier wrote: 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-

Re: [PULL 00/20] tcg patch queue

2022-10-05 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/7.2 for any user-visible changes. signature.asc Description: PGP signature

Re: [PATCH 02/26] block: add missing coroutine_fn annotations

2022-10-05 Thread Alberto Campinho Faria
On Sat, Sep 24, 2022 at 2:42 PM Paolo Bonzini wrote: > Because at the time I wrote the patch, blk_pwrite_zeroes() was a > coroutine_fn. :) > > It is called from bdrv_co_create_opts_simple which is coroutine_fn and > performs I/O, so it should be a coroutine_fn. I have a few more patches > to not g

Re: [PATCH 10/14] migration: Make PageSearchStatus part of RAMState

2022-10-05 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > We used to allocate PSS structure on the stack for precopy when sending > pages. Make it static, so as to describe per-channel ram migration status. > > Here we declared RAM_CHANNEL_MAX instances, preparing for postcopy to use > it, even though this patch h

Re: [PATCH 10/14] migration: Make PageSearchStatus part of RAMState

2022-10-05 Thread Peter Xu
On Wed, Oct 05, 2022 at 07:51:34PM +0100, Dr. David Alan Gilbert wrote: > > /* struct contains XBZRLE cache and a static page > > used by the compression */ > > static struct { > > @@ -319,6 +359,11 @@ typedef struct { > > struct RAMState { > > /* QEMUFile used for this migration */ > >

Re: [PATCH 05/14] migration: Yield bitmap_mutex properly when sending/sleeping

2022-10-05 Thread Peter Xu
On Wed, Oct 05, 2022 at 09:40:53AM -0400, Peter Xu wrote: > On Wed, Oct 05, 2022 at 12:18:00PM +0100, Dr. David Alan Gilbert wrote: > > * Peter Xu (pet...@redhat.com) wrote: > > > On Tue, Oct 04, 2022 at 02:55:10PM +0100, Dr. David Alan Gilbert wrote: > > > > * Peter Xu (pet...@redhat.com) wrote: >

Re: [PATCH v3 00/26] target/i386: pc-relative translation blocks

2022-10-05 Thread Richard Henderson
On 10/1/22 13:59, Paolo Bonzini wrote: Il sab 1 ott 2022, 16:09 Richard Henderson > ha scritto: This is the x86 specific changes required to reduce the amount of translation for address space randomization. For v3, quite a few changes based on

Re: [RFC PATCH 0/4] Idea for using hardfloat in PPC

2022-10-05 Thread Richard Henderson
On 10/5/22 07:37, Víctor Colombo wrote: However, the impact in performance was not the expected. In x86_64 I had a small 3% improvement, while in a Power9 machine there was a small performance loss, as can be seem below (100 executions). || min [s] | max [s] | avg [s] | | before | 122.30

Re: [PATCH v3 00/26] target/i386: pc-relative translation blocks

2022-10-05 Thread Paolo Bonzini
Great, then if you want I can merge this myself. Paolo Il mer 5 ott 2022, 16:26 Richard Henderson ha scritto: > On 10/1/22 13:59, Paolo Bonzini wrote: > > > > > > Il sab 1 ott 2022, 16:09 Richard Henderson > > ha scritto: > > > > This is the x86 specifi

Re: [PATCH 06/26] blkdebug: add missing coroutine_fn annotations

2022-10-05 Thread Paolo Bonzini
Il mer 5 ott 2022, 06:32 Kevin Wolf ha scritto: > Hm... blkdebug_debug_event() is called from bdrv_debug_event(), which is > not coroutine_fn. And I think that it's not coroutine_fn is correct: > For example, with 'qemu-img snapshot -c' you get img_snapshot() -> > bdrv_snapshot_create() -> qcow2_

Re: [PULL v2 00/53] testing, gdbstub, plugin and gitdm updates

2022-10-05 Thread Stefan Hajnoczi
Hi Alex, This pull request fails two CI jobs: 1. https://gitlab.com/qemu-project/qemu/-/jobs/3132270506 2. https://gitlab.com/qemu-project/qemu/-/jobs/3132270625 Maybe there is an issue with the "tests/docker: update fedora-win[32|64]-cross with lcitool" commit (I haven't bisected)? Thanks, Stefa

Re: [PATCH v2 1/2] file-posix: add the tracking of the zones wp

2022-10-05 Thread Damien Le Moal
On 10/5/22 17:30, Sam Li wrote: > Damien Le Moal 于2022年10月5日周三 15:34写道: >> >> On 10/5/22 10:44, Damien Le Moal wrote: >>> On 9/29/22 18:31, Sam Li wrote: Since Linux doesn't have a user API to issue zone append operations to zoned devices from user space, the file-posix driver is modifie

Re: [Virtio-fs] virtiofsd: Any reason why there's not an "openat2" sandbox mode?

2022-10-05 Thread Vivek Goyal
On Mon, Oct 03, 2022 at 06:51:42PM -0400, Colin Walters wrote: > > > On Thu, Sep 29, 2022, at 1:03 PM, Vivek Goyal wrote: > > > > So rust version of virtiofsd, already supports running unprivileged > > (inside a user namespace). > > I know, but as I already said, the use case here is running in

Re: [PATCH v3 00/26] target/i386: pc-relative translation blocks

2022-10-05 Thread Richard Henderson
On 10/5/22 14:06, Paolo Bonzini wrote: Great, then if you want I can merge this myself. Yes, please. r~

Re: [PATCH v3] virtio-scsi: Send "REPORTED LUNS CHANGED" sense data upon disk hotplug events.

2022-10-05 Thread Paolo Bonzini
On 10/4/22 01:13, Venu Busireddy wrote: script? Something must be putting the SCSI command in the queue. Perhaps the driver is doing so when it sees an event? And if it is bypassing the normal submission mechanism, the REPORT LUNS commands is hidden in scsitrac; that in turn retruns a unit attent

Re: [PATCH v8 2/8] KVM: Extend the memslot to support fd-based private memory

2022-10-05 Thread Jarkko Sakkinen
On Wed, Oct 05, 2022 at 04:04:05PM +0300, Jarkko Sakkinen wrote: > On Thu, Sep 15, 2022 at 10:29:07PM +0800, Chao Peng wrote: > > In memory encryption usage, guest memory may be encrypted with special > > key and can be accessed only by the VM itself. We call such memory > > private memory. It's va

Re: [PATCH] coroutine: Drop coroutine_fn annotation from qemu_coroutine_self()

2022-10-05 Thread Paolo Bonzini
On 10/5/22 19:52, Alberto Faria wrote: qemu_coroutine_self() can be called from outside coroutine context, returning the leader coroutine, and several such invocations currently exist (mostly in qcow2 tracing calls). Signed-off-by: Alberto Faria --- include/qemu/coroutine.h | 2 +- 1 file ch

Re: [PULL 00/54] testing, gdbstub, plugin and gitdm updates

2022-10-05 Thread Paolo Bonzini
On 10/5/22 17:23, Alex Bennée wrote: Stefan Hajnoczi writes: On Tue, 4 Oct 2022 at 09:38, Alex Bennée wrote: The following changes since commit efbf38d73e5dcc4d5f8b98c6e7a12be1f3b91745: Merge tag 'for-upstream' of git://repo.or.cz/qemu/kevin into staging (2022-10-03 15:06:07 -0400) a

[PATCH RFC] hw/cxl: type 3 devices can now present volatile or persistent memory

2022-10-05 Thread Gourry
Type 3 devices were hard-coded to always present as persistent memory devices. This patch adds the "is_pmem" attribute which can be used to instantiate a device as either a pmem or vmem. Right now it is only possible to choose one or the other, but future devices may present both (such as multi-lo

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

2022-10-05 Thread David Gibson
On Wed, Oct 05, 2022 at 03:38:09PM +0200, Laurent Vivier wrote: > 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.in

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

2022-10-05 Thread David Gibson
On Wed, Oct 05, 2022 at 12:08:27PM +0200, Laurent Vivier wrote: > On 9/28/22 07:55, David Gibson wrote: > > > +static int net_stream_server_init(NetClientState *peer, > > > + const char *model, > > > + const char *name, > > > +

Re: [PATCH 49/51] io/channel-watch: Fix socket watch on Windows

2022-10-05 Thread Bin Meng
Hi Paolo, On Wed, Sep 28, 2022 at 2:10 PM Bin Meng wrote: > > Hi Paolo, > > On Wed, Sep 21, 2022 at 9:02 AM Bin Meng wrote: > > > > On Wed, Sep 14, 2022 at 4:08 PM Bin Meng wrote: > > > > > > On Wed, Sep 7, 2022 at 1:07 PM Bin Meng wrote: > > > > > > > > Hi Clément, > > > > > > > > On Tue, Sep

[PATCH 00/24] accel/tcg: Rewrite user-only vma tracking

2022-10-05 Thread Richard Henderson
The primary motivator here are the numerous bug reports (e.g. #290) about not being able to handle very large memory allocations. I presume all or most of these are due to guest use of the clang address sanitizer, which allocates a massive shadow vma. This patch set copies the linux kernel code fo

[PATCH 02/24] accel/tcg: Make page_alloc_target_data allocation constant

2022-10-05 Thread Richard Henderson
Use a constant target data allocation size for all pages. This will be necessary to reduce overhead of page tracking. Since TARGET_PAGE_DATA_SIZE is now required, we can use this to omit data tracking for targets that don't require it. Signed-off-by: Richard Henderson --- include/exec/cpu-all.h

[PATCH 03/24] accel/tcg: Remove disabled debug in translate-all.c

2022-10-05 Thread Richard Henderson
These items printf, and could be replaced with proper tracepoints if we really cared. Signed-off-by: Richard Henderson --- accel/tcg/translate-all.c | 109 -- 1 file changed, 109 deletions(-) diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c

[PATCH 06/24] accel/tcg: Move assert_no_pages_locked to internal.h

2022-10-05 Thread Richard Henderson
There are no users outside of accel/tcg; this function does not need to be defined in exec-all.h. Signed-off-by: Richard Henderson --- accel/tcg/internal.h| 5 + include/exec/exec-all.h | 8 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/accel/tcg/internal.h b/ac

[PATCH 01/24] util: Add interval-tree.c

2022-10-05 Thread Richard Henderson
Copy and simplify the Linux kernel's interval_tree_generic.h, instantiating for uint64_t. Signed-off-by: Richard Henderson --- include/qemu/interval-tree.h| 99 tests/unit/test-interval-tree.c | 209 util/interval-tree.c| 881 tests

[PATCH 05/24] accel/tcg: Split out tb-maint.c

2022-10-05 Thread Richard Henderson
Move all of the TranslationBlock flushing and page linking code from translate-all.c to tb-maint.c. Signed-off-by: Richard Henderson --- accel/tcg/internal.h | 55 +++ accel/tcg/tb-maint.c | 735 accel/tcg/translate-all.c | 766 +---

  1   2   >