Re: [Qemu-devel] [RFC v2 0/4] QEMU changes to do PVH boot

2019-01-10 Thread Stefano Garzarella
On Wed, Jan 09, 2019 at 01:18:12PM -0800, Maran Wilson wrote: > On 1/9/2019 11:53 AM, Boris Ostrovsky wrote: > > On 1/9/19 6:53 AM, Stefano Garzarella wrote: > > > Hi Liam, > > > > > > On Tue, Jan 8, 2019 at 3:47 PM Liam Merwick > > > wrote: > >

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

2024-07-05 Thread Stefano Garzarella
On Wed, Jul 03, 2024 at 06:49:30PM GMT, Michael S. Tsirkin wrote: On Tue, Jun 18, 2024 at 12:00:30PM +0200, Stefano Garzarella wrote: As discussed with Michael and Markus [1], this version also includes the patch on which v7 depended to simplify the merge in Michael's tree. The series i

Re: [PULL v3 52/85] contrib/vhost-user-*: use QEMU bswap helper functions

2024-07-12 Thread Stefano Garzarella
On Fri, Jul 12, 2024 at 03:24:47PM GMT, Peter Maydell wrote: On Wed, 3 Jul 2024 at 23:48, Michael S. Tsirkin wrote: From: 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-

[PATCH] contrib/vhost-user-blk: fix overflowing expression

2024-07-12 Thread Stefano Garzarella
9454 Fixes: 5ab04420c3 ("contrib/vhost-user-*: use QEMU bswap helper functions") Fixes: caa1ee4313 ("vhost-user-blk: add discard/write zeroes features support") Cc: changpeng@intel.com Suggested-by: Peter Maydell Signed-off-by: Stefano Garzarella --- contrib/vhost-user-b

[PATCH] scripts/checkpatch: emit a warning if an imported file is touched

2024-07-17 Thread Stefano Garzarella
If a file imported from Linux is touched, emit a warning and suggest using scripts/update-linux-headers.sh Signed-off-by: Stefano Garzarella --- scripts/checkpatch.pl | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/scripts/checkpatch.pl b/scripts

Re: [PATCH] scripts/checkpatch: emit a warning if an imported file is touched

2024-07-17 Thread Stefano Garzarella
On Wed, Jul 17, 2024 at 10:50:51AM GMT, Daniel P. Berrangé wrote: On Wed, Jul 17, 2024 at 11:37:52AM +0200, Stefano Garzarella wrote: If a file imported from Linux is touched, emit a warning and suggest using scripts/update-linux-headers.sh Signed-off-by: Stefano Garzarella --- scripts

Re: [PATCH] scripts/checkpatch: emit a warning if an imported file is touched

2024-07-17 Thread Stefano Garzarella
On Wed, Jul 17, 2024 at 11:58:46AM GMT, Cornelia Huck wrote: On Wed, Jul 17 2024, Stefano Garzarella wrote: If a file imported from Linux is touched, emit a warning and suggest using scripts/update-linux-headers.sh Signed-off-by: Stefano Garzarella --- scripts/checkpatch.pl | 14

[PATCH v2] scripts/checkpatch: more checks on files imported from Linux

2024-07-18 Thread Stefano Garzarella
If a file imported from Linux is touched, emit a warning and suggest using scripts/update-linux-headers.sh. Also check that updating imported files from Linux are not mixed with other changes, in which case emit an error. Signed-off-by: Stefano Garzarella --- v2: - added an error when mixing

Re: [PATCH v4 03/17] backends/igvm: Add IGVM loader and configuration

2024-07-29 Thread Stefano Garzarella
On Wed, Jul 03, 2024 at 12:05:41PM GMT, Roy Hopkins wrote: Adds an IGVM loader to QEMU which processes a given IGVM file and applies the directives within the file to the current guest configuration. The IGVM loader can be used to configure both confidential and non-confidential guests. For conf

Re: [PATCH v4 11/17] docs/system: Add documentation on support for IGVM

2024-07-29 Thread Stefano Garzarella
/programmer-references/24593.pdf + +[2] ``buildigvm`` - A tool to build example IGVM files containing OVMF firmware + https://github.com/roy-hopkins/buildigvm Should we also put a reference to the tool we have in Coconut SVSM? BTW, this patch LGTM: Reviewed-by: Stefano Garzarella \ No newli

Re: [PATCH] qemu-ga: document vsock-listen in the man page

2020-03-23 Thread Stefano Garzarella
t; > " -f, --pidfile specify pidfile (default is %s)\n" > #ifdef CONFIG_FSFREEZE > -- > 2.24.1 > Thanks to update it! I updated the wiki page some months ago, adding an example, but I forgot to check the most important man page and --help output. Reviewed-by: Stefano Garzarella

Re: [PATCH] nvme: Print 'cqid' for nvme_del_cq

2020-03-25 Thread Stefano Garzarella
On Tue, Mar 24, 2020 at 11:06:46PM +0900, Minwoo Im wrote: > The given argument for this trace should be cqid, not sqid. > > Signed-off-by: Minwoo Im > --- > hw/block/trace-events | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Stefano Garzarella &g

Re: [PATCH 1/2] virtio-blk: delete vqs on the error path in realize()

2020-03-27 Thread Stefano Garzarella
On Fri, Mar 27, 2020 at 11:56:49AM +0800, Pan Nengyuan wrote: > virtio_vqs forgot to free on the error path in realize(). Fix that. > > The asan stack: > Direct leak of 14336 byte(s) in 1 object(s) allocated from: > #0 0x7f58b93fd970 in __interceptor_calloc (/lib64/libasan.so.5+0xef970) >

Re: [PATCH 2/2] virtio-iommu: delete vqs in unrealize to fix memleaks

