Re: [PATCH for-9.0 v2] vdpa-dev: Fix initialisation order to restore VDUSE compatibility

2024-03-15 Thread Stefano Garzarella
On Fri, Mar 15, 2024 at 03:03:31PM +0100, Kevin Wolf wrote: VDUSE requires that virtqueues are first enabled before the DRIVER_OK status flag is set; with the current API of the kernel module, it is impossible to enable the opposite order in our block export code because userspace is not notified

Re: [PATCH for-9.0 v3] vdpa-dev: Fix initialisation order to restore VDUSE compatibility

2024-03-15 Thread Stefano Garzarella
d, 45 insertions(+), 9 deletions(-) LGTM! Reviewed-by: Stefano Garzarella Thanks, Stefano diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c index e8e1661646..fd1a93701a 100644 --- a/hw/net/vhost_net.c +++ b/hw/net/vhost_net.c @@ -541,6 +541,16 @@ int vhost_set_vring_enable(NetClientState *nc

Re: [PATCH] vhost-vdpa: check vhost_vdpa_set_vring_ready() return value

2024-03-18 Thread Stefano Garzarella
On Mon, Mar 18, 2024 at 12:31:59PM +0800, Jason Wang wrote: On Fri, Mar 15, 2024 at 4:23 PM Stefano Garzarella wrote: On Thu, Mar 14, 2024 at 11:17:01AM +0800, Jason Wang wrote: >On Wed, Feb 7, 2024 at 5:27 PM Stefano Garzarella wrote: >> >> vhost_vdpa_set_vring_ready() cou

Re: [PATCH 0/9] Introduce support for IGVM files

2024-03-19 Thread Stefano Garzarella
Hi Roy, thanks for this series! On Tue, Feb 27, 2024 at 02:50:06PM +, Roy Hopkins wrote: Hi everyone, This initial patch series submission adds the capability to configure confidential guests using files that conform to the Independent Guest Virtual Machine (IGVM) file format. The series is

Re: [PATCH 2/9] backends/confidential-guest-support: Add IGVM file parameter

2024-03-19 Thread Stefano Garzarella
On Tue, Feb 27, 2024 at 02:50:08PM +, Roy Hopkins wrote: In order to add support for parsing IGVM files for secure virtual machines, a the path to an IGVM file needs to be specified as part of the guest configuration. It makes sense to add this to the ConfidentialGuestSupport object as this i

Re: [PATCH] vhost-vdpa: check vhost_vdpa_set_vring_ready() return value

2024-03-20 Thread Stefano Garzarella
On Wed, Mar 20, 2024 at 12:18:14PM +0800, Jason Wang wrote: On Mon, Mar 18, 2024 at 4:27 PM Stefano Garzarella wrote: On Mon, Mar 18, 2024 at 12:31:59PM +0800, Jason Wang wrote: >On Fri, Mar 15, 2024 at 4:23 PM Stefano Garzarella wrote: >> >> On Thu, Mar 14, 2024 at 11:17:01

Re: Hermetic virtio-vsock in QEMU

2024-05-07 Thread Stefano Garzarella
Hi, sorry for the delay, but I have been away most of last month. On Thu, Apr 18, 2024 at 10:34:43AM GMT, Daniel P. Berrangé wrote: On Wed, Apr 17, 2024 at 12:31:41PM -0700, Roman Kiryanov wrote: Hi Daniel, thank you for looking into this. I checked how VHOST_USER_VSOCK and it refers to the vh

[PATCH v4 00/12] vhost-user: support any POSIX system (tested on macOS, FreeBSD, OpenBSD)

2024-05-08 Thread Stefano Garzarella
hm,size="512M" \ -device vhost-user-blk-pci,num-queues=1,chardev=char0 \ -chardev socket,id=char0,path=/tmp/vhost.socket Branch pushed (and CI started) at https://gitlab.com/sgarzarella/qemu/-/tree/macos-vhost-user?ref_type=heads Thanks, Stefano Stefano Garzarella (12): libvhost-us

[PATCH v4 02/12] libvhost-user: fail vu_message_write() if sendmsg() is failing

2024-05-08 Thread Stefano Garzarella
to wrong parameters, but the frontend still sent the payload which the backend incorrectly interpreted as a wrong header. Signed-off-by: Stefano Garzarella --- subprojects/libvhost-user/libvhost-user.c | 5 + 1 file changed, 5 insertions(+) diff --git a/subprojects/libvhost-user/libvhost

[PATCH v4 08/12] libvhost-user: enable it on any POSIX system

2024-05-08 Thread Stefano Garzarella
es from include/qemu/memfd.h to make the code works on FreeBSD where MFD_ALLOW_SEALING is defined - define MAP_NORESERVE if it's not defined (e.g. on FreeBSD) Signed-off-by: Stefano Garzarella --- meson.build | 2 +- subprojects/libvhost-user/libvhost-user.h

[PATCH v4 09/12] contrib/vhost-user-blk: enable it on any POSIX system

2024-05-08 Thread Stefano Garzarella
Let's make the code more portable by adding defines from block/file-posix.c to support O_DIRECT in other systems (e.g. macOS). vhost-user-server.c is a dependency, let's enable it for any POSIX system. Signed-off-by: Stefano Garzarella --- v4: - moved using of "qemu/bswap.h&quo

[PATCH v4 10/12] hostmem: add a new memory backend based on POSIX shm_open()

2024-05-08 Thread Stefano Garzarella
anonymous memory such as memfd. Acked-by: David Hildenbrand Signed-off-by: Stefano Garzarella --- v4 - fail if we find "share=off" in shm_backend_memory_alloc() [David] v3 - enriched commit message and documentation to highlight that we want to mimic memfd (David) --- docs/system/dev

[PATCH v4 06/12] contrib/vhost-user-*: use QEMU bswap helper functions

2024-05-08 Thread Stefano Garzarella
Let's replace the calls to le*toh() and htole*() with qemu/bswap.h helpers to make the code more portable. Suggested-by: Philippe Mathieu-Daudé Signed-off-by: Stefano Garzarella --- contrib/vhost-user-blk/vhost-user-blk.c | 9 + contrib/vhost-user-input/main.c

[PATCH v4 07/12] vhost-user: enable frontends on any POSIX system

2024-05-08 Thread Stefano Garzarella
The vhost-user protocol is not really Linux-specific so let's enable vhost-user frontends for any POSIX system. In vhost_net.c we use VHOST_FILE_UNBIND which is defined in a Linux specific header, let's define it for other systems as well. Signed-off-by: Stefano Garzarella --- m

[PATCH v4 12/12] tests/qtest/vhost-user-test: add a test case for memory-backend-shm

2024-05-08 Thread Stefano Garzarella
`memory-backend-shm` can be used with vhost-user devices, so let's add a new test case for it. Signed-off-by: Stefano Garzarella --- tests/qtest/vhost-user-test.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/tests/qtest/vhost-user-test.c b/tests/qtest/vhost

[PATCH v4 03/12] libvhost-user: mask F_INFLIGHT_SHMFD if memfd is not supported

2024-05-08 Thread Stefano Garzarella
end is not able to properly handle these messages. Signed-off-by: Stefano Garzarella --- subprojects/libvhost-user/libvhost-user.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/subprojects/libvhost-user/libvhost-user.c b/subprojects/libvhost-user/libvhost-user.c index

[PATCH v4 01/12] libvhost-user: set msg.msg_control to NULL when it is empty

2024-05-08 Thread Stefano Garzarella
On some OS (e.g. macOS) sendmsg() returns -1 (errno EINVAL) if the `struct msghdr` has the field `msg_controllen` set to 0, but `msg_control` is not NULL. Reviewed-by: Eric Blake Reviewed-by: David Hildenbrand Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Stefano Garzarella

[PATCH v4 04/12] vhost-user-server: do not set memory fd non-blocking

2024-05-08 Thread Stefano Garzarella
l (e.g. in macOS setting an fd returned by shm_open() non-blocking fails with errno = ENOTTY). So, let's avoid setting fd non-blocking for those messages that we know carry memory fd (e.g. VHOST_USER_ADD_MEM_REG, VHOST_USER_SET_MEM_TABLE). Signed-off-by: Stefano Garzarella --- v3: - avoiding

[PATCH v4 11/12] tests/qtest/vhost-user-blk-test: use memory-backend-shm

2024-05-08 Thread Stefano Garzarella
`memory-backend-memfd` is available only on Linux while the new `memory-backend-shm` can be used on any POSIX-compliant operating system. Let's use it so we can run the test in multiple environments. Signed-off-by: Stefano Garzarella --- tests/qtest/vhost-user-blk-test.c | 2 +- 1 file ch

[PATCH v4 05/12] contrib/vhost-user-blk: fix bind() using the right size of the address

2024-05-08 Thread Stefano Garzarella
(struct sockaddr_un). So let's follow the last advice and simplify the code as well. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Stefano Garzarella --- contrib/vhost-user-blk/vhost-user-blk.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/contrib/vhost-user-blk/

Re: Hermetic virtio-vsock in QEMU

2024-05-08 Thread Stefano Garzarella
Hi Roman, On Tue, May 07, 2024 at 11:20:50PM GMT, Roman Kiryanov wrote: Hi Stefano, On Tue, May 7, 2024 at 1:10 AM Stefano Garzarella wrote: I have no experience with Windows, but what we need for vhost-user is: - AF_UNIX and be able to send file descriptors using ancillary data (i.e

Re: [PATCH v4 01/12] libvhost-user: set msg.msg_control to NULL when it is empty

2024-05-08 Thread Stefano Garzarella
On Wed, May 08, 2024 at 09:57:13AM GMT, Daniel P. Berrangé wrote: On Wed, May 08, 2024 at 09:44:45AM +0200, Stefano Garzarella wrote: On some OS (e.g. macOS) sendmsg() returns -1 (errno EINVAL) if the `struct msghdr` has the field `msg_controllen` set to 0, but `msg_control` is not NULL

Re: Hermetic virtio-vsock in QEMU

2024-05-08 Thread Stefano Garzarella
On Wed, May 08, 2024 at 01:13:09PM GMT, Marc-André Lureau wrote: Hi On Wed, May 8, 2024 at 11:50 AM Stefano Garzarella wrote: Hi Roman, On Tue, May 07, 2024 at 11:20:50PM GMT, Roman Kiryanov wrote: >Hi Stefano, > >On Tue, May 7, 2024 at 1:10 AM Stefano Garzarella wrote: >

Re: [PATCH v4 03/12] libvhost-user: mask F_INFLIGHT_SHMFD if memfd is not supported

2024-05-10 Thread Stefano Garzarella
On Wed, May 08, 2024 at 12:39:33PM GMT, Philippe Mathieu-Daudé wrote: On 8/5/24 09:44, Stefano Garzarella wrote: libvhost-user will panic when receiving VHOST_USER_GET_INFLIGHT_FD message if MFD_ALLOW_SEALING is not defined, since it's not able to create a memfd. VHOST_USER_GET_INFLIGHT_

Re: [PATCH v4 08/12] libvhost-user: enable it on any POSIX system

2024-05-10 Thread Stefano Garzarella
On Wed, May 08, 2024 at 12:36:30PM GMT, Philippe Mathieu-Daudé wrote: On 8/5/24 09:44, Stefano Garzarella wrote: The vhost-user protocol is not really Linux-specific so let's enable libvhost-user for any POSIX system. Compiling it on macOS and FreeBSD some problems came up: - avoid to in

Re: [PATCH v4 09/12] contrib/vhost-user-blk: enable it on any POSIX system

2024-05-10 Thread Stefano Garzarella
On Wed, May 08, 2024 at 12:32:08PM GMT, Philippe Mathieu-Daudé wrote: On 8/5/24 09:44, Stefano Garzarella wrote: Let's make the code more portable by adding defines from block/file-posix.c to support O_DIRECT in other systems (e.g. macOS). vhost-user-server.c is a dependency, let's

Re: [PATCH v4 10/12] hostmem: add a new memory backend based on POSIX shm_open()

2024-05-10 Thread Stefano Garzarella
On Wed, May 08, 2024 at 01:59:33PM GMT, Markus Armbruster wrote: Stefano Garzarella writes: shm_open() creates and opens a new POSIX shared memory object. A POSIX shared memory object allows creating memory backend with an associated file descriptor that can be shared with external processes

[Qemu-devel] [Bug 1826393] Re: QEMU 3.1.0 stuck waiting for 800ms (5 times slower) in pre-bios phase

2019-05-02 Thread Stefano Garzarella
Oh sorry, you're using the 'pc' machine, so please try this bios: https://github.com/qemu/qemu/blob/v4.0.0/pc-bios/bios.bin -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1826393 Title: QEMU 3.1.0 s

Re: [Qemu-devel] [PATCH v5 2/3] block/io: bdrv_pdiscard: support int64_t bytes parameter

2019-05-02 Thread Stefano Garzarella
On Tue, Apr 30, 2019 at 10:41:02AM -0500, Eric Blake wrote: > On 4/30/19 6:09 AM, Kevin Wolf wrote: > > Am 30.04.2019 um 12:03 hat Vladimir Sementsov-Ogievskiy geschrieben: > >> 30.04.2019 12:24, Stefano Garzarella wrote: > >>> On Tue, Apr 23, 2019 at 03:57:05PM +0300

Re: [Qemu-devel] [PATCH v2] sockets: avoid string truncation warnings when copying UNIX path

2019-05-02 Thread Stefano Garzarella
string length when we first check > it, then we can simply use memcpy instead of strcpy later, avoiding > the gcc truncation warnings. > > Signed-off-by: Daniel P. Berrangé > --- > util/qemu-sockets.c | 12 ++++ > 1 file changed, 8 insertions(+), 4 deletions(-) Reviewed-by: Stefano Garzarella

Re: [Qemu-devel] [Qemu-block] [PATCH] tests/qemu-iotests: Fix more reference output files due to recent qemu-io change

2019-05-02 Thread Stefano Garzarella
missing. > > Fixes: 99e98d7c9fc1a1639fad ("qemu-io: Use error_[gs]et_progname()") > Signed-off-by: Thomas Huth > --- > tests/qemu-iotests/059.out | 8 > tests/qemu-iotests/092.out | 24 > 2 files changed, 16 insertions(+), 16 deleti

Re: [Qemu-devel] [PATCH v2] security.rst: add Security Guide to developer docs

2019-05-03 Thread Stefano Garzarella
/index.rst| 1 + > docs/devel/security.rst | 225 > 2 files changed, 226 insertions(+) > create mode 100644 docs/devel/security.rst > Very useful docs! Acked-by: Stefano Garzarella Thanks, Stefano

[Qemu-devel] [PATCH] block/rbd: implement .bdrv_get_allocated_file_size callback

2019-05-03 Thread Stefano Garzarella
This patch allows 'qemu-img info' to show the 'disk size' for rbd images. We use the rbd_diff_iterate2() API to calculate the allocated size for the image. Signed-off-by: Stefano Garzarella --- block/rbd.c | 33 + 1 file changed, 33 inserti

Re: [Qemu-devel] [PATCH] block/rbd: implement .bdrv_get_allocated_file_size callback

2019-05-03 Thread Stefano Garzarella
On Fri, May 03, 2019 at 07:55:01AM -0400, Jason Dillaman wrote: > On Fri, May 3, 2019 at 7:02 AM Stefano Garzarella wrote: > > > > This patch allows 'qemu-img info' to show the 'disk size' for > > rbd images. We use the rbd_diff_iterate2() API to calcu

[Qemu-devel] [PATCH v2] block/rbd: increase dynamically the image size

2019-05-03 Thread Stefano Garzarella
RBD APIs don't allow us to write more than the size set with rbd_create() or rbd_resize(). In order to support growing images (eg. qcow2), we resize the image before write operations that exceed the current size. Signed-off-by: Stefano Garzarella --- v2: - use bs->total_sectors in

[Qemu-devel] [PATCH] net: avoid to use variable length array in net_client_init()

2019-05-03 Thread Stefano Garzarella
RLEN. Signed-off-by: Stefano Garzarella --- net/net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/net.c b/net/net.c index f3a3c5444c..2e5f27e121 100644 --- a/net/net.c +++ b/net/net.c @@ -1118,7 +1118,7 @@ static int net_client_init(QemuOpts *opts, bool is_netdev, Error **

Re: [Qemu-devel] [Qemu-block] [QEMU PATCH] MAINTAINERS: Downgrade status of block sections without "M:" to "Odd Fixes"

2019-05-06 Thread Stefano Garzarella
Hi Thomas, On Mon, May 06, 2019 at 08:18:54AM +0200, Thomas Huth wrote: > Fixes might still get picked up via the qemu-block mailing list, > so the status is not "Orphan" yet. > Also add the gluster mailing list as suggested by Niels here: > > https://patchwork.kernel.org/patch/10613297/#2240994

Re: [Qemu-devel] [PATCH v2] block/rbd: increase dynamically the image size

2019-05-06 Thread Stefano Garzarella
On Fri, May 03, 2019 at 01:21:23PM -0400, Jason Dillaman wrote: > On Fri, May 3, 2019 at 12:30 PM Stefano Garzarella > wrote: > > > > RBD APIs don't allow us to write more than the size set with > > rbd_create() or rbd_resize(). > > In order to support growin

[Qemu-devel] [PATCH v2] block/rbd: add preallocation support

2019-05-06 Thread Stefano Garzarella
This patch adds the support of preallocation (off/full) for the RBD block driver. If available, we use rbd_writesame() to quickly fill the image when full preallocation is required. Signed-off-by: Stefano Garzarella --- v2: - Use 4 KiB buffer for rbd_writesame() [Jason] - Use

Re: [Qemu-devel] [PATCH] net: avoid to use variable length array in net_client_init()

2019-05-06 Thread Stefano Garzarella
On Mon, May 06, 2019 at 03:23:08PM +0200, Markus Armbruster wrote: > Stefano Garzarella writes: > > > net_client_init() uses a variable length array to store the prefix > > of 'ipv6-net' parameter (e.g. if ipv6-net=fec0::0/64, the prefix > > is 'fec0::0

Re: [Qemu-devel] [PATCH] net: avoid to use variable length array in net_client_init()

2019-05-07 Thread Stefano Garzarella
On Mon, May 06, 2019 at 12:54:20PM -0500, Eric Blake wrote: > On 5/3/19 12:06 PM, Stefano Garzarella wrote: > > net_client_init() uses a variable length array to store the prefix > > of 'ipv6-net' parameter (e.g. if ipv6-net=fec0::0/64, the prefix > > is 'fec0

Re: [Qemu-devel] Use of PreallocMode in block drivers (was: [PATCH] block/rbd: add preallocation support)

2019-05-07 Thread Stefano Garzarella
On Tue, May 07, 2019 at 08:34:51AM +0200, Markus Armbruster wrote: > Cc: Peter for a libvirt perspective. > > Stefano Garzarella writes: > > > This patch adds the support of preallocation (off/full) for the RBD > > block driver. > > If available, we use rbd_writesa

Re: [Qemu-devel] [PATCH v2] block/rbd: increase dynamically the image size

2019-05-08 Thread Stefano Garzarella
On Tue, May 07, 2019 at 11:43:50AM +0200, Kevin Wolf wrote: > Am 06.05.2019 um 11:50 hat Stefano Garzarella geschrieben: > > On Fri, May 03, 2019 at 01:21:23PM -0400, Jason Dillaman wrote: > > > On Fri, May 3, 2019 at 12:30 PM Stefano Garzarella > > > wrote: > >

[Qemu-devel] [PATCH] qemu-img: Use IEC binary prefixes for size constants

2019-05-08 Thread Stefano Garzarella
Using IEC binary prefixes in order to make the code more readable. Signed-off-by: Stefano Garzarella --- qemu-img.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index e6ad5978e0..71c92f142a 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -37,6

Re: [Qemu-devel] Use of PreallocMode in block drivers

2019-05-09 Thread Stefano Garzarella
On Wed, May 08, 2019 at 01:44:27PM +0200, Markus Armbruster wrote: > Stefano Garzarella writes: > > > On Tue, May 07, 2019 at 08:34:51AM +0200, Markus Armbruster wrote: > >> Cc: Peter for a libvirt perspective. > >> > >> Stefano Garzarella writes: >

[Qemu-devel] [PATCH v2 4/4] net: remove unused get_str_sep() function

2019-05-09 Thread Stefano Garzarella
Since the get_str_sep() function is no longer used in net/net.c, we can remove it. Signed-off-by: Stefano Garzarella --- net/net.c | 20 1 file changed, 20 deletions(-) diff --git a/net/net.c b/net/net.c index 570e093c4f..52496caca5 100644 --- a/net/net.c +++ b/net/net.c

[Qemu-devel] [PATCH v2 0/4] Clean ups in net/net.c

2019-05-09 Thread Stefano Garzarella
he qemu_opt_set() and qemu_opt_set_number(). I hope it's good for you. v2: - Added patches 1,3 and 4 - Patch 2: - clean up parsing of IPv6 prefix [Markus] - fixed subject line [Eric] [1] https://www.mail-archive.com/qemu-devel@nongnu.org/msg614561.html Stefano Garzarella (4):

[Qemu-devel] [PATCH v2 3/4] net: use g_strsplit() for parsing host address and port

2019-05-09 Thread Stefano Garzarella
Use the glib function to split host address and port in the parse_host_port() function. Suggested-by: Markus Armbruster Signed-off-by: Stefano Garzarella --- net/net.c | 43 +++ 1 file changed, 27 insertions(+), 16 deletions(-) diff --git a/net/net.c b

[Qemu-devel] [PATCH v2 1/4] net: fix assertion failure when ipv6-prefixlen is not a number

2019-05-09 Thread Stefano Garzarella
ed) This patch fixes it, jumping to the end of the function when 'ipv6-prefixlen' is not a number, and printing the more friendly message: $ qemu-system-x86_64 -net user,ipv6-net=feca::0/a qemu-system-x86_64: Parameter 'ipv6-prefixlen' expects a number Signed-off-by: Ste

[Qemu-devel] [PATCH v2 2/4] net: avoid using variable length array in net_client_init()

2019-05-09 Thread Stefano Garzarella
uggested-by: Markus Armbruster Signed-off-by: Stefano Garzarella --- net/net.c | 33 + 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/net/net.c b/net/net.c index d5071e49e2..932fa5abb5 100644 --- a/net/net.c +++ b/net/net.c @@ -1118,29 +1118,38 @@ stati

[Qemu-devel] [PATCH] net/slirp: fix the error message when the prefix len is invalid

2019-05-09 Thread Stefano Garzarella
Add a missing parentheses at the end of the error message, when we have an invalid prefix len. Signed-off-by: Stefano Garzarella --- net/slirp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/slirp.c b/net/slirp.c index 95934fb36d..0f4ae0abc0 100644 --- a/net/slirp.c

Re: [Qemu-devel] [PATCH v2] tests/Makefile: Remove unused test-obj-y variable

2019-05-09 Thread Stefano Garzarella
nformation that Paolo provided. > > tests/Makefile.include | 19 --- > 1 file changed, 19 deletions(-) Reviewed-by: Stefano Garzarella Thanks, Stefano

Re: [Qemu-devel] [PATCH] Fix typo on "info pic" monitor cmd output for xive

2019-05-09 Thread Stefano Garzarella
ff-by: Satheesh Rajendran > --- > hw/intc/spapr_xive.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > CCing qemu-trivial Reviewed-by: Stefano Garzarella Thanks, Stefano

[Qemu-devel] [PATCH v3] block/rbd: increase dynamically the image size

2019-05-09 Thread Stefano Garzarella
RBD APIs don't allow us to write more than the size set with rbd_create() or rbd_resize(). In order to support growing images (eg. qcow2), we resize the image before write operations that exceed the current size. Signed-off-by: Stefano Garzarella --- v3: - add 'image_size

Re: [Qemu-devel] [PATCH] net/slirp: fix the error message when the prefix len is invalid

2019-05-09 Thread Stefano Garzarella
On Thu, May 09, 2019 at 04:54:35PM +0200, Markus Armbruster wrote: > Stefano Garzarella writes: > > > Add a missing parentheses at the end of the error message, > > when we have an invalid prefix len. > > > > Signed-off-by: Stefano Garzarella > > --- > >

Re: [Qemu-devel] [PATCH] net/slirp: fix the error message when the prefix len is invalid

2019-05-10 Thread Stefano Garzarella
On Fri, May 10, 2019 at 07:56:47AM +0200, Markus Armbruster wrote: > Stefano Garzarella writes: > > > On Thu, May 09, 2019 at 04:54:35PM +0200, Markus Armbruster wrote: > >> Stefano Garzarella writes: > >> > >> > Add a missing parentheses at the end of

Re: [Qemu-devel] Use of PreallocMode in block drivers

2019-05-10 Thread Stefano Garzarella
On Thu, May 09, 2019 at 02:07:34PM +0200, Markus Armbruster wrote: > Stefano Garzarella writes: > > > On Wed, May 08, 2019 at 01:44:27PM +0200, Markus Armbruster wrote: > >> Stefano Garzarella writes: > >> > >> > On Tue, May 07, 2019 at 08:34:51AM

Re: [Qemu-devel] Use of PreallocMode in block drivers

2019-05-10 Thread Stefano Garzarella
On Thu, May 09, 2019 at 03:29:13PM +0200, Peter Krempa wrote: > On Thu, May 09, 2019 at 10:26:46 +0200, Stefano Garzarella wrote: > > On Wed, May 08, 2019 at 01:44:27PM +0200, Markus Armbruster wrote: > > > Stefano Garzarella writes: > > > > > > > On Tue, M

[Qemu-devel] [PATCH v2] block/rbd: implement .bdrv_get_allocated_file_size callback

2019-05-10 Thread Stefano Garzarella
This patch allows 'qemu-img info' to show the 'disk size' for the RBD images that have the fast-diff feature enabled. If this feature is enabled, we use the rbd_diff_iterate2() API to calculate the allocated size for the image. Signed-off-by: Stefano Garzarella --- v2: -

Re: [Qemu-devel] [Qemu-block] [PATCH] nbd/server: Nicer spelling of max BLOCK_STATUS reply length

2019-05-13 Thread Stefano Garzarella
> uint64_t handle, >uint32_t context_id, Error **errp) > { > int ret; > -unsigned int nb_extents = dont_fragment ? 1 : NBD_MAX_BITMAP_EXTENTS; > +unsigned int nb_extents = dont_fragment ? 1 : > NBD_MAX_BLOCK_STATUS_EXTENTS; > NBDExtent *extents = g_new(NBDExtent, nb_extents); > uint64_t final_length = length; With or without changing the comment: Reviewed-by: Stefano Garzarella

Re: [Qemu-devel] [PATCH] qcow2: Define and use QCOW2_COMPRESSED_SECTOR_SIZE

2019-05-13 Thread Stefano Garzarella
The patch LGTM, just a comment below. On Fri, May 10, 2019 at 07:22:54PM +0300, Alberto Garcia wrote: > When an L2 table entry points to a compressed cluster the space used > by the data is specified in 512-byte sectors. This size is independent > from BDRV_SECTOR_SIZE and is specific to the qcow2

Re: [Qemu-devel] [PATCH] qcow2: Define and use QCOW2_COMPRESSED_SECTOR_SIZE

2019-05-13 Thread Stefano Garzarella
On Mon, May 13, 2019 at 01:48:27PM +0200, Alberto Garcia wrote: > On Mon 13 May 2019 01:28:46 PM CEST, Stefano Garzarella wrote: > >> +int size = QCOW2_COMPRESSED_SECTOR_SIZE * > >> +(((l2_entry >> s->csize_shift) & s->csize_mask) +

Re: [Qemu-devel] [Qemu-block] [PATCH v7 0/9] discard blockstats

2019-06-06 Thread Stefano Garzarella
On Tue, Jun 04, 2019 at 04:53:23PM +, Anton Nefedov wrote: > On 3/6/2019 1:09 PM, Stefano Garzarella wrote: > > On Tue, May 14, 2019 at 12:10:40PM +, Anton Nefedov wrote: > >> hi, > >> > >> yet another take for this patch series; please kindly consider

Re: [Qemu-devel] Booting kernels with PVHVM documentation?

2019-03-11 Thread Stefano Garzarella
Hi Alex, sorry for the big delay, but I was traveling without my PC. On Wed, Mar 06, 2019 at 05:51:05PM +, Alex Bennée wrote: > > Hi, > > I've been looking at using PVH as an alternative to a long bios boot > sequence to boot some x86_64 test kernels for tests/tcg. I'm finding it > hard to p

Re: [Qemu-devel] [PATCH] qom: use object_new_with_type in object_new_with_propv

2019-03-12 Thread Stefano Garzarella
1 file changed, 1 insertion(+), 1 deletion(-) LGTM. Just a note for future patches: I think that info like "[make check test pass]" should go after the three dashes to avoid to store it in the commit message. Reviewed-by: Stefano Garzarella Thanks, Stefano

Re: [Qemu-devel] [PATCH] config-all-devices.mak: rebuild on reconfigure

2019-03-13 Thread Stefano Garzarella
+), 2 deletions(-) Reviewed-by: Stefano Garzarella

Re: [Qemu-devel] [PATCH for-4.0] maint: Ignore built elf2dmp

2019-03-14 Thread Stefano Garzarella
for 4.0, this patch may still make sense. > > .gitignore | 1 + > 1 file changed, 1 insertion(+) > Reviewed-by: Stefano Garzarella

Re: [Qemu-devel] [PATCH] qcow2: Fix data file error condition in qcow2_co_create()

2019-03-14 Thread Stefano Garzarella
w2.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Stefano Garzarella

Re: [Qemu-devel] [PATCH] configure: remove slirp submodule support that doesn't exist yet

2019-03-14 Thread Stefano Garzarella
, this change should be reverted only once slirp exists in > the .git-modules file. > > configure | 11 ++- > 1 file changed, 2 insertions(+), 9 deletions(-) Reviewed-by: Stefano Garzarella

[Qemu-devel] [PATCH for-4.0 2/2] tests/.gitignore: ignore test-qapi-emit-events.[ch] for in-tree builds

2019-03-14 Thread Stefano Garzarella
Commit 5d75648b56e generates 'tests/test-qapi-emit-events.[ch]' but did not ignore them for in-tree builds. Signed-off-by: Stefano Garzarella --- tests/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/.gitignore b/tests/.gitignore index c88f8f2537..f9c0170881 10

[Qemu-devel] [PATCH for-4.0 0/2] Update .gitignore and tests/.gitignore for in-tree builds

2019-03-14 Thread Stefano Garzarella
This series could be useless when we will no longer support in-tree builds, but for 4.0 I think it's useful to ignore these files. Stefano Garzarella (2): .gitignore: ignore docs/built created for in-tree builds tests/.gitignore: ignore test-qapi-emit-events.[ch] for in-tree b

[Qemu-devel] [PATCH for-4.0 1/2] .gitignore: ignore docs/built created for in-tree builds

2019-03-14 Thread Stefano Garzarella
Commit 1290e6711 creates 'docs/built' for in-tree builds of Sphinx manuals but did not ignore it. Signed-off-by: Stefano Garzarella --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 77522561b8..0adb17347f 100644 --- a/.gitignore +++ b/

Re: [PATCH] block/backup: drop dead code from backup_job_create

2019-10-18 Thread Stefano Garzarella
I don't know this code very well, but IIUC only block_job_add_bdrv() could fail after the job creation, but this shouldn't happen because "Required permissions are already taken by backup-top target", so it seems safe for me: Acked-by: Stefano Garzarella Thanks, Stefano &g

Re: [PATCH v2] Do not use %m in common code to print error messages

2019-10-18 Thread Stefano Garzarella
s > > hw/misc/tmp421.c | 4 ++-- > util/main-loop.c | 3 ++- > util/systemd.c | 4 ++-- > 3 files changed, 6 insertions(+), 5 deletions(-) There are many uses of %m also in hw/vfio/ but that's Linux stuff. Should we change those too or it doesn't matter since it never rea

Re: [PATCH v2] Do not use %m in common code to print error messages

2019-10-19 Thread Stefano Garzarella
On Fri, Oct 18, 2019 at 06:01:22PM +0200, Thomas Huth wrote: > On 18/10/2019 15.49, Kamil Rytarowski wrote: > > On 18.10.2019 15:42, Stefano Garzarella wrote: > >> On Fri, Oct 18, 2019 at 03:07:16PM +0200, Thomas Huth wrote: > >>> The %m format specifier is an e

Re: [PATCH] virtio: drop unused virtio_device_stop_ioeventfd() function

2019-10-22 Thread Stefano Garzarella
stopped implicitly by the virtio transport when > lifecycle events such as the VM pausing or device unplug occur. > > Cc: Paolo Bonzini > Signed-off-by: Stefan Hajnoczi > --- > include/hw/virtio/virtio.h | 1 - > hw/virtio/virtio.c | 8 > 2 files changed

Re: [PATCH RESEND 04/13] block/io_uring: Remove superfluous semicolon

2020-02-18 Thread Stefano Garzarella
On Tue, Feb 18, 2020 at 10:43:53AM +0100, Philippe Mathieu-Daudé wrote: > Fixes: 6663a0a3376 > Signed-off-by: Philippe Mathieu-Daudé > --- > Cc: Stefano Garzarella > --- > block/io_uring.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Stefano Garzare

Re: [PATCH] maint: Include top-level *.rst files early in git diff

2020-02-21 Thread Stefano Garzarella
ipts/git.orderfile b/scripts/git.orderfile > index 1f747b583a9e..abd8a67a2b4e 100644 > --- a/scripts/git.orderfile > +++ b/scripts/git.orderfile > @@ -11,6 +11,7 @@ > > # Documentation > docs/* > +*.rst > *.texi > > # build system Reviewed-by: Stefano Garzarella

Re: [PATCH v5 1/2] block/nbd: extract the common cleanup code

2019-12-05 Thread Stefano Garzarella
Hi Pan, On Thu, Dec 05, 2019 at 11:45:27AM +0800, pannengy...@huawei.com wrote: > From: Pan Nengyuan > > The BDRVNBDState cleanup code is common in two places, add > nbd_clear_bdrvstate() function to do these cleanups. > > Signed-off-by: Stefano Garzarella I only suggested

Re: [PATCH v5 2/2] block/nbd: fix memory leak in nbd_open()

2019-12-05 Thread Stefano Garzarella
d_open /mnt/sdb/qemu-4.2.0-rc0/block/nbd.c:1873 > > Fixes: 8f071c9db506e03ab > Reported-by: Euler Robot > Signed-off-by: Pan Nengyuan > Reviewed-by: Vladimir Sementsov-Ogievskiy > Cc: qemu-stable > Cc: Vladimir Sementsov-Ogievskiy > --- > Changes v2 to v1: > - add a

Re: [PATCH] virtio: update queue size on guest write

2019-12-16 Thread Stefano Garzarella
> 1 file changed, 2 insertions(+) Reviewed-by: Stefano Garzarella Just a question, should we do the same in virtio-mmio? Maybe doing virtio_queue_set_num() in any case (legacy and non-legacy) during VIRTIO_MMIO_QUEUE_NUM writing. Thanks, Stefano > > diff --git a/hw/virtio/virtio-pci.c b/

Re: [PATCH] block/nbd: fix memory leak in nbd_open()

2019-11-28 Thread Stefano Garzarella
On Thu, Nov 28, 2019 at 04:40:10PM +0800, pannengy...@huawei.com wrote: Hi, I don't know nbd code very well, the patch LGTM, but just a comment below: > From: PanNengyuan > > In currently implementation there will be a memory leak when > nbd_client_connect() returns error status. Here is an eas

Re: [PATCH] block/nbd: fix memory leak in nbd_open()

2019-11-28 Thread Stefano Garzarella
't have time, I can do it. Cheers, Stefano > > Thanks. > > On 2019/11/28 17:01, Stefano Garzarella wrote: > > On Thu, Nov 28, 2019 at 04:40:10PM +0800, pannengy...@huawei.com wrote: > > > > Hi, > > I don't know nbd code very well, the patc

Re: [PATCH V2] block/nbd: fix memory leak in nbd_open()

2019-11-28 Thread Stefano Garzarella
nbd_open /mnt/sdb/qemu-4.2.0-rc0/block/nbd.c:1873 > > Reported-by: Euler Robot > Signed-off-by: PanNengyuan > --- > Changes v2 to v1: > - add a new function to do the common cleanups (suggested by Stefano > Garzarella). > --- > block/nbd.c | 26 --

Re: [Qemu-devel] [PATCH v2 03/11] block: Add bdrv_has_zero_init_truncate()

2019-07-26 Thread Stefano Garzarella
On Fri, Jul 26, 2019 at 12:58:58PM +0200, Max Reitz wrote: > On 26.07.19 11:04, Stefano Garzarella wrote: > > On Wed, Jul 24, 2019 at 07:12:31PM +0200, Max Reitz wrote: > >> No .bdrv_has_zero_init() implementation returns 1 if growing the file > >> would add no

Re: [Qemu-devel] [PATCH v3] block/rbd: add preallocation support

2019-07-29 Thread Stefano Garzarella
On Fri, Jul 26, 2019 at 08:46:56AM -0400, Jason Dillaman wrote: > On Fri, Jul 26, 2019 at 4:48 AM Stefano Garzarella > wrote: > > > > On Thu, Jul 25, 2019 at 09:30:30AM -0400, Jason Dillaman wrote: > > > On Thu, Jul 25, 2019 at 4:13 AM Stefano Garzarella > >

Re: [Qemu-devel] [PATCH v2] ivshmem-server: Terminate also on SIGINT

2019-08-05 Thread Stefano Garzarella
t; +sigaction(SIGTERM, &sa_quit, 0) == -1 || > +sigaction(SIGINT, &sa_quit, 0) == -1) { > + perror("failed to add signal handler; sigaction"); > goto err; > } Reviewed-by: Stefano Garzarella Not related with this patch, but s

Re: [Qemu-devel] [PATCH] hw: net: cadence_gem: Fix build errors in DB_PRINT()

2019-08-06 Thread Stefano Garzarella
On Mon, Aug 05, 2019 at 08:52:54AM -0700, Bin Meng wrote: > When CADENCE_GEM_ERR_DEBUG is turned on, there are several > compilation errors in DB_PRINT(). Fix them. > > Signed-off-by: Bin Meng > --- > > hw/net/cadence_gem.c | 7 --- > 1 file changed, 4 insertions(+), 3 deletions(-) > > dif

Re: [Qemu-devel] Is network backend netmap worth keeping? (was: [PATCH v2 27/29] Include sysemu/sysemu.h a lot less)

2019-08-08 Thread Stefano Garzarella
On Thu, Aug 08, 2019 at 06:48:25AM +0200, Markus Armbruster wrote: > Please excuse the attention-grabbing subject. > > Philippe Mathieu-Daudé writes: > > > On 8/7/19 10:16 PM, Markus Armbruster wrote: > [...] > >> Can you tell me offhand what I have to install so configure enables > >> CONFIG_NE

Re: [Qemu-devel] [PATCH] scsi: lsi: exit infinite loop while executing script (CVE-2019-12068)

2019-08-08 Thread Stefano Garzarella
On Thu, Aug 08, 2019 at 12:03:40PM +0530, P J P wrote: > From: Prasad J Pandit > > When executing script in lsi_execute_script(), the LSI scsi > adapter emulator advances 's->dsp' index to read next opcode. > This can lead to an infinite loop if the next opcode is empty. > Exit such loop after re

Re: [RFC v2 06/13] vhost: delay set_vring_ready after DRIVER_OK

2023-01-13 Thread Stefano Garzarella
On Fri, Jan 13, 2023 at 09:19:00AM +0100, Eugenio Perez Martin wrote: On Fri, Jan 13, 2023 at 5:36 AM Jason Wang wrote: On Fri, Jan 13, 2023 at 1:25 AM Eugenio Pérez wrote: > > To restore the device at the destination of a live migration we send the > commands through control virtqueue. For a

Re: [RFC v2 06/13] vhost: delay set_vring_ready after DRIVER_OK

2023-01-13 Thread Stefano Garzarella
On Fri, Jan 13, 2023 at 11:03:17AM +0100, Eugenio Perez Martin wrote: On Fri, Jan 13, 2023 at 10:51 AM Stefano Garzarella wrote: On Fri, Jan 13, 2023 at 09:19:00AM +0100, Eugenio Perez Martin wrote: >On Fri, Jan 13, 2023 at 5:36 AM Jason Wang wrote: >> >> On Fri, Jan 13,

Re: [PATCH for 8.1 v2 1/6] vdpa: Remove status in reset tracing

2023-03-27 Thread Stefano Garzarella
: Stefano Garzarella diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c index bc6bad23d5..bbabea18f3 100644 --- a/hw/virtio/vhost-vdpa.c +++ b/hw/virtio/vhost-vdpa.c @@ -716,7 +716,7 @@ static int vhost_vdpa_reset_device(struct vhost_dev *dev) uint8_t status = 0; ret

Re: [PATCH for 8.1 v2 2/6] vdpa: add vhost_vdpa_reset_status_fd

2023-03-27 Thread Stefano Garzarella
ASID isolation. Signed-off-by: Eugenio Pérez --- include/hw/virtio/vhost-vdpa.h | 1 + hw/virtio/vhost-vdpa.c | 58 +++--- 2 files changed, 41 insertions(+), 18 deletions(-) Reviewed-by: Stefano Garzarella diff --git a/include/hw/virtio/vhost-vdpa.h b/include

Re: [PATCH for 8.1 v2 4/6] vdpa: return errno in vhost_vdpa_get_vring_group error

2023-03-27 Thread Stefano Garzarella
insertions(+) Reviewed-by: Stefano Garzarella diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c index 99904a0da7..4397c0d4b3 100644 --- a/net/vhost-vdpa.c +++ b/net/vhost-vdpa.c @@ -361,6 +361,14 @@ static NetClientInfo net_vhost_vdpa_info = { .check_peer_type = vhost_vdpa_check_peer_type

Re: [PATCH for 8.1 v2 5/6] vdpa: move CVQ isolation check to net_init_vhost_vdpa

2023-03-27 Thread Stefano Garzarella
On Thu, Mar 23, 2023 at 08:54:03PM +0100, Eugenio Pérez wrote: Evaluating it at start time instead of initialization time may make the guest capable of dynamically adding or removing migration blockers. Also, moving to initialization reduces the number of ioctls in the migration, reducing failur

Re: [PATCH 2/2] virtio-blk: support BLKSECDISCARD

2021-11-15 Thread Stefano Garzarella
On Mon, Nov 15, 2021 at 12:52:00PM +0800, yadong...@intel.com wrote: From: Yadong Qi Add new virtio feature: VIRTIO_BLK_F_SECDISCARD. Add new virtio command: VIRTIO_BLK_T_SECDISCARD. Has a proposal been sent out yet to virtio-comment mailing list for discussing these specification changes?

Re: [PATCH v1] virtio/vhost-vsock: don't double close vhostfd, remove redundant cleanup

2021-11-29 Thread Stefano Garzarella
Thanks for this patch. It LGTM: Reviewed-by: Stefano Garzarella

Re: [PATCH v2 0/2] block/blkio: add 'fd' option to virtio-blk-vhost-vdpa driver

2023-05-11 Thread Stefano Garzarella
On Wed, May 10, 2023 at 6:03 PM Jonathon Jongsma wrote: > > On 5/4/23 4:28 AM, Stefano Garzarella wrote: > > v2: > > - added patch 01 to use monitor_fd_param() in the blkio module > > - use monitor_fd_param() to parse the fd like vhost devices [Stefan] > > > &

[PATCH v3 1/1] block/blkio: use qemu_open() to support fd passing for virtio-blk

2023-05-11 Thread Stefano Garzarella
ed with certain privileges. If the libblkio virtio-blk driver supports fd passing, let's always use qemu_open() to open the `path`, so we can handle fd passing from the management layer through the "/dev/fdset/N" special path. Signed-off-by: Stefano Garzarella --- Notes: v3:

<    1   2   3   4   5   6   7   8   9   10   >