Re: [Qemu-devel] [PATCH v6 1/4] block: Add zoned device model property

2019-09-06 Thread Stefano Garzarella
On Fri, Sep 06, 2019 at 04:17:12PM +, Dmitry Fomichev wrote: > On Fri, 2019-09-06 at 10:11 +0200, Stefano Garzarella wrote: > > On Wed, Sep 04, 2019 at 05:00:57PM -0400, Dmitry Fomichev wrote: > > > This commit adds Zoned Device Model (as defined in T10 ZBC and > > &

Re: [Qemu-devel] [PATCH v7 1/4] block: Add zoned device model property

2019-09-09 Thread Stefano Garzarella
files changed, 53 insertions(+), 13 deletions(-) > Acked-by: Stefano Garzarella

Re: [Qemu-devel] [PATCH v2 1/2] linux-user: remove useless variable

2019-09-09 Thread Stefano Garzarella
in syscall.c. > > Fixes: d088d664f201 ("linux-user: identify running binary in /proc/self/exe") > Signed-off-by: Laurent Vivier > --- > linux-user/main.c | 10 -- > 1 file changed, 4 insertions(+), 6 deletions(-) Reviewed-by: Stefano Garzarella

[Qemu-devel] [PATCH] elf-ops.h: fix int overflow in load_elf()

2019-09-10 Thread Stefano Garzarella
This patch fixes a possible integer overflow when we calculate the total size of ELF segments loaded. Reported-by: Coverity (CID 1405299) Signed-off-by: Stefano Garzarella --- Now we are limited to INT_MAX, should load_elf() returns ssize_t to support bigger ELFs? --- include/hw/elf_ops.h | 6

Re: [Qemu-devel] [Qemu-block] [PATCH] qemu-io: Don't leak pattern file in error path

2019-09-10 Thread Stefano Garzarella
int, but let's do it > anyway in case someone later adds a 'goto error' after closing the file. > > Coverity: CID 1405303 > Fixes: 4d731510d34f280ed45a6de621d016f67a49ea48 > Signed-off-by: Kevin Wolf > --- > qemu-io-cmds.c | 4 > 1 file changed, 4 insertions(+) Reviewed-by: Stefano Garzarella

Re: [Qemu-devel] [PATCH] util/qemu-sockets: fix keep_alive handling in inet_connect_saddr

2019-09-10 Thread Stefano Garzarella
Peter Maydell > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > util/qemu-sockets.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) Reviewed-by: Stefano Garzarella

Re: [Qemu-devel] [PATCH] elf-ops.h: fix int overflow in load_elf()

2019-09-10 Thread Stefano Garzarella
On Tue, Sep 10, 2019 at 10:37:28AM +0100, Peter Maydell wrote: > On Tue, 10 Sep 2019 at 10:08, Stefano Garzarella wrote: > > > > This patch fixes a possible integer overflow when we calculate > > the total size of ELF segments loaded. > > > > Reported-by: Coverit

Re: [Qemu-devel] [PATCH] elf-ops.h: fix int overflow in load_elf()

2019-09-10 Thread Stefano Garzarella
On Tue, Sep 10, 2019 at 10:54:25AM +0100, Peter Maydell wrote: > On Tue, 10 Sep 2019 at 10:50, Alex Bennée wrote: > > Seem sensible enough (although gah, I hate these glue bits). Would the > > large amount of goto fail logic be something that could be cleaned up > > with the automatic cleanup func

Re: [Qemu-devel] [PATCH] elf-ops.h: fix int overflow in load_elf()

2019-09-10 Thread Stefano Garzarella
On Tue, Sep 10, 2019 at 10:50:30AM +0100, Alex Bennée wrote: > > Stefano Garzarella writes: > > > This patch fixes a possible integer overflow when we calculate > > the total size of ELF segments loaded. > > > > Reported-by: Coverity (CID 1405299) >

[Qemu-devel] [PATCH v2] elf-ops.h: fix int overflow in load_elf()

2019-09-10 Thread Stefano Garzarella
This patch fixes a possible integer overflow when we calculate the total size of ELF segments loaded. Reported-by: Coverity (CID 1405299) Reviewed-by: Alex Bennée Signed-off-by: Stefano Garzarella --- v2: - not use error_report in load_elf() [Peter] - return ELF_LOAD_TOO_BIG - add Alex'

Re: [Qemu-devel] [PATCH v5 1/2] CODING_STYLE: specify the indent rule for multiline code

2019-03-01 Thread Stefano Garzarella
On Fri, Mar 01, 2019 at 10:01:46AM +0800, Wei Yang wrote: > We didn't specify the indent rule for multiline code here, which may > mislead users. And in current code, the code use various styles. > > Add this rule in CODING_STYLE to make sure this is clear to every one. > > Signed-off-by: Wei Yan

Re: [Qemu-devel] [PULL 13/76] pvh: Add x86/HVM direct boot ABI header file

2019-03-01 Thread Stefano Garzarella
is this likely to break > anybodies existing workflow? > > Are there any examples of the minimum setup for a directly booted i386 > kernel image anywhere? > > -- > Alex Bennée > -- Stefano Garzarella Software Engineer @ Red Hat

Re: [Qemu-devel] [PULL 13/76] pvh: Add x86/HVM direct boot ABI header file

2019-03-02 Thread Stefano Garzarella
On Fri, Mar 01, 2019 at 05:56:36PM +, Alex Bennée wrote: > > Stefano Garzarella writes: > > > On Fri, Mar 01, 2019 at 04:53:57PM +, Alex Bennée wrote: > >> > >> Paolo Bonzini writes: > >> > >> > From: Liam Merwick > >>

Re: [Qemu-devel] [PATCH v6 0/2] CODING_STYLE: trivial update

2019-03-04 Thread Stefano Garzarella
de > CODING_STYLE: indent example code as all others > > CODING_STYLE | 47 +++ > 1 file changed, 43 insertions(+), 4 deletions(-) Reviewed-by: Stefano Garzarella Thanks, Stefano

Re: [Qemu-devel] [PATCH] vhost-user-test: fix leaks