2020-03-27 Thread Stefano Garzarella
On Fri, Mar 27, 2020 at 11:56:50AM +0800, Pan Nengyuan wrote: > req_vq/event_vq forgot to free in unrealize(). Fix that. > > Signed-off-by: Pan Nengyuan > --- > Cc: Eric Auger > --- > hw/virtio/virtio-iommu.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/hw/virtio/virtio-iommu.c b

Re: [PATCH v2 1/2] virtio-blk: delete vqs on the error path in realize()

2020-03-27 Thread Stefano Garzarella
Nengyuan > --- > v2->v1: > - Fix incorrect free in v1, it will cause a uaf. > --- > Cc: Stefan Hajnoczi > Cc: Kevin Wolf > Cc: Max Reitz > Cc: qemu-bl...@nongnu.org > --- > hw/block/virtio-blk.c | 3 +++ > 1 file changed, 3 insertions(+) Reviewed-by: Stefa

Re: [PATCH v2 2/2] virtio-iommu: delete vqs in unrealize to fix memleak

2020-03-27 Thread Stefano Garzarella
(s->domains); > g_tree_destroy(s->endpoints); > > +virtio_delete_queue(s->req_vq); > +virtio_delete_queue(s->event_vq); > virtio_cleanup(vdev); > } Hi Pan, this patch LGTM, I left a comment on v1 about cleaning 's->as_by_busptr' hash table as well. Reviewed-by: Stefano Garzarella Thanks, Stefano

Re: [PATCH] monitor/hmp-cmds: add units for mirate_parameters.

2020-03-27 Thread Stefano Garzarella
Hi Mao, On Fri, Mar 27, 2020 at 03:32:10PM +0800, Mao Zhongyi wrote: > When running: > (qemu) info migrate_parameters > announce-initial: 50 ms > announce-max: 550 ms > announce-step: 100 ms > compress-wait-thread: on > ... > max-bandwidth: 33554432 bytes/second > downtime-limit: 300 milliseconds

Re: [PATCH] monitor/hmp-cmds: add units for mirate_parameters.

2020-03-27 Thread Stefano Garzarella
On Fri, Mar 27, 2020 at 11:28:14AM +, Dr. David Alan Gilbert wrote: > * Stefano Garzarella (sgarz...@redhat.com) wrote: > > Hi Mao, > > > > On Fri, Mar 27, 2020 at 03:32:10PM +0800, Mao Zhongyi wrote: > > > When running: > > > (qemu) info migrate_p

Re: [PATCH v3 2/2] virtio-iommu: delete vqs in unrealize to fix memleak

2020-03-27 Thread Stefano Garzarella
ke this: "virtio-iommu: avoid memleak in the unrealize" > > Signed-off-by: Pan Nengyuan > Acked-by: Eric Auger > --- > Cc: Eric Auger > --- > v3->v1/v2: > - Aslo clean 's->as_by_busptr' hash table in unrealize.(Suggested by Stefano > Garzarella

Re: [PATCH v2] monitor/hmp-cmds: add units for migrate_parameters.

2020-03-27 Thread Stefano Garzarella
t; Signed-off-by: Mao Zhongyi > --- > monitor/hmp-cmds.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) Reviewed-by: Stefano Garzarella Thanks, Stefano > > diff --git a/monitor/hmp-cmds.c b/monitor/hmp-cmds.c > index 2a900a528a..790fad3afe 100644 > --- a/mo

Re: [PATCH v4 2/2] virtio-iommu: avoid memleak in the unrealize

2020-03-30 Thread Stefano Garzarella
r > --- > Cc: Eric Auger > Cc: Stefan Hajnoczi > --- > v3->v1/v2: > - Also clean 's->as_by_busptr' hash table in unrealize.(Suggested by Stefano > Garzarella) > v4->v3: > - update subject msg and move g_hash_table_destroy to the beginning of > unre

[PATCH] vhost-vsock: fix double close() in the realize() error path

2020-03-31 Thread Stefano Garzarella
vhost_dev_cleanup() closes the vhostfd parameter passed to vhost_dev_init(), so this patch avoids closing it twice in the vhost_vsock_device_realize() error path. Signed-off-by: Stefano Garzarella --- hw/virtio/vhost-vsock.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git

Re: [PATCH v2 3/3] migration: move the units of migrate parameters from milliseconds to ms

