Re: [Virtio-fs] [PATCH v1 5/9] hw/virtio: introduce virtio_device_should_start

2022-11-22 Thread Christian Borntraeger
Am 21.11.22 um 23:37 schrieb Michael S. Tsirkin: [...] qemu-system-x86_64: ../hw/virtio/vhost-vsock-common.c:203: vhost_vsock_common_pre_save: Assertion `!vhost_dev_is_started(>vhost_dev)' failed. 2022-11-15 16:38:46.096+: shutting down, reason=crashed Alex were you able to replicate?

Re: [Virtio-fs] [PATCH] vhost: mask VIRTIO_F_RING_RESET for vhost and vhost-user devices

2022-11-22 Thread Eugenio Perez Martin
On Tue, Nov 22, 2022 at 4:13 AM Jason Wang wrote: > > On Mon, Nov 21, 2022 at 6:11 PM Stefano Garzarella > wrote: > > > > Commit 69e1c14aa2 ("virtio: core: vq reset feature negotation support") > > enabled VIRTIO_F_RING_RESET by default for all virtio devices. > > > > This feature is not

Re: [Virtio-fs] [PATCH] cleanup: Tweak and re-run return_directly.cocci

2022-11-22 Thread Peter Maydell
On Tue, 22 Nov 2022 at 15:04, Philippe Mathieu-Daudé wrote: > > On 21/11/22 17:42, Max Filippov wrote: > > On Mon, Nov 21, 2022 at 6:01 AM Markus Armbruster wrote: > >> .../xtensa/core-dsp3400/xtensa-modules.c.inc | 136 +- > >> target/xtensa/core-lx106/xtensa-modules.c.inc |

Re: [Virtio-fs] [PATCH v2 1/2] cleanup: Tweak and re-run return_directly.cocci

2022-11-22 Thread Philippe Mathieu-Daudé
On 22/11/22 14:49, Markus Armbruster wrote: Tweak the semantic patch to drop redundant parenthesis around the return expression. Coccinelle drops a comment in hw/rdma/vmw/pvrdma_cmd.c; restored manually. Coccinelle messes up vmdk_co_create(), not sure why. Change dropped, will be done

Re: [Virtio-fs] [PATCH v2 2/2] block/vmdk: Simplify vmdk_co_create() to return directly

2022-11-22 Thread Philippe Mathieu-Daudé
On 22/11/22 14:49, Markus Armbruster wrote: Cc: Fam Zheng Cc: Kevin Wolf Cc: Hanna Reitz Cc: qemu-bl...@nongnu.org Signed-off-by: Markus Armbruster --- block/vmdk.c | 28 +++- 1 file changed, 11 insertions(+), 17 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [Virtio-fs] [PATCH] cleanup: Tweak and re-run return_directly.cocci

2022-11-22 Thread Philippe Mathieu-Daudé
On 21/11/22 17:42, Max Filippov wrote: On Mon, Nov 21, 2022 at 6:01 AM Markus Armbruster wrote: .../xtensa/core-dsp3400/xtensa-modules.c.inc | 136 +- target/xtensa/core-lx106/xtensa-modules.c.inc | 16 +-- These files are generated and were imported from xtensa

Re: [Virtio-fs] [PATCH] cleanup: Tweak and re-run return_directly.cocci

2022-11-22 Thread Philippe Mathieu-Daudé
On 22/11/22 09:58, Markus Armbruster wrote: Thomas Huth writes: On 21/11/2022 17.32, Markus Armbruster wrote: Philippe Mathieu-Daudé writes: On 21/11/22 15:36, Peter Maydell wrote: On Mon, 21 Nov 2022 at 14:03, Markus Armbruster wrote: Tweak the semantic patch to drop redundant

Re: [Virtio-fs] [PATCH v2 2/2] block/vmdk: Simplify vmdk_co_create() to return directly

2022-11-22 Thread Peter Maydell
On Tue, 22 Nov 2022 at 13:51, Markus Armbruster wrote: > > Cc: Fam Zheng > Cc: Kevin Wolf > Cc: Hanna Reitz > Cc: qemu-bl...@nongnu.org > Signed-off-by: Markus Armbruster > --- > block/vmdk.c | 28 +++- > 1 file changed, 11 insertions(+), 17 deletions(-) >

[Virtio-fs] [PATCH v2 1/2] cleanup: Tweak and re-run return_directly.cocci

2022-11-22 Thread Markus Armbruster
Tweak the semantic patch to drop redundant parenthesis around the return expression. Coccinelle drops a comment in hw/rdma/vmw/pvrdma_cmd.c; restored manually. Coccinelle messes up vmdk_co_create(), not sure why. Change dropped, will be done manually in the next commit. Line breaks in

[Virtio-fs] [PATCH v2 0/2] cleanup: Tweak and re-run return_directly.cocci

2022-11-22 Thread Markus Armbruster
Markus Armbruster (2): cleanup: Tweak and re-run return_directly.cocci block/vmdk: Simplify vmdk_co_create() to return directly scripts/coccinelle/return_directly.cocci | 5 +-- include/hw/pci/pci.h | 7 +-- target/avr/cpu.h | 4 +- block/vmdk.c

[Virtio-fs] [PATCH v2 2/2] block/vmdk: Simplify vmdk_co_create() to return directly

2022-11-22 Thread Markus Armbruster
Cc: Fam Zheng Cc: Kevin Wolf Cc: Hanna Reitz Cc: qemu-bl...@nongnu.org Signed-off-by: Markus Armbruster --- block/vmdk.c | 28 +++- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/block/vmdk.c b/block/vmdk.c index 26376352b9..bac3d8db50 100644 ---

Re: [Virtio-fs] [PATCH] cleanup: Tweak and re-run return_directly.cocci

2022-11-22 Thread Peter Maydell
On Tue, 22 Nov 2022 at 13:27, Markus Armbruster wrote: > > Peter Maydell writes: > > The obvious answer is "you might have got your manual tweaking > > wrong". A purely mechanised patch I can review by looking at > > the script and maybe eyeballing a few instances of the change; > > a change

Re: [Virtio-fs] [PATCH] cleanup: Tweak and re-run return_directly.cocci

2022-11-22 Thread Markus Armbruster
Peter Maydell writes: > On Tue, 22 Nov 2022 at 08:58, Markus Armbruster wrote: >> I don't think complete detailed review is necessary or even sensible. >> >> Review should start with the Coccinelle script: >> >> // replace 'R = X; return R;' with 'return X;' >> @@ >> identifier VAR;

Re: [Virtio-fs] [PATCH] cleanup: Tweak and re-run return_directly.cocci

2022-11-22 Thread Peter Maydell
On Tue, 22 Nov 2022 at 08:58, Markus Armbruster wrote: > I don't think complete detailed review is necessary or even sensible. > > Review should start with the Coccinelle script: > > // replace 'R = X; return R;' with 'return X;' > @@ > identifier VAR; > expression E; > type

[Virtio-fs] [PULL 1/8] vhost: mask VIRTIO_F_RING_RESET for vhost and vhost-user devices

2022-11-22 Thread Michael S. Tsirkin
From: Stefano Garzarella Commit 69e1c14aa2 ("virtio: core: vq reset feature negotation support") enabled VIRTIO_F_RING_RESET by default for all virtio devices. This feature is not currently emulated by QEMU, so for vhost and vhost-user devices we need to make sure it is supported by the

Re: [Virtio-fs] [PATCH] cleanup: Tweak and re-run return_directly.cocci

2022-11-22 Thread Markus Armbruster
Thomas Huth writes: > On 21/11/2022 17.32, Markus Armbruster wrote: >> Philippe Mathieu-Daudé writes: >> >>> On 21/11/22 15:36, Peter Maydell wrote: On Mon, 21 Nov 2022 at 14:03, Markus Armbruster wrote: > > Tweak the semantic patch to drop redundant parenthesis around the >