2019-03-06 Thread Stefano Garzarella
On Tue, Mar 05, 2019 at 11:51:35PM +0100, Marc-André Lureau wrote: > Spotted by ASAN. > > Signed-off-by: Marc-André Lureau > --- > tests/vhost-user-test.c | 3 +++ > 1 file changed, 3 insertions(+) Reviewed-by: Stefano Garzarella Thanks, Stefano

Re: [Qemu-devel] [PATCH v5 1/2] block/gluster: Handle changed glfs_ftruncate signature

2019-03-06 Thread Stefano Garzarella
if test "$glusterfs" = "yes" ; then >feature_not_found "GlusterFS backend support" \ > @@ -6885,6 +6899,10 @@ if test "$glusterfs_zerofill" = "yes" ; then >echo "CONFIG_GLUSTERFS_ZEROFILL=y" >> $config_host_mak > fi > > +if test "$glusterfs_ftruncate_has_stat" = "yes" ; then > + echo "CONFIG_GLUSTERFS_FTRUNCATE_HAS_STAT=y" >> $config_host_mak > +fi > + > if test "$libssh2" = "yes" ; then >echo "CONFIG_LIBSSH2=m" >> $config_host_mak >echo "LIBSSH2_CFLAGS=$libssh2_cflags" >> $config_host_mak > -- > 2.20.1 > > The patch LGTM. Reviewed-by: Stefano Garzarella Thanks, Stefano

Re: [Qemu-devel] [PATCH v2 2/2] gluster: the glfs_io_cbk callback function pointer adds pre/post stat args

2019-03-06 Thread Stefano Garzarella
On Tue, Mar 05, 2019 at 04:46:34PM +0100, Niels de Vos wrote: > The glfs_*_async() functions do a callback once finished. This callback > has changed its arguments, pre- and post-stat structures have been > added. This makes it possible to improve caching, which is useful for > Samba and NFS-Ganesh

Re: [Qemu-devel] [PATCH v3 0/6] virtio-blk: add DISCARD and WRITE_ZEROES features

2019-02-08 Thread Stefano Garzarella
On Fri, Feb 08, 2019 at 02:06:18PM +0800, Stefan Hajnoczi wrote: > On Wed, Feb 06, 2019 at 12:27:23PM +0100, Stefano Garzarella wrote: > > This series adds the support of DISCARD and WRITE_ZEROES commands > > and extends the virtio-blk-test to test WRITE_ZEROES command when >

[Qemu-devel] [PATCH v4 1/6] virtio-blk: add acct_failed param to virtio_blk_handle_rw_error()

2019-02-08 Thread Stefano Garzarella
We add acct_failed param in order to use virtio_blk_handle_rw_error() also when is not required to call block_acct_failed(). (eg. a discard operation is failed) Reviewed-by: Michael S. Tsirkin Reviewed-by: Stefan Hajnoczi Signed-off-by: Stefano Garzarella --- hw/block/virtio-blk.c | 10

[Qemu-devel] [PATCH v4 0/6] virtio-blk: add DISCARD and WRITE_ZEROES features

2019-02-08 Thread Stefano Garzarella
ynamic allocation (thanks Thomas) Thanks, Stefano Stefano Garzarella (6): virtio-blk: add acct_failed param to virtio_blk_handle_rw_error() virtio-blk: add host_features field in VirtIOBlock virtio-blk: add "discard" and "write-zeroes" properties virtio-blk: add DISCARD

[Qemu-devel] [PATCH v4 3/6] virtio-blk: add "discard" and "write-zeroes" properties

2019-02-08 Thread Stefano Garzarella
ult. [1] https://lists.gnu.org/archive/html/qemu-devel/2019-02/msg00504.html Suggested-by: Dr. David Alan Gilbert Reviewed-by: Michael S. Tsirkin Reviewed-by: Stefan Hajnoczi Signed-off-by: Stefano Garzarella --- hw/block/virtio-blk.c | 4 hw/core/machine.c | 2 ++ 2 files changed

[Qemu-devel] [PATCH v4 2/6] virtio-blk: add host_features field in VirtIOBlock

2019-02-08 Thread Stefano Garzarella
" and "scsi" property definition to use the new host_features field without change the behaviour. Suggested-by: Michael S. Tsirkin Reviewed-by: Stefan Hajnoczi Signed-off-by: Stefano Garzarella --- hw/block/virtio-blk.c | 16 +--- include/hw/virtio/virtio-blk

[Qemu-devel] [PATCH v4 4/6] virtio-blk: add DISCARD and WRITE_ZEROES features

2019-02-08 Thread Stefano Garzarella
applications to submit multiple segments in a single call. Reviewed-by: Michael S. Tsirkin Reviewed-by: Stefan Hajnoczi Signed-off-by: Stefano Garzarella --- hw/block/virtio-blk.c | 184 + include/hw/virtio/virtio-blk.h | 2 + 2 files changed, 186

[Qemu-devel] [PATCH v4 5/6] tests/virtio-blk: change assert on data_size in virtio_blk_request()

2019-02-08 Thread Stefano Garzarella
Signed-off-by: Stefano Garzarella --- tests/virtio-blk-test.c | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/tests/virtio-blk-test.c b/tests/virtio-blk-test.c index 04c608764b..0739498da7 100644 --- a/tests/virtio-blk-test.c +++ b/tests/virtio-blk-test.c

[Qemu-devel] [PATCH v4 6/6] tests/virtio-blk: add test for WRITE_ZEROES command

2019-02-08 Thread Stefano Garzarella
If the WRITE_ZEROES feature is enabled, we check this command in the test_basic(). Reviewed-by: Michael S. Tsirkin Reviewed-by: Stefan Hajnoczi Acked-by: Thomas Huth Signed-off-by: Stefano Garzarella --- tests/virtio-blk-test.c | 60 + 1 file changed

[Qemu-devel] [PATCH] virtio-blk: cleanup using VirtIOBlock *s and VirtIODevice *vdev