2020-04-01 Thread Stefano Garzarella
nges! Reviewed-by: Stefano Garzarella > > diff --git a/migration/migration.c b/migration/migration.c > index 5a6436d035..b3d36d1467 100644 > --- a/migration/migration.c > +++ b/migration/migration.c > @@ -1214,7 +1214,7 @@ static bool migrate_params_check(Migratio

Re: [PATCH for-5.0] aio-posix: fix test-aio /aio/event/wait with fdmon-io_uring

2020-04-03 Thread Stefano Garzarella
oczi > --- > util/fdmon-io_uring.c | 7 ++- > 1 file changed, 6 insertions(+), 1 deletion(-) Reviewed-by: Stefano Garzarella Thanks, Stefano > > diff --git a/util/fdmon-io_uring.c b/util/fdmon-io_uring.c > index 7e143ef515..b4d6109f20 100644 > --- a/util/fdmon

Re: [PATCH] vhost-vsock: fix error message output

2020-03-04 Thread Stefano Garzarella
} else { > vhostfd = open("/dev/vhost-vsock", O_RDWR); > if (vhostfd < 0) { > -error_setg_errno(errp, -errno, > +error_setg_errno(errp, errno, > "vhost-vsock: failed to open vhost device"); > return; > } Reviewed-by: Stefano Garzarella Thanks, Stefano

Re: [PATCH] optionrom/pvh: scan entire RSDP Area

2020-03-04 Thread Stefano Garzarella
in the "memory region from 0x000E to 0x000F", so it should be a typo. Thanks for fixing it! Fixes: 2785dc7b17 ("optionrom: add new PVH option rom") Reviewed-by: Stefano Garzarella [1] https://wiki.osdev.org/RSDP#Detecting_the_RSDP

Re: [PATCH 0/3] hw/net,virtfs-proxy-helper: Reduce .data footprint

2020-03-05 Thread Stefano Garzarella
ve 1MiB of .data > virtfs-proxy-helper: Make the helper_opts[] array const > > fsdev/virtfs-proxy-helper.c | 2 +- > hw/net/e1000.c | 6 -- > hw/net/e1000e_core.c| 6 -- > 3 files changed, 9 insertions(+), 5 deletions(-) > Cool and clear changes! Reviewed-by: Stefano Garzarella Thanks, Stefano

Re: [PATCH 0/3] hw/net,virtfs-proxy-helper: Reduce .data footprint

2020-03-05 Thread Stefano Garzarella
On Thu, Mar 05, 2020 at 11:37:22AM +0100, Philippe Mathieu-Daudé wrote: > On 3/5/20 10:53 AM, Stefano Garzarella wrote: > > On Thu, Mar 05, 2020 at 02:04:43AM +0100, Philippe Mathieu-Daudé wrote: > > > More memory footprint reduction, similar to: > > > https://lists.gnu.

Re: [PATCH v2 1/9] hw/audio/fmopl: Fix a typo twice

2020-03-05 Thread Stefano Garzarella
f virtual YM3812 -- */ > /* 'rate' is sampling rate and 'bufsiz' is the size of the */ ^ If you need to respin, what do you think about removing also "and 'bufsiz' is the size of the"? With or without: Re

Re: [PATCH v2 2/9] hw/audio/fmopl: Move ENV_CURVE to .heap to save 32KiB of .bss

2020-03-05 Thread Stefano Garzarella
gt; free(OPL); > +g_free(ENV_CURVE); Just for curiosity, here the entire fmopl.c is indented with tabs. In this case, is it better to continue with the tabs or use spaces for new changes? Anyway the changes LGTM: Reviewed-by: Stefano Garzarella

Re: [PATCH v2 7/9] ui/curses: Make control_characters[] array const

2020-03-05 Thread Stefano Garzarella
On Thu, Mar 05, 2020 at 01:45:23PM +0100, Philippe Mathieu-Daudé wrote: > As we only use this array as input, make it const. > > Signed-off-by: Philippe Mathieu-Daudé > --- > ui/curses.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Stefano Garzarella

Re: [PATCH v2 2/9] hw/audio/fmopl: Move ENV_CURVE to .heap to save 32KiB of .bss

2020-03-05 Thread Stefano Garzarella
On Thu, Mar 05, 2020 at 02:44:03PM +0100, Stefano Garzarella wrote: > On Thu, Mar 05, 2020 at 01:45:18PM +0100, Philippe Mathieu-Daudé wrote: > > This buffer is only used by the adlib audio device. Move it to > > the .heap to release 32KiB of .bss (size reported on x86_64 host).

Re: [PATCH v2 2/9] hw/audio/fmopl: Move ENV_CURVE to .heap to save 32KiB of .bss

2020-03-05 Thread Stefano Garzarella
On Thu, Mar 05, 2020 at 02:50:47PM +0100, Philippe Mathieu-Daudé wrote: > On 3/5/20 2:48 PM, Stefano Garzarella wrote: > > On Thu, Mar 05, 2020 at 02:44:03PM +0100, Stefano Garzarella wrote: > > > On Thu, Mar 05, 2020 at 01:45:18PM +0100, Philippe Mathieu-Daudé wrote: > >

Re: [PATCH] tests/docker: Install tools to cross-debug and build Linux kernels

2020-03-06 Thread Stefano Garzarella
> tests/docker/dockerfiles/debian9.docker | 3 +++ > 2 files changed, 6 insertions(+) Make sense to add these packages: Reviewed-by: Stefano Garzarella Thanks, Stefano > > diff --git a/tests/docker/dockerfiles/debian10.docker > b/tests/docker/dockerfiles/debian10.docker > inde

Re: [PATCH 10/12] block/file-posix: fix a possible undefined behavior

2020-08-17 Thread Stefano Garzarella
ed-off-by: Pan Nengyuan > --- > Cc: Kevin Wolf > Cc: Max Reitz > Cc: Aarushi Mehta > Cc: qemu-bl...@nongnu.org > --- > block/file-posix.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Stefano Garzarella Thanks, Stefano > > diff --git a/block

Re: [PATCH 0/7] block: Use definitions instead of magic values

2020-08-17 Thread Stefano Garzarella
| 8 > hw/ide/core.c | 25 + > hw/ide/pci.c| 2 +- > hw/scsi/scsi-disk.c | 44 +++- > 6 files changed, 47 insertions(+), 41 deletions(-) Series: Reviewed-by: Stefano Garzarella Thanks for the cleaning that makes the code more readable! Stefano

Re: virtio-vsock requires 'disable-legacy=on' in QEMU 5.1

2020-08-17 Thread Stefano Garzarella
On Mon, Aug 17, 2020 at 12:27:46PM +0200, Cornelia Huck wrote: > On Thu, 13 Aug 2020 14:04:15 +0200 > Stefano Garzarella wrote: > > > On Thu, Aug 13, 2020 at 12:37:37PM +0200, Cornelia Huck wrote: > > > On Thu, 13 Aug 2020 12:24:30 +0200 > > > Stefano Garzarell

Re: [PATCH] qemu-img: Explicit number replaced by a constant

2020-08-18 Thread Stefano Garzarella
Hi Yi Li, thanks for this patch! Just a comment below: On Mon, Aug 17, 2020 at 07:01:13PM +0800, Yi Li wrote: > Signed-off-by: Yi Li > --- > qemu-img.c | 12 ++-- > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/qemu-img.c b/qemu-img.c > index 5308773811..a0fbc2757c 10

Re: virtio-vsock requires 'disable-legacy=on' in QEMU 5.1

2020-08-18 Thread Stefano Garzarella
On Tue, Aug 18, 2020 at 02:44:50PM +0200, Cornelia Huck wrote: > On Mon, 17 Aug 2020 15:11:28 +0200 > Stefano Garzarella wrote: > > > On Mon, Aug 17, 2020 at 12:27:46PM +0200, Cornelia Huck wrote: > > > On Thu, 13 Aug 2020 14:04:15 +0200 > > > Stefano Garzarell

Re: virtio-vsock requires 'disable-legacy=on' in QEMU 5.1

2020-08-18 Thread Stefano Garzarella
On Tue, Aug 18, 2020 at 04:31:01PM +0200, Cornelia Huck wrote: > On Tue, 18 Aug 2020 16:01:20 +0200 > Stefano Garzarella wrote: > > > On Tue, Aug 18, 2020 at 02:44:50PM +0200, Cornelia Huck wrote: > > > > It seems to me that the status before this was "works by a

Re: [PATCH v2] qemu-img: Explicit number replaced by a constant

2020-08-19 Thread Stefano Garzarella
s.total_sectors * BDRV_SECTOR_SIZE, > &error_abort); > ret = add_old_style_options(out_fmt, opts, out_baseimg, NULL); > if (ret < 0) { > goto out; > -- > 2.25.3 > > > Reviewed-by: Stefano Garzarella

[PATCH 0/3] vhost-vsock: force virtio version 1

2020-08-19 Thread Stefano Garzarella
1] https://lists.nongnu.org/archive/html/qemu-devel/2020-08/msg02515.html Stefano Garzarella (3): vhost-vsock-pci: force virtio version 1 vhost-user-vsock-pci: force virtio version 1 vhost-vsock-ccw: force virtio version 1 hw/s390x/vhost-vsock-ccw.c | 2 ++ hw/virtio/vhost-user-vsock-p

[PATCH 2/3] vhost-user-vsock-pci: force virtio version 1

2020-08-19 Thread Stefano Garzarella
ch forces virtio version 1 and remove 'transitional_name' properties, as done for vhost-vsock-pci, removing the need to specify 'disable-legacy=on' on vhost-user-vsock-pci device. Cc: qemu-sta...@nongnu.org Suggested-by: Cornelia Huck Signed-off-by: Stefano Garzarella --- hw/vi

[PATCH 3/3] vhost-vsock-ccw: force virtio version 1

2020-08-19 Thread Stefano Garzarella
virtio-vsock was introduced after the release of VIRTIO 1.0 specifications, so it should be 'modern-only'. This patch forces virtio version 1 as done for vhost-vsock-pci. Cc: qemu-sta...@nongnu.org Suggested-by: Cornelia Huck Signed-off-by: Stefano Garzarella --- hw/s390x/vhost-v

[PATCH 1/3] vhost-vsock-pci: force virtio version 1

2020-08-19 Thread Stefano Garzarella
an Cai Reported-by: Qinghua Cheng Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1868449 Suggested-by: Cornelia Huck Signed-off-by: Stefano Garzarella --- hw/virtio/vhost-vsock-pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/virtio/vhost-vsock-pci.c b/hw/virtio/vho

Re: [PATCH 0/3] vhost-vsock: force virtio version 1

2020-08-19 Thread Stefano Garzarella
On Wed, Aug 19, 2020 at 01:06:55PM +0200, David Hildenbrand wrote: > On 19.08.20 12:51, Stefano Garzarella wrote: > > Recenlty changes in QEMU 5.1 requires to set 'disable-legacy=3Don' > > on vhost-vsock-pci and vhost-user-vsock-pci devices: > > > > $ .

Re: [PATCH 1/3] vhost-vsock-pci: force virtio version 1

2020-08-19 Thread Stefano Garzarella
On Wed, Aug 19, 2020 at 01:55:42PM +0200, Cornelia Huck wrote: > On Wed, 19 Aug 2020 12:51:54 +0200 > Stefano Garzarella wrote: > > > Commit 9b3a35ec82 ("virtio: verify that legacy support is not > > accidentally on") added a safety checks that requires to set >

[PATCH v2 0/3] vhost-vsock: force virtio version 1

2020-08-19 Thread Stefano Garzarella
on failed: Invalid argument With this series applied there is the same requirements. Alternatively we have to detach and re-attach the device manually. Thanks, Stefano [1] https://lists.nongnu.org/archive/html/qemu-devel/2020-08/msg02515.html Stefano Garzarella (3): vhost-vsock-pci: force virtio v

[PATCH v2 1/3] vhost-vsock-pci: force virtio version 1

2020-08-19 Thread Stefano Garzarella
an Cai Reported-by: Qinghua Cheng Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1868449 Suggested-by: Cornelia Huck Reviewed-by: Cornelia Huck Signed-off-by: Stefano Garzarella --- hw/virtio/vhost-vsock-pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/virtio/vho

[PATCH v2 3/3] vhost-vsock-ccw: force virtio version 1

2020-08-19 Thread Stefano Garzarella
virtio-vsock was introduced after the release of VIRTIO 1.0 specifications, so it should be 'modern-only'. This patch forces virtio version 1 as done for vhost-vsock-pci. Cc: qemu-sta...@nongnu.org Suggested-by: Cornelia Huck Reviewed-by: Cornelia Huck Signed-off-by: Stefano

[PATCH v2 2/3] vhost-user-vsock-pci: force virtio version 1

2020-08-19 Thread Stefano Garzarella
ch forces virtio version 1 and removes the 'transitional_name' property, as done for vhost-vsock-pci, removing the need to specify 'disable-legacy=on' on vhost-user-vsock-pci device. Cc: qemu-sta...@nongnu.org Suggested-by: Cornelia Huck Reviewed-by: Cornelia Huck Signed-off-by: S

Re: [PATCH v5 01/15] block/nvme: Replace magic value by SCALE_MS definition

2020-08-21 Thread Stefano Garzarella
ertion(+), 1 deletion(-) Reviewed-by: Stefano Garzarella > > diff --git a/block/nvme.c b/block/nvme.c > index 374e2689157..2f5e3c2adfa 100644 > --- a/block/nvme.c > +++ b/block/nvme.c > @@ -715,7 +715,7 @@ static int nvme_init(BlockDriverState *bs, const char > *device, int namesp

Re: [PATCH v5 03/15] block/nvme: Let nvme_create_queue_pair() fail gracefully

2020-08-21 Thread Stefano Garzarella
On Thu, Aug 20, 2020 at 06:58:49PM +0200, Philippe Mathieu-Daudé wrote: > As nvme_create_queue_pair() is allowed to fail, replace the > alloc() calls by try_alloc() to avoid aborting QEMU. > > Reviewed-by: Stefan Hajnoczi > Signed-off-by: Philippe Mathieu-Daudé > --- > block/nvme.c | 12 +

Re: [PATCH v5 04/15] block/nvme: Define INDEX macros to ease code review

2020-08-21 Thread Stefano Garzarella
-Daudé > --- > block/nvme.c | 33 +++-- > 1 file changed, 19 insertions(+), 14 deletions(-) Reviewed-by: Stefano Garzarella > > diff --git a/block/nvme.c b/block/nvme.c > index e1893b4e792..003809fbd83 100644 > --- a/block/nvme.c > +++ b

Re: [PATCH v5 05/15] block/nvme: Improve error message when IO queue creation failed

2020-08-21 Thread Stefano Garzarella
gt; block/nvme.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Stefano Garzarella > > diff --git a/block/nvme.c b/block/nvme.c > index 003809fbd83..53448b7d230 100644 > --- a/block/nvme.c > +++ b/block/nvme.c > @@ -648,7 +648,7 @@ static bool nvm

Re: [PATCH v5 06/15] block/nvme: Use common error path in nvme_add_io_queue()

2020-08-21 Thread Stefano Garzarella
: Philippe Mathieu-Daudé > --- > block/nvme.c | 9 + > 1 file changed, 5 insertions(+), 4 deletions(-) Reviewed-by: Stefano Garzarella > > diff --git a/block/nvme.c b/block/nvme.c > index 53448b7d230..3101f1ad55d 100644 > --- a/block/nvme.c > +++ b/bloc

Re: [PATCH v5 07/15] block/nvme: Rename local variable

2020-08-21 Thread Stefano Garzarella
Hajnoczi > Signed-off-by: Philippe Mathieu-Daudé > --- > block/nvme.c | 19 +-- > 1 file changed, 9 insertions(+), 10 deletions(-) Reviewed-by: Stefano Garzarella > > diff --git a/block/nvme.c b/block/nvme.c > index 3101f1ad55d..99822d9fd36 100644 >

Re: [PATCH v5 08/15] block/nvme: Use union of NvmeIdCtrl / NvmeIdNs structures

2020-08-21 Thread Stefano Garzarella
f (NVME_ID_NS_DLFEAT_WRITE_ZEROES(idns->dlfeat) && > -NVME_ID_NS_DLFEAT_READ_BEHAVIOR(idns->dlfeat) == > +if (NVME_ID_NS_DLFEAT_WRITE_ZEROES(id->ns.dlfeat) && > +NVME_ID_NS_DLFEAT_READ_BEHAVIOR(id->ns.dlfeat) == > NVME_ID_NS_DLFEAT_READ_BEHAVIOR_ZEROES) { > bs->supported_write_flags |= BDRV_REQ_MAY_UNMAP; > } > -- > 2.26.2 > > With or without the new tyoe, the patch looks good to me: Reviewed-by: Stefano Garzarella

Re: [PATCH v5 09/15] block/nvme: Replace qemu_try_blockalign0 by qemu_try_blockalign/memset

2020-08-21 Thread Stefano Garzarella
czi > Signed-off-by: Philippe Mathieu-Daudé > --- > block/nvme.c | 16 +--- > 1 file changed, 9 insertions(+), 7 deletions(-) Reviewed-by: Stefano Garzarella > > diff --git a/block/nvme.c b/block/nvme.c > index 2bd1935f951..ac6bb52043d 100644 > --- a/bl

Re: [PATCH v5 10/15] block/nvme: Replace qemu_try_blockalign(bs) by qemu_try_memalign(pg_sz)

2020-08-21 Thread Stefano Garzarella
audé > --- > block/nvme.c | 10 +- > 1 file changed, 5 insertions(+), 5 deletions(-) Reviewed-by: Stefano Garzarella > > diff --git a/block/nvme.c b/block/nvme.c > index ac6bb52043d..f180078e781 100644 > --- a/block/nvme.c > +++ b/block/nvme.c > @@ -174,

Re: [PATCH v5 11/15] block/nvme: Simplify nvme_init_queue() arguments

2020-08-21 Thread Stefano Garzarella
me.c | 7 +++ > 1 file changed, 3 insertions(+), 4 deletions(-) Reviewed-by: Stefano Garzarella > > diff --git a/block/nvme.c b/block/nvme.c > index f180078e781..5b69fc75a60 100644 > --- a/block/nvme.c > +++ b/block/nvme.c > @@ -165,10 +165,9 @@ static QemuOptsList runt

Re: [PATCH v5 12/15] block/nvme: Replace BDRV_POLL_WHILE by AIO_WAIT_WHILE

2020-08-21 Thread Stefano Garzarella
ckDriverState *bs, > NVMeQueuePair *q, > } > nvme_submit_command(q, req, cmd, nvme_cmd_sync_cb, &ret); > > -BDRV_POLL_WHILE(bs, ret == -EINPROGRESS); > +AIO_WAIT_WHILE(aio_context, ret == -EINPROGRESS); Maybe I would have: AIO_WAIT_WHILE(bdrv_get_aio_context(

Re: [PATCH v5 13/15] block/nvme: Simplify nvme_create_queue_pair() arguments

2020-08-21 Thread Stefano Garzarella
gt; --- > block/nvme.c | 13 +++-- > 1 file changed, 7 insertions(+), 6 deletions(-) Reviewed-by: Stefano Garzarella > > diff --git a/block/nvme.c b/block/nvme.c > index 456fe61f5ea..1f67e888c84 100644 > --- a/block/nvme.c > +++ b/block/nvme.c > @@ -208,12 +20

Re: [PATCH v5 14/15] block/nvme: Extract nvme_poll_queue()

2020-08-21 Thread Stefano Garzarella
t; block/nvme.c | 44 +++- > 1 file changed, 27 insertions(+), 17 deletions(-) Reviewed-by: Stefano Garzarella > > diff --git a/block/nvme.c b/block/nvme.c > index 1f67e888c84..a61e86a83eb 100644 > --- a/block/nvme.c > +++ b/block/nvme.c > @@ -5

Re: [PATCH v5 15/15] block/nvme: Use an array of EventNotifier

2020-08-21 Thread Stefano Garzarella
On Thu, Aug 20, 2020 at 06:59:01PM +0200, Philippe Mathieu-Daudé wrote: > In preparation of using multiple IRQ (thus multiple eventfds) > make BDRVNVMeState::irq_notifier an array (for now of a single > element, the admin queue notifier). > > Reviewed-by: Stefan Hajnoczi > Signed-off-by: Philipp

Re: [PATCH v5 15/15] block/nvme: Use an array of EventNotifier

2020-08-21 Thread Stefano Garzarella
On Fri, Aug 21, 2020 at 03:09:13PM +0200, Philippe Mathieu-Daudé wrote: > On 8/21/20 12:29 PM, Stefano Garzarella wrote: > > On Thu, Aug 20, 2020 at 06:59:01PM +0200, Philippe Mathieu-Daudé wrote: > >> In preparation of using multiple IRQ (thus multiple eventfds) >

Re: [PATCH v5 12/15] block/nvme: Replace BDRV_POLL_WHILE by AIO_WAIT_WHILE

2020-08-21 Thread Stefano Garzarella
On Fri, Aug 21, 2020 at 03:15:58PM +0200, Philippe Mathieu-Daudé wrote: > On 8/21/20 12:15 PM, Stefano Garzarella wrote: > > On Thu, Aug 20, 2020 at 06:58:58PM +0200, Philippe Mathieu-Daudé wrote: > >> BDRV_POLL_WHILE() is defined as: > >> > >>

Re: [PATCH v5 08/15] block/nvme: Use union of NvmeIdCtrl / NvmeIdNs structures

2020-08-21 Thread Stefano Garzarella
On Fri, Aug 21, 2020 at 03:27:15PM +0200, Philippe Mathieu-Daudé wrote: > On 8/21/20 12:03 PM, Stefano Garzarella wrote: > > On Thu, Aug 20, 2020 at 06:58:54PM +0200, Philippe Mathieu-Daudé wrote: > >> We allocate an unique chunk of memory then use it for two > >> dif

Re: [PATCH v5 03/15] block/nvme: Let nvme_create_queue_pair() fail gracefully

2020-08-21 Thread Stefano Garzarella
On Fri, Aug 21, 2020 at 03:36:47PM +0200, Philippe Mathieu-Daudé wrote: > On 8/21/20 11:44 AM, Stefano Garzarella wrote: > > On Thu, Aug 20, 2020 at 06:58:49PM +0200, Philippe Mathieu-Daudé wrote: > >> As nvme_create_queue_pair() is allowed to fail, replace the > >>

Re: [PATCH 0/2] hw/mem/pc-dimm: Trivial code changes

2020-03-11 Thread Stefano Garzarella
r 80 characters warning > > hw/mem/pc-dimm.c | 7 --- > 1 file changed, 4 insertions(+), 3 deletions(-) > Reviewed-by: Stefano Garzarella

Re: [PATCH] elf_ops: Don't try to g_mapped_file_unref(NULL)

2020-04-24 Thread Stefano Garzarella
file); > +if (mapped_file) { > +g_mapped_file_unref(mapped_file); > +} > g_free(phdr); > return ret; > } Oooops, my fault :-( Reviewed-by: Stefano Garzarella Maybe we can add: Fixes: 816b9fe450 ("elf-ops.h: Map into memory the ELF to load") Thanks, Stefano

Re: [PATCH] virtiofsd: Remove "norace" from cmdline help

2020-07-17 Thread Stefano Garzarella
Disable racy fallback. The default is false. - * posix_lock|no_posix_lock - Enable/disable remote POSIX locks. The default is ``posix_lock``. With that fixed: Reviewed-by: Stefano Garzarella Thanks, Stefano

Re: [PATCH] hw/i386/kvm/ioapic.c: fix typo in error message

2020-07-20 Thread Stefano Garzarella
APICCommonState *s) > > ret = kvm_vm_ioctl(kvm_state, KVM_SET_IRQCHIP, &chip); > if (ret < 0) { > -fprintf(stderr, "KVM_GET_IRQCHIP failed: %s\n", strerror(ret)); > +fprintf(stderr, "KVM_SET_IRQCHIP failed: %s\n", strerror(ret)); > abort(); > } > } > -- > 2.17.1 > > Reviewed-by: Stefano Garzarella

Re: [PATCH] pci_dma_rw: return correct value instead of 0

2020-07-30 Thread Stefano Garzarella
ue of pci_dma_rw(), pci_dma_read(), andpci_dma_write(). Should we make them void? Anyway, for this patch: Reviewed-by: Stefano Garzarella Thanks, Stefano

Re: [PATCH] virtio-mem: Work around format specifier mismatch for RISC-V

2020-07-30 Thread Stefano Garzarella
On Wed, Jul 29, 2020 at 06:54:38PM -0600, Bruce Rogers wrote: > This likely affects other, less popular host architectures as well. > Less common host architectures under linux get QEMU_VMALLOC_ALIGN (from > which VIRTIO_MEM_MIN_BLOCK_SIZE is derived) define to a variable of > type uintptr, which i

Re: [PATCH] virtio-mem: Work around format specifier mismatch for RISC-V

2020-07-30 Thread Stefano Garzarella
On Thu, Jul 30, 2020 at 09:51:19AM +0200, David Hildenbrand wrote: > On 30.07.20 09:49, Stefano Garzarella wrote: > > On Wed, Jul 29, 2020 at 06:54:38PM -0600, Bruce Rogers wrote: > >> This likely affects other, less popular host architectures as well. > >> Less comm

Re: [PATCH] pci_dma_rw: return correct value instead of 0

2020-07-30 Thread Stefano Garzarella
On Thu, Jul 30, 2020 at 10:50:43AM +0200, Emanuele Giuseppe Esposito wrote: > > > On 30/07/2020 09:41, Stefano Garzarella wrote: > > On Thu, Jul 30, 2020 at 12:17:32AM +0200, Emanuele Giuseppe Esposito wrote: > > > pci_dma_rw currently always returns 0, regardles

Re: [PATCH] pci_dma_rw: return correct value instead of 0

2020-07-30 Thread Stefano Garzarella
On Thu, Jul 30, 2020 at 09:58:21AM +0100, Peter Maydell wrote: > On Thu, 30 Jul 2020 at 08:42, Stefano Garzarella wrote: > > I agree that it is better to return the dma_memory_rw() return value, but > > at first look, no one seems to check the return value of pci_dma_rw(), &

Re: [PATCH] virtio-mem: Correct format specifier mismatch for RISC-V

2020-07-30 Thread Stefano Garzarella
> /* > * Size the usable region bigger than the requested size if possible. Esp. > * Linux guests will only add (aligned) memory blocks in case they fully > -- > 2.27.0 > Reviewed-by: Stefano Garzarella Thanks, Stefano

Re: [PATCH-for-5.1?] util/pagesize: Make qemu_real_host_page_size of type size_t

2020-07-30 Thread Stefano Garzarella
On Thu, Jul 30, 2020 at 03:59:35PM +0200, Philippe Mathieu-Daudé wrote: > We use different types to hold 'qemu_real_host_page_size'. > Unify picking 'size_t' which seems the best candidate. I agree, it sounds better! Should we change even "qemu_host_page_size"? Thanks, Stefano > > Doing so fix

Re: [PATCH 000/147] Meson integration for 5.2

2020-08-11 Thread Stefano Garzarella
On Mon, Aug 10, 2020 at 07:06:38PM +0200, Paolo Bonzini wrote: > This version is substantially less "draft-like", and the diffstat > is actually quite large with Thursday's draft. > > The changes are as follows: > - updated oss-fuzz build script > - various cases fixed that broke depending on pres

virtio-vsock requires 'disable-legacy=on' in QEMU 5.1

2020-08-13 Thread Stefano Garzarella
Hi, Qinghua discovered that virtio-vsock-pci requires 'disable-legacy=on' in QEMU 5.1: $ ./qemu-system-x86_64 ... -device vhost-vsock-pci,guest-cid=5 qemu-system-x86_64: -device vhost-vsock-pci,guest-cid=5: device is modern-only, use disable-legacy=on Bisecting I found that this behav

Re: virtio-vsock requires 'disable-legacy=on' in QEMU 5.1

2020-08-13 Thread Stefano Garzarella
On Thu, Aug 13, 2020 at 11:28:20AM +0200, Cornelia Huck wrote: > On Thu, 13 Aug 2020 11:16:56 +0200 > Stefano Garzarella wrote: > > > Hi, > > > > Qinghua discovered that virtio-vsock-pci requires 'disable-legacy=on' in > > QEMU 5.1: > > $

Re: virtio-vsock requires 'disable-legacy=on' in QEMU 5.1

2020-08-13 Thread Stefano Garzarella
On Thu, Aug 13, 2020 at 12:37:37PM +0200, Cornelia Huck wrote: > On Thu, 13 Aug 2020 12:24:30 +0200 > Stefano Garzarella wrote: > > > On Thu, Aug 13, 2020 at 11:28:20AM +0200, Cornelia Huck wrote: > > > On Thu, 13 Aug 2020 11:16:56 +0200 > > > Stefano Garza

Re: [PATCH v4 1/8] hw/i386: Factorize PVH related functions

2019-09-25 Thread Stefano Garzarella
Hi Sergio, On Tue, Sep 24, 2019 at 02:44:26PM +0200, Sergio Lopez wrote: > Extract PVH related functions from pc.c, and put them in pvh.c, so > they can be shared with other components. > > Signed-off-by: Sergio Lopez > --- > hw/i386/Makefile.objs | 1 + > hw/i386/pc.c | 120 +---

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

2019-09-25 Thread Stefano Garzarella
cpuid.c | 2 +- > 3 files changed, 7 insertions(+), 8 deletions(-) > The rest LGTM: Acked-by: Stefano Garzarella Thanks, Stefano > diff --git a/target/i386/cpu.c b/target/i386/cpu.c > index 9e0bac31e8..71034aeb5a 100644 > --- a/target/i386/cpu.c > +++ b/target/i386/cpu.c

Re: [PATCH v4 1/8] hw/i386: Factorize PVH related functions

2019-09-25 Thread Stefano Garzarella
On Wed, Sep 25, 2019 at 11:00:30AM +0200, Sergio Lopez wrote: > Stefano Garzarella writes: > > Hi Sergio, > > > > On Tue, Sep 24, 2019 at 02:44:26PM +0200, Sergio Lopez wrote: > >> Extract PVH related functions from pc.c, and put them in pvh.c, so > >> t

Re: [PATCH] qemu-doc: Remove paragraph about requiring a HD image with -kernel

2019-10-01 Thread Stefano Garzarella
his description from our documentation > now, too. > > Signed-off-by: Thomas Huth > --- > qemu-doc.texi | 4 ---- > 1 file changed, 4 deletions(-) Reviewed-by: Stefano Garzarella Thanks, Stefano > > diff --git a/qemu-doc.texi b/qemu-doc.texi > index 2b

Re: [PATCH] accel/kvm: ensure ret always set

2019-10-03 Thread Stefano Garzarella
On Wed, Oct 02, 2019 at 01:08:40PM +0200, Paolo Bonzini wrote: > On 02/10/19 12:22, Alex Bennée wrote: > > Some of the cross compilers rightly complain there are cases where ret > > may not be set. 0 seems to be the reasonable default unless particular > > slot explicitly returns -1. > > Even Cov

Re: [PATCH] virtio: Fix virtio_mmio_read()/virtio_mmio_write()

2021-03-19 Thread Stefano Garzarella
c64le). Signed-off-by: Laurent Vivier --- hw/virtio/virtio-mmio.c | 74 + 1 file changed, 52 insertions(+), 22 deletions(-) Reviewed-by: Stefano Garzarella

Re: [Qemu-devel] [PULL 18/76] optionrom: add new PVH option rom

2021-03-19 Thread Stefano Garzarella
On Fri, Mar 19, 2021 at 03:06:25PM +0100, Philippe Mathieu-Daudé wrote: Hi Stefano, On 2/5/19 7:14 PM, Paolo Bonzini wrote: From: Stefano Garzarella The new pvh.bin option rom can be used with SeaBIOS to boot uncompressed kernel using the x86/HVM direct boot ABI. pvh.S contains the entry

Re: [Qemu-devel] [PULL 18/76] optionrom: add new PVH option rom

2021-03-19 Thread Stefano Garzarella
On Fri, Mar 19, 2021 at 03:06:25PM +0100, Philippe Mathieu-Daudé wrote: Hi Stefano, On 2/5/19 7:14 PM, Paolo Bonzini wrote: From: Stefano Garzarella The new pvh.bin option rom can be used with SeaBIOS to boot uncompressed kernel using the x86/HVM direct boot ABI. pvh.S contains the entry

Re: [Qemu-devel] [PULL 18/76] optionrom: add new PVH option rom

2021-03-19 Thread Stefano Garzarella
On Fri, Mar 19, 2021 at 06:03:59PM +0100, Paolo Bonzini wrote: On 19/03/21 15:06, Philippe Mathieu-Daudé wrote: + +/* Search RSDP signature. */ +static uintptr_t search_rsdp(uint32_t start_addr, uint32_t end_addr) +{ +uint64_t *rsdp_p; + +/* RSDP signature is always on a 16 byte boundary

Re: [Qemu-devel] [PULL 18/76] optionrom: add new PVH option rom

2021-03-19 Thread Stefano Garzarella
uint64_t rsdp_signature = RSDP_SIGNATURE; | Using gcc (GCC) 10.2.1 20201125 (Red Hat 10.2.1-9) I don't have it. It seems a bit strange, I don't know if it's related to the fact that we compile with -m16, I'll check better. Thanks, Stefano Paolo Il ven 19 mar

Re: [Qemu-devel] [PULL 18/76] optionrom: add new PVH option rom

2021-03-19 Thread Stefano Garzarella
On Fri, Mar 19, 2021 at 7:20 PM Stefano Garzarella wrote: > > On Fri, Mar 19, 2021 at 06:52:39PM +0100, Paolo Bonzini wrote: > >It's likely that the compiler will online it. But indeed it's better to add > >-minline-all-stringops to the compiler command line. > >

Re: [Qemu-devel] [PULL 18/76] optionrom: add new PVH option rom

2021-03-22 Thread Stefano Garzarella
On Fri, Mar 19, 2021 at 7:25 PM Stefano Garzarella wrote: > > On Fri, Mar 19, 2021 at 7:20 PM Stefano Garzarella > wrote: > > > > On Fri, Mar 19, 2021 at 06:52:39PM +0100, Paolo Bonzini wrote: > > >It's likely that the compiler will online it. But indeed i

[PATCH] optionrom/pvh: use memcmp() to find the RSDP signature

2021-03-22 Thread Stefano Garzarella
is baremetal, we use the compiler's __builtin_memcmp. Reported-by: Philippe Mathieu-Daudé Suggested-by: Paolo Bonzini Signed-off-by: Stefano Garzarella --- pc-bios/optionrom/pvh_main.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/pc-bios/optionrom/

Re: [PATCH] optionrom/pvh: use memcmp() to find the RSDP signature

2021-03-22 Thread Stefano Garzarella
On Mon, Mar 22, 2021 at 02:15:26PM +0100, Philippe Mathieu-Daudé wrote: On 3/22/21 12:48 PM, Stefano Garzarella wrote: New versions of gcc report a potential error and there may be alignment issues using uint64_t pointer to check the RSDP signature: gcc 10.2.1 "cc (Alpine 10.2.1

Re: [Qemu-devel] [PULL 18/76] optionrom: add new PVH option rom

2021-03-22 Thread Stefano Garzarella
On Mon, Mar 22, 2021 at 12:52:37PM +0100, Paolo Bonzini wrote: On 22/03/21 11:59, Stefano Garzarella wrote: If I build with gcc 10.2.1 20210313 (Alpine 10.2.1_pre2) uint64_t and UINT64_C(1) have a size of 4 bytes, while UINT64_C(0x2052545020445352) has a size of 8 bytes: warning

[PATCH v2 1/2] optionrom: add memcmp() implementation

2021-03-23 Thread Stefano Garzarella
Provide memcmp() implementation that can be used by optionroms. Signed-off-by: Stefano Garzarella --- pc-bios/optionrom/optrom.h | 15 +++ 1 file changed, 15 insertions(+) diff --git a/pc-bios/optionrom/optrom.h b/pc-bios/optionrom/optrom.h index 357819259a..b98436e413 100644 --- a

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