2019-02-08 Thread Stefano Garzarella
In several part we still using req->dev or VIRTIO_DEVICE(req->dev) when we have already defined s and vdev pointers: VirtIOBlock *s = req->dev; VirtIODevice *vdev = VIRTIO_DEVICE(s); Signed-off-by: Stefano Garzarella --- hw/block/virtio-blk.c | 22 +- 1 fil

Re: [Qemu-devel] [Qemu-block] [PULL 0/9] Block patches

2019-02-12 Thread Stefano Garzarella
On Tue, Feb 12, 2019 at 11:51:18AM +0800, Stefan Hajnoczi wrote: > On Mon, Feb 11, 2019 at 11:42:14AM +, Peter Maydell wrote: > > > > Hi; this fails to pass "make check" (all platforms): > > > > MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))} > > QTEST_QEMU_BINARY=arm-softmmu

Re: [Qemu-devel] [RFC PULL 0/6] Block sgarzare test patches

2019-02-12 Thread Stefano Garzarella
On Tue, Feb 12, 2019 at 6:04 PM Peter Maydell wrote: > > On Tue, 12 Feb 2019 at 14:12, Stefan Hajnoczi wrote: > > > > Block pull request for testing > > > > Peter hit a virtio-blk-test failure caused by the new DISCARD/WRITE_ZEROES

Re: [Qemu-devel] [PATCH v4] virtio-blk: set correct config size for the host driver

2019-02-13 Thread Stefano Garzarella
On Wed, Feb 13, 2019 at 04:01:43PM +0800, Stefan Hajnoczi wrote: > On Wed, Feb 13, 2019 at 09:48:57AM +0800, Changpeng Liu wrote: > > Commit caa1ee43 "vhost-user-blk: add discard/write zeroes features > > support" added fields to struct virtio_blk_config. This changes > > the size of the config spa

Re: [Qemu-devel] [PATCH v4 0/6] virtio-blk: add DISCARD and WRITE_ZEROES features

2019-02-13 Thread Stefano Garzarella
On Tue, Feb 12, 2019 at 09:19:13AM -0500, Michael S. Tsirkin wrote: > On Fri, Feb 08, 2019 at 02:49:44PM +0100, Stefano Garzarella wrote: > > This series adds the support of DISCARD and WRITE_ZEROES commands > > and extends the virtio-blk-test to test WRITE_ZEROES command when >

Re: [Qemu-devel] [PATCH] hw/dma/i8257: Use qemu_log_mask(UNIMP) instead of fprintf

2019-02-13 Thread Stefano Garzarella
ma: command df not supported > dma: command df not supported > > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/dma/i8257.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) Reviewed-by: Stefano Garzarella Thanks, Stefano

Re: [Qemu-devel] [PATCH v4] virtio-blk: set correct config size for the host driver

2019-02-13 Thread Stefano Garzarella
On Wed, Feb 13, 2019 at 09:32:27AM +0100, Stefano Garzarella wrote: > On Wed, Feb 13, 2019 at 04:01:43PM +0800, Stefan Hajnoczi wrote: > > On Wed, Feb 13, 2019 at 09:48:57AM +0800, Changpeng Liu wrote: > > > Commit caa1ee43 "vhost-user-blk: add discard/write zeroes featur

Re: [Qemu-devel] [PATCH v4] virtio-blk: set correct config size for the host driver

2019-02-13 Thread Stefano Garzarella
On Wed, Feb 13, 2019 at 6:07 PM Michael S. Tsirkin wrote: > On Wed, Feb 13, 2019 at 01:17:03PM +0100, Stefano Garzarella wrote: > > > > In my series "[PATCH v4 0/6] virtio-blk: add DISCARD and WRITE_ZEROES" > > I'm adding the host_features field in VirtIOBl

[Qemu-devel] [PATCH] hw/i386/pc: run the multiboot loader before the PVH loader

2019-02-14 Thread Stefano Garzarella
, we can try the PVH loader. Fixes: ab969087da6 ("pvh: Boot uncompressed kernel using direct boot ABI", 2019-01-15) Reported-by: Paolo Bonzini Signed-off-by: Stefano Garzarella --- hw/i386/pc.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/hw/i

Re: [Qemu-devel] [PATCH v2] hostmem: fix crash when querying empty host-nodes property via QMP

2019-02-15 Thread Stefano Garzarella
instead > local variable host_nodes and make explanation more hopefully > more clear. (Markus Armbruster ) > --- > backends/hostmem.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) Reviewed-by: Stefano Garzarella

[Qemu-devel] [PATCH v5 01/10] virtio-blk: add acct_failed param to virtio_blk_handle_rw_error()

2019-02-18 Thread Stefano Garzarella
We add acct_failed param in order to use virtio_blk_handle_rw_error() also when is not required to call block_acct_failed(). (eg. a discard operation is failed) Reviewed-by: Michael S. Tsirkin Reviewed-by: Stefan Hajnoczi Signed-off-by: Stefano Garzarella --- hw/block/virtio-blk.c | 10

[Qemu-devel] [PATCH v5 00/10] virtio-blk: add DISCARD and WRITE_ZEROES features

2019-02-18 Thread Stefano Garzarella
z_hdr variable instead of dynamic allocation (thanks Thomas) Thanks, Stefano Stefano Garzarella (10): virtio-blk: add acct_failed param to virtio_blk_handle_rw_error() virtio-blk: add host_features field in VirtIOBlock virtio-blk: add "discard" and "write-zeroes"

[Qemu-devel] [PATCH v5 02/10] virtio-blk: add host_features field in VirtIOBlock

2019-02-18 Thread Stefano Garzarella
" and "scsi" property definition to use the new host_features field without change the behaviour. Suggested-by: Michael S. Tsirkin Reviewed-by: Stefan Hajnoczi Reviewed-by: Michael S. Tsirkin Signed-off-by: Stefano Garzarella --- hw/block/virtio-blk.c | 16 +--

[Qemu-devel] [PATCH v5 07/10] tests/virtio-blk: change assert on data_size in virtio_blk_request()

2019-02-18 Thread Stefano Garzarella
Signed-off-by: Stefano Garzarella --- tests/virtio-blk-test.c | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/tests/virtio-blk-test.c b/tests/virtio-blk-test.c index 04c608764b..0739498da7 100644 --- a/tests/virtio-blk-test.c +++ b/tests/virtio-blk-test.c

[Qemu-devel] [PATCH v5 03/10] virtio-blk: add "discard" and "write-zeroes" properties

2019-02-18 Thread Stefano Garzarella
ult. [1] https://lists.gnu.org/archive/html/qemu-devel/2019-02/msg00504.html Suggested-by: Dr. David Alan Gilbert Reviewed-by: Michael S. Tsirkin Reviewed-by: Stefan Hajnoczi Signed-off-by: Stefano Garzarella --- hw/block/virtio-blk.c | 4 hw/core/machine.c | 2 ++ 2 files changed

[Qemu-devel] [PATCH v5 04/10] virtio-net: make VirtIOFeature usable for other virtio devices

2019-02-18 Thread Stefano Garzarella
. (as virtio_net_set_config_size() did) Suggested-by: Michael S. Tsirkin Signed-off-by: Stefano Garzarella --- hw/net/virtio-net.c| 31 +++ hw/virtio/virtio.c | 15 +++ include/hw/virtio/virtio.h | 15 +++ 3 files changed, 37

[Qemu-devel] [PATCH v5 06/10] virtio-blk: add DISCARD and WRITE_ZEROES features

2019-02-18 Thread Stefano Garzarella
applications to submit multiple segments in a single call. Reviewed-by: Michael S. Tsirkin Reviewed-by: Stefan Hajnoczi Signed-off-by: Stefano Garzarella --- hw/block/virtio-blk.c | 184 + include/hw/virtio/virtio-blk.h | 2 + 2 files changed, 186

[Qemu-devel] [PATCH v5 05/10] virtio-blk: set config size depending on the features enabled

2019-02-18 Thread Stefano Garzarella
Starting from DISABLE and WRITE_ZEROES features, we use an array of VirtIOFeature (as virtio-net) to properly set the config size depending on the features enabled. Signed-off-by: Stefano Garzarella --- hw/block/virtio-blk.c | 31 +-- include/hw/virtio

[Qemu-devel] [PATCH v5 08/10] tests/virtio-blk: add virtio_blk_fix_dwz_hdr() function

2019-02-18 Thread Stefano Garzarella
This function is useful to fix the endianness of struct virtio_blk_discard_write_zeroes headers. Signed-off-by: Stefano Garzarella --- tests/virtio-blk-test.c | 23 +-- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/tests/virtio-blk-test.c b/tests/virtio-blk

[Qemu-devel] [PATCH v5 10/10] tests/virtio-blk: add test for DISCARD command

2019-02-18 Thread Stefano Garzarella
If the DISCARD feature is enabled, we try this command in the test_basic(), checking only the status returned by the request. Signed-off-by: Stefano Garzarella --- tests/virtio-blk-test.c | 27 +++ 1 file changed, 27 insertions(+) diff --git a/tests/virtio-blk-test.c b

[Qemu-devel] [PATCH v5 09/10] tests/virtio-blk: add test for WRITE_ZEROES command

2019-02-18 Thread Stefano Garzarella
If the WRITE_ZEROES feature is enabled, we check this command in the test_basic(). Reviewed-by: Michael S. Tsirkin Reviewed-by: Stefan Hajnoczi Acked-by: Thomas Huth Signed-off-by: Stefano Garzarella --- tests/virtio-blk-test.c | 62 + 1 file changed

Re: [PATCH v6 03/10] hw/i386/pc: move shared x86 functions to x86.c and export them

2019-10-04 Thread Stefano Garzarella
1 + > 8 files changed, 724 insertions(+), 635 deletions(-) > create mode 100644 include/hw/i386/x86.h > create mode 100644 hw/i386/x86.c > As we discuessed, PVH functions in x86.c make sense to me: Reviewed-by: Stefano Garzarella Thanks, Stefano > diff --git a/include/

Re: [PATCH v6 08/10] roms: add microvm-bios (qboot) as binary and git submodule

2019-10-04 Thread Stefano Garzarella
os/bios-microvm.bin > new file mode 100755 Others rom have 644 permissions, should we be aligned or doesn't matter? Anyway this patch LGTM: Reviewed-by: Stefano Garzarella

Re: [PATCH v6 02/10] hw/i386/pc: rename functions shared with non-PC machines

2019-10-04 Thread Stefano Garzarella
86_system_rom_init > > Signed-off-by: Sergio Lopez > --- > include/hw/i386/pc.h | 2 +- > hw/i386/pc.c | 28 ++-- > hw/i386/pc_piix.c| 2 +- > hw/i386/pc_q35.c | 2 +- > hw/i386/pc_sysfw.c | 6 +++--- > 5 files changed

Re: [PATCH v6 03/10] hw/i386/pc: move shared x86 functions to x86.c and export them

2019-10-04 Thread Stefano Garzarella
On Fri, Oct 04, 2019 at 11:37:45AM +0200, Sergio Lopez wrote: > Move x86 functions that will be shared between PC and non-PC machine > types to x86.c, along with their helpers. > > Signed-off-by: Sergio Lopez > --- > include/hw/i386/pc.h | 1 - > include/hw/i386/x86.h | 35 +++ > hw/i386/pc.

Re: [PATCH] Test netmap on FreeBSD

2019-10-08 Thread Stefano Garzarella
Hi Thomas, On Tue, Oct 8, 2019 at 10:49 AM Thomas Huth wrote: > > FreeBSD offers a package for "netmap", thus let's install it in our > FreeBSD tests to get some compile test coverage for net/netmap.c, too. > > Signed-off-by: Thomas Huth > --- > .cirrus.yml | 2 +- > tests/vm/freebsd | 3 +

Re: [Qemu-devel] [PATCH v2] Fix build error when VNC is configured out

2019-06-26 Thread Stefano Garzarella
by Philippe Mathieu-Daudé Should we move out this line from the commit message? (Maybe Dave can remove it when apply) > > Signed-off-by: Christophe de Dinechin > --- > monitor/hmp-cmds.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Stefano Garzarella

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

2019-06-27 Thread Stefano Garzarella
> On 5/10/19 11:33 AM, Stefano Garzarella wrote: > > 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

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

2019-06-28 Thread Stefano Garzarella
On Thu, Jun 27, 2019 at 03:43:04PM -0400, Jason Dillaman wrote: > On Thu, Jun 27, 2019 at 1:24 PM John Snow wrote: > > On 6/27/19 4:48 AM, Stefano Garzarella wrote: > > > On Wed, Jun 26, 2019 at 05:04:25PM -0400, John Snow wrote: > > >> It looks like this has hit a

Re: [Qemu-devel] [PATCH v2 4/4] hw/i386: Introduce the microvm machine type

2019-07-02 Thread Stefano Garzarella
On Mon, Jul 01, 2019 at 04:47:05PM +0200, Sergio Lopez wrote: > Microvm is a machine type inspired by both NEMU and Firecracker, and > constructed after the machine model implemented by the latter. > > It's main purpose is providing users a KVM-only machine type with fast > boot times, minimal att

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

2019-07-03 Thread Stefano Garzarella
On Tue, Jul 02, 2019 at 11:09:14AM -0400, Jason Dillaman wrote: > On Fri, Jun 28, 2019 at 4:59 AM Stefano Garzarella > wrote: > > > > On Thu, Jun 27, 2019 at 03:43:04PM -0400, Jason Dillaman wrote: > > > On Thu, Jun 27, 2019 at 1:24 PM John Snow wrote: > >

Re: [Qemu-devel] [PATCH] monitor: vnc: Fix compilation error if CONFIG_VNC is disable

2019-07-03 Thread Stefano Garzarella
On Tue, Jul 02, 2019 at 07:01:31PM +, Julio Montes wrote: > How to reproduce it? > === > > ``` > $ ./configure --disable-spice --disable-vte --disable-vnc \ > --disable-vnc-jpeg --disable-vnc-png --disable-vnc-sasl > $ make > ... > monitor/hmp-cmds.c: In function ‘hmp_change’: > monitor/hm

Re: [Qemu-devel] [libvirt] Call for volunteers: LWN.net articles about KVM Forum talks

2019-09-18 Thread Stefano Garzarella
On Tue, Sep 17, 2019 at 02:02:59PM +0100, Stefan Hajnoczi wrote: > Hi, > LWN.net is a popular open source news site that covers Linux and other > open source communities (Python, GNOME, Debian, etc). It has published > a few KVM articles in the past too. > > Let's raise awareness of QEMU, KVM, an

Re: [Qemu-devel] [libvirt] Call for volunteers: LWN.net articles about KVM Forum talks

2019-09-18 Thread Stefano Garzarella
On Wed, Sep 18, 2019 at 11:02:54AM +0100, Stefan Hajnoczi wrote: > On Wed, Sep 18, 2019 at 9:28 AM Stefano Garzarella > wrote: > > > > On Tue, Sep 17, 2019 at 02:02:59PM +0100, Stefan Hajnoczi wrote: > > I volunteer for "Libvirt: Never too Late to Learn New T

Re: [PATCH v2] target/i386: clean up comments over 80 chars per line

2019-09-20 Thread Stefano Garzarella
On Fri, Sep 20, 2019 at 01:31:36PM +0800, Tao Xu wrote: > Drop the duplicate definition of CPUID_7_0_ECX_VBMI. And add some > comments, clean up comments over 80 chars per line. > > There is an extra line in comment of CPUID_8000_0008_EBX_WBNOINVD, > remove the extra enter and spaces. Might it be

Re: [PATCH v3 1/2] target/i386: clean up comments over 80 chars per line

2019-09-23 Thread Stefano Garzarella
rget/i386/cpu.h | 164 ++ > 1 file changed, 107 insertions(+), 57 deletions(-) Acked-by: Stefano Garzarella > > diff --git a/target/i386/cpu.h b/target/i386/cpu.h > index 5f6e3a029a..fa4c4cad79 100644 > --- a/target/i386/cpu.h > +++ b/

Re: [PATCH v3 2/2] target/i386: drop the duplicated definition of cpuid AVX512_VBMI marco

2019-09-23 Thread Stefano Garzarella
On Mon, Sep 23, 2019 at 02:30:41PM +0800, Tao Xu wrote: > Drop the duplicated definition of cpuid AVX512_VBMI marco and rename it > as CPUID_7_0_ECX_AVX512_VBMI. > > Signed-off-by: Tao Xu > --- > target/i386/cpu.c | 4 ++-- > target/i386/cpu.h | 3 +-- > target/i386/hvf/x86_c

Re: [PATCH] hw/arm/boot: Use the IEC binary prefix definitions

2019-09-23 Thread Stefano Garzarella
(info->ram_size >= (1ULL << 32)) { > +if (info->ram_size >= 4 * GiB) { > error_report("RAM size must be less than 4GB to boot" > " Linux kernel using ATAGS (try passing a > device tree" > " using -dtb)"); With or without the new line fix: Acked-by: Stefano Garzarella Thanks, Stefano

Re: [PATCH] hw/arm/boot: Use the IEC binary prefix definitions

2019-09-23 Thread Stefano Garzarella
On Mon, Sep 23, 2019 at 10:43:12AM +0200, Philippe Mathieu-Daudé wrote: > On 9/23/19 10:29 AM, Stefano Garzarella wrote: > > On Sat, Sep 21, 2019 at 12:34:04PM +0200, Philippe Mathieu-Daudé wrote: > >> IEC binary prefixes ease code review: the unit is explicit. > >> &

Re: [PATCH 1/2] tests/tcg/multiarch: fix code style in function main of test-mmap.c

2019-11-11 Thread Stefano Garzarella
On Tue, Oct 15, 2019 at 11:13:49AM +0800, Wei Yang wrote: > This file uses quite a different code style and changing just one line > would leads to some awkward appearance. > > This is a preparation for the following replacement of > sysconf(_SC_PAGESIZE). > > BTW, to depress ERROR message from c

Re: [PATCH 2/2] core: replace sysconf(_SC_PAGESIZE) with qemu_real_host_page_size

2019-11-11 Thread Stefano Garzarella
main(int argc, char **argv) > if (argc > 1) { > qemu_strtoul(argv[1], NULL, 0, &pagesize); > } else { > - pagesize = sysconf(_SC_PAGESIZE); > +pagesize = qemu_real_host_page_size; > } > > /* Assume pagesize is a power of two. */ The patch LGTM: Reviewed-by: Stefano Garzarella Thanks, Stefano

Re: [PATCH qemu] scripts: Detect git worktrees for get_maintainer.pl --git

2019-11-12 Thread Stefano Garzarella
> Signed-off-by: Alexey Kardashevskiy > --- > scripts/get_maintainer.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > Tested-by: Stefano Garzarella Reviewed-by: Stefano Garzarella Thanks, Stefano > diff --git a/scripts/get_maintainer.pl b/scripts/get

Re: [PATCH] vfio: don't ignore return value of migrate_add_blocker

2019-11-15 Thread Stefano Garzarella
rror because the return value is > set but never used. This fixes CID 1407219. > > Fixes: f045a0104c8c ("vfio: unplug failover primary device before > migration") > Signed-off-by: Jens Freimann > --- > hw/vfio/pci.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Stefano Garzarella

Re: [Qemu-devel] [PATCH] qemu-file: Rework old qemu_fflush comment

2019-08-26 Thread Stefano Garzarella
lush all pending data. If data was only partially flushed, it > + * will set an error state. > */ > void qemu_fflush(QEMUFile *f) > { Reviewed-by: Stefano Garzarella

Re: [Qemu-devel] [PATCH] qmp: Fix memory leak in migrate_params_test_apply

2019-08-28 Thread Stefano Garzarella
it util/main-loop.c:517 > #21 0xdf67b5e7 in main_loop vl.c:1806 > #22 0xdf15d453 in main vl.c:4488 > > Cc: zhanghailiang > Signed-off-by: Ying Fang > --- > migration/migration.c | 2 ++ > 1 file changed, 2 insertions(+) LGTM: Acked-by: Stefano Garzarella Ju

Re: [Qemu-devel] [Qemu-block] [PATCH 0/2] block/file-posix: Reduce xfsctl() use

2019-08-28 Thread Stefano Garzarella
/file-posix: Reduce xfsctl() use" patch and the failure rate is ~30% on my system. With the patch applied the failure rate is 0% :-) Reviewed-by: Stefano Garzarella Tested-by: Stefano Garzarella Thanks, Stefano

Re: [Qemu-devel] [PATCH] MAINTAINERS: add Stefan Hajnoczi as vhost-vsock maintainer

2019-08-28 Thread Stefano Garzarella
++ > 1 file changed, 7 insertions(+) Reviewed-by: Stefano Garzarella

Re: [Qemu-devel] [Qemu-block] [PATCH 0/2] git.orderfile: Order Python/shell scripts before unordered files

2019-08-29 Thread Stefano Garzarella
; Philippe Mathieu-Daudé (2): > scripts/git.orderfile: Order Python files before unordered ones > scripts/git.orderfile: Order shell scripts before unordered files > > scripts/git.orderfile | 5 + > 1 file changed, 5 insertions(+) Reviewed-by: Stefano Garzarella Thanks, Stefano

Re: [PATCH] hw/audio: fix a memory leak in OPLCreate()

2019-10-24 Thread Stefano Garzarella
On Wed, Oct 23, 2019 at 05:53:40PM +0800, Jidong Xia wrote: > There is a memory leak in OPLCreate(),Should free allocated mem > before return. > > Signed-off-by: Jidong Xia > --- > hw/audio/fmopl.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/hw/audio/fmopl.c b/hw/audio/fmopl.c > in

Re: [PATCH] i386: Use g_autofree in a few places

2019-10-25 Thread Stefano Garzarella
t; The changes LGTM: Reviewed-by: Stefano Garzarella Thanks, Stefano

Re: [PATCH 1/4] tests: allow filtering crypto cipher benchmark tests

2019-10-25 Thread Stefano Garzarella
-cipher xts 512 > > Signed-off-by: Daniel P. Berrangé > --- > tests/benchmark-crypto-cipher.c | 13 - > 1 file changed, 12 insertions(+), 1 deletion(-) Reviewed-by: Stefano Garzarella > > diff --git a/tests/benchmark-crypto-cipher.c b/tests/benchmark-crypto-cip

Re: [PATCH 2/4] tests: benchmark crypto with fixed data size, not time period

2019-10-25 Thread Stefano Garzarella
nk_size; > -} while (g_test_timer_elapsed() < 5.0); > +remain -= chunk_size; > +} > + g_test_timer_elapsed(); > > -total /= MiB; > g_print("sha256: "); > -g_print("Testing chunk_size %zu bytes ", chunk_size); > -g_print("done: %.2f MB in %.2f secs: ", total, g_test_timer_last()); > -g_print("%.2f MB/sec\n", total / g_test_timer_last()); > +g_print("Hash %zu GB chunk size %zu bytes ", total / GiB, chunk_size); > +g_print("%.2f MB/sec ", (double)total / MiB / g_test_timer_last()); > > g_free(out); > g_free(in); Reviewed-by: Stefano Garzarella

Re: [PATCH 3/4] crypto: add support for gcrypt's native XTS impl

2019-10-25 Thread Stefano Garzarella
_cipher_setiv(QCryptoCipher *cipher, > return -1; > } > > +#ifdef CONFIG_QEMU_PRIVATE_XTS > if (ctx->iv) { > memcpy(ctx->iv, iv, niv); And maybe here... > } else { > +#endif > if (cipher->mode == QCRYPTO_CIPHER_MODE_CTR) { > err = gcry_cipher_setctr(ctx->handle, iv, niv); > if (err != 0) { > @@ -377,7 +409,9 @@ qcrypto_gcrypt_cipher_setiv(QCryptoCipher *cipher, > return -1; > } > } > +#ifdef CONFIG_QEMU_PRIVATE_XTS > } > +#endif > > return 0; > } > diff --git a/tests/Makefile.include b/tests/Makefile.include > index 3543451ed3..2e5b0d3604 100644 > --- a/tests/Makefile.include > +++ b/tests/Makefile.include > @@ -133,7 +133,7 @@ check-unit-y += tests/test-base64$(EXESUF) > check-unit-$(call land,$(CONFIG_BLOCK),$(if > $(CONFIG_NETTLE),y,$(CONFIG_GCRYPT))) += tests/test-crypto-pbkdf$(EXESUF) > check-unit-$(CONFIG_BLOCK) += tests/test-crypto-ivgen$(EXESUF) > check-unit-$(CONFIG_BLOCK) += tests/test-crypto-afsplit$(EXESUF) > -check-unit-$(CONFIG_BLOCK) += tests/test-crypto-xts$(EXESUF) > +check-unit-$(if $(CONFIG_BLOCK),$(CONFIG_QEMU_PRIVATE_XTS)) += > tests/test-crypto-xts$(EXESUF) > check-unit-$(CONFIG_BLOCK) += tests/test-crypto-block$(EXESUF) > check-unit-y += tests/test-logging$(EXESUF) > check-unit-$(call land,$(CONFIG_BLOCK),$(CONFIG_REPLICATION)) += > tests/test-replication$(EXESUF) Anyway the patch LGTM, but I don't know this code very well, then: Acked-by: Stefano Garzarella

Re: [PATCH 4/4] crypto: add support for nettle's native XTS impl

2019-10-25 Thread Stefano Garzarella
er_decrypt(QCryptoCipher *cipher, > break; > > case QCRYPTO_CIPHER_MODE_XTS: > +#ifdef CONFIG_QEMU_PRIVATE_XTS > xts_decrypt(ctx->ctx, ctx->ctx_tweak, > ctx->alg_encrypt_wrapper, ctx->alg_decrypt_wrapper, > ctx->iv, len, out, in); > +#else > +xts_decrypt_message(ctx->ctx, ctx->ctx_tweak, > +ctx->alg_encrypt_native, > +ctx->alg_decrypt_native, > +ctx->iv, len, out, in); > +#endif > break; > case QCRYPTO_CIPHER_MODE_CTR: > ctr_crypt(ctx->ctx, ctx->alg_encrypt_native, It seems clear to me: Reviewed-by: Stefano Garzarella

Re: [PATCH] Makefile: install bios-microvm like other binary blobs

2019-11-02 Thread Stefano Garzarella
"roms: add microvm-bios (qboot) as binary" > Signed-off-by: Bruce Rogers > [PMD: Reworded description] > Signed-off-by: Philippe Mathieu-Daudé > --- > Makefile | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) The patch LGTM: Reviewed-by: Stefano Garzarella T

Re: [PATCH for-5.0] aio-posix: signal-proof fdmon-io_uring

2020-04-08 Thread Stefano Garzarella
ned-off-by: Stefan Hajnoczi > --- > util/fdmon-io_uring.c | 10 -- > 1 file changed, 8 insertions(+), 2 deletions(-) The patch LGTM: Reviewed-by: Stefano Garzarella Not related to this patch, looking at block/io_uring.c, should we retry if the io_uring_submit() fails wit

Re: [PATCH for-5.0] aio-posix: signal-proof fdmon-io_uring

2020-04-09 Thread Stefano Garzarella
On Thu, Apr 09, 2020 at 03:57:09PM +0100, Stefan Hajnoczi wrote: > On Wed, Apr 08, 2020 at 12:06:03PM +0200, Stefano Garzarella wrote: > > On Wed, Apr 08, 2020 at 10:11:39AM +0100, Stefan Hajnoczi wrote: > > > The io_uring_enter(2) syscall returns with errno=EINTR when inte

Re: [PATCH v1 09/11] gdbstub: i386: Fix gdb_get_reg16() parameter to unbreak gdb

2020-04-10 Thread Stefano Garzarella
.mem_buf->len) Bail out! ERROR:qemu/gdbstub.c:1843:handle_read_all_regs: assertion failed: (len == gdbserver_state.mem_buf->len) Thanks to Philippe, I tried this patch and it solves my issue: Tested-by: Stefano Garzarella Thanks, Stefano

Re: [PATCH v1 09/11] gdbstub: i386: Fix gdb_get_reg16() parameter to unbreak gdb

2020-04-14 Thread Stefano Garzarella
On Sat, Apr 11, 2020 at 01:58:07PM +0100, Alex Bennée wrote: > > Stefano Garzarella writes: > > > On Thu, Apr 09, 2020 at 10:15:27PM +0100, Alex Bennée wrote: > >> From: Peter Xu > >> > >> We should only pass in gdb_get_reg16() with the GByteA

Re: [PATCH] block/nvme: Remove memory leak

2020-04-15 Thread Stefano Garzarella
On Tue, Apr 14, 2020 at 05:17:26PM +0200, Philippe Mathieu-Daudé wrote: > Fixes: bdd6a90a9 ("Add VFIO based NVMe driver") > Signed-off-by: Philippe Mathieu-Daudé > --- > block/nvme.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/block/nvme.c b/block/nvme.c > index 7b7c0cc5d6..9f3c7ab8

Re: [PATCH] aio-posix: fix io_uring with external events

2020-03-20 Thread Stefano Garzarella
ing sqes? */ > +if (!QSLIST_EMPTY_RCU(&ctx->submit_list)) { > +return true; > +} > + > +/* Are we falling back to fdmon-poll? */ > + return atomic_read(&ctx->external_disable_cnt); > } > > static const FDMonOps fdmon_io_uring_ops = { > -- > 2.24.1 > Reviewed-by: Stefano Garzarella

[PATCH 1/3] vhost-vsock: add vhost-vsock-common abstraction

2020-05-15 Thread Stefano Garzarella
This patch prepares the introduction of vhost-user-vsock, moving the common code usable for both vhost-vsock and vhost-user-vsock devices, in the new vhost-vsock-common parent class. While moving the code, fixed checkpatch warnings about block comments. Signed-off-by: Stefano Garzarella

[PATCH 0/3] virtio: add vhost-user-vsock device

2020-05-15 Thread Stefano Garzarella
Hypervisor. The application implements the Firecracker hybrid vsock (vsock over unix domain socket) [2] The vhost-user-vsock-pci device can be tested following these steps: # build vhost-user-vsock application git clone https://github.com/stefano-garzarella/cloud-hypervisor.git git

[PATCH 2/3] virtio: add vhost-user-vsock base device

2020-05-15 Thread Stefano Garzarella
This patch introduces a vhost-user device for vsock, using the vhost-vsock-common parent class. The vhost-user-vsock device can be used to implement the virtio-vsock device emulation in user-space. Signed-off-by: Stefano Garzarella --- configure| 3 + include/hw

[PATCH 3/3] virtio: add vhost-user-vsock-pci device

2020-05-15 Thread Stefano Garzarella
Add the PCI version of vhost-user-vsock Launch QEMU like this: qemu -chardev socket,path=/tmp/vm.vsock,id=chr0 \ -device vhost-user-vsock-pci,chardev=chr0 Signed-off-by: Stefano Garzarella --- hw/virtio/vhost-user-vsock-pci.c | 84 hw/virtio

Re: [PATCH v2 4/7] hw/elf_ops: Do not ignore write failures when loading ELF

2020-05-19 Thread Stefano Garzarella
tions(+), 3 deletions(-) Reviewed-by: Stefano Garzarella > > diff --git a/include/hw/elf_ops.h b/include/hw/elf_ops.h > index 398a4a2c85..6fdff3dced 100644 > --- a/include/hw/elf_ops.h > +++ b/include/hw/elf_ops.h > @@ -553,9 +553,14 @@ static int glue

Re: [PATCH] linux-user/mmap.c: fix integer underflow in target_mremap

2020-05-19 Thread Stefano Garzarella
Hi Jonathan, thanks for the patch! CCing Riku and Laurent. On Mon, May 18, 2020 at 12:13:41PM -0600, Jonathan Marler wrote: > Been a few more days. Not sure how often I should be pinging. If this is > too much to ping every few days let me know. Is not too much, but next time is better to CC t

[PATCH] io_uring: retry io_uring_submit() if it fails with errno=EINTR

2020-05-19 Thread Stefano Garzarella
io_uring_submit() when IORING_SETUP_IOPOLL is enabled. We shouldn't have this problem for now, but it's better to prevent it. [1] https://github.com/axboe/liburing/commit/344355ec6619de8f4e64584c9736530b5346e4f4 Signed-off-by: Stefano Garzarella --- block/io_uring.c | 2 +- 1 file

[PATCH] io_uring: use io_uring_cq_ready() to check for ready cqes

2020-05-19 Thread Stefano Garzarella
In qemu_luring_poll_cb() we are not using the cqe peeked from the CQ ring. We are using io_uring_peek_cqe() only to see if there are cqes ready, so we can replace it with io_uring_cq_ready(). Signed-off-by: Stefano Garzarella --- block/io_uring.c | 9 +++-- 1 file changed, 3 insertions

Re: [PATCH] io_uring: use io_uring_cq_ready() to check for ready cqes

2020-05-21 Thread Stefano Garzarella
On Thu, May 21, 2020 at 03:45:34PM +0100, Stefan Hajnoczi wrote: > On Tue, May 19, 2020 at 03:49:42PM +0200, Stefano Garzarella wrote: > > In qemu_luring_poll_cb() we are not using the cqe peeked from the > > CQ ring. We are using io_uring_peek_cqe() only to see if there > >

Re: [PATCH 0/3] virtio: add vhost-user-vsock device

2020-05-21 Thread Stefano Garzarella
On Thu, May 21, 2020 at 03:35:59PM +0100, Stefan Hajnoczi wrote: > On Fri, May 15, 2020 at 05:21:07PM +0200, Stefano Garzarella wrote: > > This series add vhost-user-vsock base device and its PCI version > > (vhost-user-vsock-pci). > > The vhost-user-vsock device can be

Re: [PATCH V2] virtio-pci: fix queue_enable write

2020-06-10 Thread Stefano Garzarella
On Wed, Jun 10, 2020 at 01:43:51PM +0800, Jason Wang wrote: > Spec said: The driver uses this to selectively prevent the device from > executing requests from this virtqueue. 1 - enabled; 0 - disabled. > > Though write 0 to queue_enable is forbidden by the spec, we should not > assume that the val

Re: [PATCH V2] virtio-pci: fix queue_enable write

2020-06-10 Thread Stefano Garzarella
On Wed, Jun 10, 2020 at 05:42:54AM -0400, Michael S. Tsirkin wrote: > On Wed, Jun 10, 2020 at 10:57:26AM +0200, Stefano Garzarella wrote: > > On Wed, Jun 10, 2020 at 01:43:51PM +0800, Jason Wang wrote: > > > Spec said: The driver uses this to selectively prevent the device fr

Re: [PATCH v2 0/4] virtio-pci: enable blk and scsi multi-queue by default

2020-01-27 Thread Stefano Garzarella
o bs=4k direct=1 rw=randread. > > Stefan Hajnoczi (4): > virtio-scsi: introduce a constant for fixed virtqueues > virtio-scsi: default num_queues to -smp N > virtio-blk: default num_queues to -smp N > vhost-user-blk: default num_queues to -smp N The series looks good to me: Reviewed-by: Stefano Garzarella Thanks, Stefano

Re: [PATCH 2/6] tests/boot_linux_console: add BIOS acceptance test

2020-01-30 Thread Stefano Garzarella
Hi Liam, On Mon, Jan 27, 2020 at 04:36:30PM +, Liam Merwick wrote: > Add tests to use qboot with the 'pc' and 'microvm' machine classes > by adding the '-bios' option via self.vm.add_args() before calling > do_test_x86_64_machine(). > > Signed-off-by: Liam Merwick > --- > tests/acceptance/b

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