[PATCH v11 08/11] virtio-sound: handle VIRTIO_SND_R_PCM_RELEASE

2023-10-11 Thread Manos Pitsidianakis
From: Emmanouil Pitsidianakis Handle the PCM release control request, which is necessary for flushing pending sound IO. No IO is handled yet so currently it only replies to the request. Based-on: https://github.com/OpenSynergy/qemu/commit/5a2f350eec5d157b90d9c7b40a8e603f4da92471 Signed-off-by:

[PATCH v11 11/11] docs/system: add basic virtio-snd documentation

2023-10-11 Thread Manos Pitsidianakis
(new) | 49 3 files changed, 51 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 701f12026a..a32e512a61 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2259,6 +2259,7 @@ M: Manos Pitsidianakis S: Supported F: hw/virtio/virtio-snd*.c F: include/hw/virtio/virtio

[PATCH v11 10/11] virtio-sound: implement audio capture (RX)

2023-10-11 Thread Manos Pitsidianakis
From: Emmanouil Pitsidianakis To perform audio capture we duplicate the TX logic of the previous commit with the following difference: we receive data from the QEMU audio backend and write it in the virt queue IO buffers the guest sends to QEMU. When they are full (i.e. they have `period_bytes`

[PATCH v11 01/11] Add virtio-sound device stub

2023-10-11 Thread Manos Pitsidianakis
/virtio-mem-pci.c F: include/hw/virtio/virtio-mem.h +virtio-snd +M: Manos Pitsidianakis +S: Supported +F: hw/virtio/virtio-snd*.c +F: include/hw/virtio/virtio-snd.h + nvme M: Keith Busch M: Klaus Jensen diff --git a/hw/virtio/Kconfig b/hw/virtio/Kconfig index 92c9cf6c96..d6f20657b3 100644

[PATCH v11 02/11] Add virtio-sound-pci device

2023-10-11 Thread Manos Pitsidianakis
From: Emmanouil Pitsidianakis This patch adds a PCI wrapper device for the virtio-sound device. It is necessary to instantiate a virtio-snd device in a guest. All sound logic will be added to the virtio-snd device in the following commits. To add this device with a guest, you'll need a >=5.13

[PATCH v11 00/11] Add VIRTIO sound card

2023-10-11 Thread Manos Pitsidianakis
From: Emmanouil Pitsidianakis This patch series adds an audio device implementing the recent virtio sound spec (1.2) and a corresponding PCI wrapper device. v11 can be found online at: https://gitlab.com/epilys/qemu/-/tree/virtio-snd-v11 Ref 885b01fe272541fdab5583780d4c3a59bfd8e734 Main

Re: [PATCH v4 6/6] docs/system: add a basic enumeration of vhost-user devices

2023-10-09 Thread Manos Pitsidianakis
On Mon, 09 Oct 2023 12:59, Alex Bennée wrote: diff --git a/docs/system/devices/vhost-user.rst b/docs/system/devices/vhost-user.rst index a80e95a48a..0f9eec3f00 100644 --- a/docs/system/devices/vhost-user.rst +++ b/docs/system/devices/vhost-user.rst @@ -15,6 +15,47 @@ to the guest. The code is

Re: [PATCH v4 2/6] hw/virtio: derive vhost-user-rng from vhost-user-base

2023-10-09 Thread Manos Pitsidianakis
On Mon, 09 Oct 2023 12:59, Alex Bennée wrote: diff --git a/hw/virtio/meson.build b/hw/virtio/meson.build index 51c3f97c2d..d0b963199c 100644 --- a/hw/virtio/meson.build +++ b/hw/virtio/meson.build @@ -18,8 +18,15 @@ if have_vhost # fixme - this really should be generic

Re: [PATCH v7 3/5] vhost-user-scsi: support reconnect to backend

2023-10-08 Thread Manos Pitsidianakis
Hello Li, I have some trivial style comments you could possibly address in a next version: On Sun, 08 Oct 2023 12:12, Li Feng wrote: diff --git a/hw/scsi/vhost-user-scsi.c b/hw/scsi/vhost-user-scsi.c index df6b66cc1a..5df24faff4 100644 --- a/hw/scsi/vhost-user-scsi.c +++

Re: [PATCH v10 00/11] Add VIRTIO sound card

2023-10-03 Thread Manos Pitsidianakis
On Tue, 03 Oct 2023 17:10, "Michael S. Tsirkin" wrote: I hope you are also fixing the linux driver to fix this in a robust way, yes? Hello Michael, You can find pertinent discussion on the virtio-comment list here:

Re: [PATCH v10 09/11] virtio-sound: implement audio output (TX)

2023-09-29 Thread Manos Pitsidianakis
On Fri, 29 Sep 2023 17:08, Emmanouil Pitsidianakis wrote: Handle output IO messages in the transmit (TX) virtqueue. [..] +if (!stream->active) { +/* Stream has stopped, so do not perform AUD_write. */ +goto return_tx_buffer; +} [..]

Re: [PATCH v9 00/12] Add VIRTIO sound card

2023-09-14 Thread Manos Pitsidianakis
On Thu, 14 Sep 2023 12:54, Stefano Garzarella wrote: We are seeing something strange with the virtio-sound Linux driver. It seems that the driver modifies the buffers after exposing them to the device via the avail ring. I need more information about this bug. What is the unexpected behavior

Re: [PATCH v8 03/12] virtio-sound: handle control messages and streams

2023-09-04 Thread Manos Pitsidianakis
On Mon, 04 Sep 2023 14:30, Philippe Mathieu-Daudé wrote: On 4/9/23 13:00, Manos Pitsidianakis wrote: On Mon, 04 Sep 2023 13:46, Philippe Mathieu-Daudé wrote: +    size_t sz = iov_to_buf(cmd->elem->out_sg, +   cmd->elem->out_num, +

Re: [PATCH v8 03/12] virtio-sound: handle control messages and streams

2023-09-04 Thread Manos Pitsidianakis
On Mon, 04 Sep 2023 13:46, Philippe Mathieu-Daudé wrote: +size_t sz = iov_to_buf(cmd->elem->out_sg, + cmd->elem->out_num, + 0, + >ctrl, + sizeof(cmd->ctrl)); +if (sz !=

Re: [PATCH v8 10/12] virtio-sound: implement audio output (TX)

2023-09-04 Thread Manos Pitsidianakis
On Mon, 04 Sep 2023 13:26, Philippe Mathieu-Daudé wrote: /* - * Handles VIRTIO_SND_R_PCM_RELEASE. Releases the buffer resources allocated to - * a stream. + * Returns the number of I/O messages that are being processed. + * + * @stream: VirtIOSoundPCMStream + */ +static size_t

Re: [PATCH v8 02/12] Add virtio-sound-pci device

2023-09-04 Thread Manos Pitsidianakis
On Mon, 04 Sep 2023 09:32, Volker Rümelin wrote: +static Property virtio_snd_pci_properties[] = { +DEFINE_AUDIO_PROPERTIES(VirtIOSoundPCI, vdev.card), I think DEFINE_AUDIO_PROPERTIES should be moved back to virtio-snd.c. The audiodev property is a virtio-sound property and not a

Re: [PATCH v8 05/12] virtio-sound: handle VIRTIO_SND_R_PCM_INFO request

2023-09-04 Thread Manos Pitsidianakis
On Mon, 04 Sep 2023 13:13, Philippe Mathieu-Daudé wrote: + +pcm_info = g_new0(virtio_snd_pcm_info, req.count); +for (uint32_t i = req.start_id; i < req.start_id + req.count; i++) { Starting from req.start_id seems to increase this code complexity. I see your point, will change it!

Re: [PATCH v8 03/12] virtio-sound: handle control messages and streams

2023-09-04 Thread Manos Pitsidianakis
Good morning Philippe, On Mon, 04 Sep 2023 13:08, Philippe Mathieu-Daudé wrote: +iov_from_buf(cmd->elem->in_sg, + cmd->elem->in_num, + 0, + >resp, + sizeof(cmd->resp)); +virtqueue_push(cmd->vq, cmd->elem,

Re: [PATCH v8 00/12] Add VIRTIO sound card

2023-09-04 Thread Manos Pitsidianakis
Hello Volker :) On Mon, 04 Sep 2023 10:20, Volker Rümelin wrote: All qemu_log_mask() format strings need a trailing \n. Thank you, will fix it! I still hear a lot of playback dropouts. I had planned to look at the playback code, but I didn't have the time until now. Compared to v6 audio

Re: [PATCH v7 10/12] virtio-sound: implement audio output (TX)

2023-08-23 Thread Manos Pitsidianakis
Hello Philippe, On Wed, 23 Aug 2023 01:17, Philippe Mathieu-Daudé wrote: +trace_virtio_snd_handle_xfer(); Maybe ... <- snip -> ... it is more useful displaying the callback stream index here? trace_virtio_snd_handle_xfer(hdr.stream_id); Certainly, why not. This is an

Re: [PATCH v6 00/12] Add VIRTIO sound card

2023-08-21 Thread Manos Pitsidianakis
Hello Volker, On Sun, 20 Aug 2023 14:46, Volker Rümelin wrote: I tested the virtio-sound-pci device. It seems the device works unreliably. Audio playback has a lot of dropouts. I can actually hear my mouse moving around. Audio recording with audacity doesn't work. Either recording stops with

Re: [PATCH v6 01/12] Add virtio-sound device stub

2023-08-21 Thread Manos Pitsidianakis
Hello Volker! On Sun, 20 Aug 2023 12:33, Volker Rümelin wrote: I think the virtio-snd.c code, the trace events and the Kconfig VIRTIO_SND should be moved to hw/audio. The code for nearly all audio devices is in this directory. This would be similar to other virtio devices. E.g. the

Re: [PATCH v5 9/9] docs/system: add basic virtio-gpu documentation

2023-08-15 Thread Manos Pitsidianakis
Reviewed-by: Emmanouil Pitsidianakis On Tue, 15 Aug 2023 03:35, Gurchetan Singh wrote: This adds basic documentation for virtio-gpu. Suggested-by: Akihiko Odaki Signed-off-by: Gurchetan Singh --- v2: - Incorporated suggestions by Akihiko Odaki - Listed the currently supported

Re: [PATCH v5 8/9] gfxstream + rutabaga: enable rutabaga

2023-08-15 Thread Manos Pitsidianakis
Reviewed-by: Emmanouil Pitsidianakis Tested-by: Emmanouil Pitsidianakis On Tue, 15 Aug 2023 03:35, Gurchetan Singh wrote: This change enables rutabaga to receive virtio-gpu-3d hypercalls when it is active. Signed-off-by: Gurchetan Singh Tested-by: Alyssa Ross --- v3: Whitespace fix

Re: [PATCH v5 7/9] gfxstream + rutabaga: meson support

2023-08-15 Thread Manos Pitsidianakis
Reviewed-by: Emmanouil Pitsidianakis Tested-by: Emmanouil Pitsidianakis On Tue, 15 Aug 2023 03:35, Gurchetan Singh wrote: - Add meson detection of rutabaga_gfx - Build virtio-gpu-rutabaga.c + associated vga/pci files when present Signed-off-by: Gurchetan Singh Tested-by: Alyssa Ross ---

Re: [PATCH v5 6/9] gfxstream + rutabaga: add initial support for gfxstream

2023-08-15 Thread Manos Pitsidianakis
Reviewed-by: Emmanouil Pitsidianakis Tested-by: Emmanouil Pitsidianakis On Tue, 15 Aug 2023 03:35, Gurchetan Singh wrote: This adds initial support for gfxstream and cross-domain. Both features rely on virtio-gpu blob resources and context types, which are also implemented in this patch.

Re: [PATCH v5 5/9] gfxstream + rutabaga prep: added need defintions, fields, and options

2023-08-15 Thread Manos Pitsidianakis
On Tue, 15 Aug 2023 03:35, Gurchetan Singh wrote: This modifies the common virtio-gpu.h file have the fields and defintions needed by gfxstream/rutabaga, by VirtioGpuRutabaga. The command to run these would be: Signed-off-by: Gurchetan Singh Tested-by: Alyssa Ross --- -device

Re: [PATCH v5 4/9] virtio-gpu: blob prep

2023-08-15 Thread Manos Pitsidianakis
Reviewed-by: Emmanouil Pitsidianakis Tested-by: Emmanouil Pitsidianakis On Tue, 15 Aug 2023 03:35, Gurchetan Singh wrote: From: Antonio Caggiano This adds preparatory functions needed to: - decode blob cmds - tracking iovecs Signed-off-by: Antonio Caggiano Signed-off-by: Dmitry

Re: [PATCH v5 3/9] virtio-gpu: hostmem

2023-08-15 Thread Manos Pitsidianakis
Reviewed-by: Emmanouil Pitsidianakis Tested-by: Emmanouil Pitsidianakis On Tue, 15 Aug 2023 03:35, Gurchetan Singh wrote: From: Gerd Hoffmann Use VIRTIO_GPU_SHM_ID_HOST_VISIBLE as id for virtio-gpu. Signed-off-by: Antonio Caggiano Tested-by: Alyssa Ross Acked-by: Michael S. Tsirkin ---

Re: [RFC v4 11/11] docs/user: Add doc for native library calls

2023-08-09 Thread Manos Pitsidianakis
On Tue, 08 Aug 2023 16:17, Yeqi Fu wrote: +arm and aarch64 +--- +HLT is an invalid instruction for userspace and usefully has 16 +bits of spare immeadiate data which we can stuff data in. s/immeadiate/immediate With that fix, you can add Reviewed-by: Emmanouil Pitsidianakis

Re: [RFC v4 01/11] build: Implement logic for sharing cross-building config files

2023-08-09 Thread Manos Pitsidianakis
This patch needs a detailed commit message, since it's not obvious why these changes are made at all. It'd also be helpful for reviewing. General style comment for shell scripts: Always put curly braces around variables even if they are unnecessary. a $source_path could become

Re: [PATCH v3 1/3] qmp: remove virtio_list, search QOM tree instead

2023-08-03 Thread Manos Pitsidianakis
On Thu, 03 Aug 2023 17:54, Jonah Palmer wrote: -VirtioInfoList *qmp_x_query_virtio(Error **errp) +static int query_dev_child(Object *child, void *opaque) { -VirtioInfoList *list = NULL; -VirtioInfo *node; -VirtIODevice *vdev; +VirtioInfoList **vdevs = opaque; +Object *dev =

Re: [PATCH v3 2/3] qmp: update virtio feature maps, vhost-user-gpio introspection

2023-08-03 Thread Manos Pitsidianakis
On Thu, 03 Aug 2023 17:54, Jonah Palmer wrote: Add new virtio transport feature to transport feature map: - VIRTIO_F_RING_RESET Add new vhost-user protocol feature to vhost-user protocol feature map and enumeration: - VHOST_USER_PROTOCOL_F_STATUS Add new virtio device features for several

Re: [PATCH v3 3/3] vhost-user: move VhostUserProtocolFeature definition to header file

2023-08-03 Thread Manos Pitsidianakis
On Thu, 03 Aug 2023 17:55, Jonah Palmer wrote: Move the definition of VhostUserProtocolFeature to include/hw/virtio/vhost-user.h. Remove previous definitions in hw/scsi/vhost-user-scsi.c, hw/virtio/vhost-user.c, and hw/virtio/virtio-qmp.c. Previously there were 3 separate definitions of this

Re: [PATCH v5 05/12] virtio-sound: prepare PCM streams

2023-07-29 Thread Manos Pitsidianakis
On Sat, 29 Jul 2023 14:00, Marc-André Lureau wrote: + +s->pcm->streams[stream_id] = stream; Same remark as v4: Shouldn't it close & free the existing stream? Or return an error? Hello, yes you are correct. I missed that comment on the v4 reviews :) Will send a v6 with a fix, I will

[PATCH v3 1/3] Add virtio-sound device

2023-07-18 Thread Manos Pitsidianakis
..2bed60f9c1 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2245,6 +2245,12 @@ F: hw/virtio/virtio-mem-pci.h F: hw/virtio/virtio-mem-pci.c F: include/hw/virtio/virtio-mem.h +virtio-snd +M: Manos Pitsidianakis +S: Supported +F: hw/virtio/virtio-snd*.c +F: include/hw/virtio/virtio-snd.h + nvme M: Keith

[PATCH v3 3/3] Implement audio capture in virtio-snd device

2023-07-18 Thread Manos Pitsidianakis
Signed-off-by: Emmanouil Pitsidianakis --- hw/virtio/trace-events | 3 +- hw/virtio/virtio-snd.c | 238 +++-- 2 files changed, 205 insertions(+), 36 deletions(-) diff --git a/hw/virtio/trace-events b/hw/virtio/trace-events index 8f3953dc28..3e7b259aef

[PATCH v3 2/3] Add virtio-sound-pci device

2023-07-18 Thread Manos Pitsidianakis
This patch adds a PCI wrapper device for the virtio-sound device. To test this, you'll need a >=5.13 kernel compiled with CONFIG_SND_VIRTIO=y, which at the time of writing most distros have off by default. Use with following flags in the invocation: -device

[PATCH v3 0/3] Add VIRTIO sound card

2023-07-18 Thread Manos Pitsidianakis
This patch series adds an audio device implementing the recent virtio sound spec (1.2) and a corresponding PCI wrapper device. Main differences with v2 patch : - Addressed review comments. Manos Pitsidianakis (3): Add virtio-sound device Add virtio-sound-pci device Implement audio

Re: [PATCH v2 0/3] Add VIRTIO sound card

2023-07-13 Thread Manos Pitsidianakis
Ping Patch series on patchew: https://patchew.org/QEMU/cover.1686238728.git.manos.pitsidiana...@linaro.org/ Patch series on lore: https://lore.kernel.org/qemu-devel/cover.1686238728.git.manos.pitsidiana...@linaro.org/ On Thu, 08 Jun 2023 18:56, Manos Pitsidianakis wrote: This patch series

[PATCH] vhost-user: fully use new backend/frontend naming

2023-06-13 Thread Manos Pitsidianakis
Slave/master nomenclature was replaced with backend/frontend in commit 1fc19b65279a246083fc4d918510aae68586f734 vhost-user: Adopt new backend naming This patch replaces all remaining uses of master and slave in the codebase. Signed-off-by: Emmanouil Pitsidianakis ---

Re: [RFC v2 6/6] linux-user: Add '-native-bypass' option

2023-06-08 Thread Manos Pitsidianakis
On Wed, 07 Jun 2023 19:47, Yeqi Fu wrote: --- a/linux-user/main.c +++ b/linux-user/main.c +/* Set the library for native bypass */ +if (native_lib != NULL) { +char *token = malloc(strlen(native_lib) + 12); malloc() can fail (in rare circumstances). Check for the return value

Re: [RFC v2 1/6] build: Add configure options for native calls

2023-06-08 Thread Manos Pitsidianakis
On Wed, 07 Jun 2023 19:47, Yeqi Fu wrote: +have_user_native_call = get_option('user_native_call') \ +.require(have_user, error_message: 'user_native_call requires user') \ +.require(targetos == 'linux', error_message: 'user_native_call requires Linux') \ +.allowed() Is there a

[PATCH v2 3/3] Implement audio capture in virtio-snd device

2023-06-08 Thread Manos Pitsidianakis
Signed-off-by: Emmanouil Pitsidianakis --- hw/virtio/trace-events | 3 +- hw/virtio/virtio-snd.c | 239 +++-- 2 files changed, 206 insertions(+), 36 deletions(-) diff --git a/hw/virtio/trace-events b/hw/virtio/trace-events index b77d78abdc..b58c007297

[PATCH v2 1/3] Add virtio-sound device

2023-06-08 Thread Manos Pitsidianakis
+++ b/MAINTAINERS @@ -2218,6 +2218,12 @@ F: hw/virtio/virtio-mem-pci.h F: hw/virtio/virtio-mem-pci.c F: include/hw/virtio/virtio-mem.h +virtio-snd +M: Manos Pitsidianakis +S: Supported +F: hw/virtio/virtio-snd*.c +F: include/hw/virtio/virtio-snd.h + nvme M: Keith Busch M: Klaus Jensen

[PATCH v2 0/3] Add VIRTIO sound card

2023-06-08 Thread Manos Pitsidianakis
audio capture support Known problems (On pipewire at least): - Stereo recording results in one channel with the recording + a ticking kind of artifact and one channel that has no artifacts, just the recording. Manos Pitsidianakis (3): Add virtio-sound device Add virtio-sound-pci

[PATCH v2 2/3] Add virtio-sound-pci device

2023-06-08 Thread Manos Pitsidianakis
This patch adds a PCI wrapper device for the virtio-sound device. To test this, you'll need a >=5.13 kernel compiled with CONFIG_SND_VIRTIO=y, which at the time of writing most distros have off by default. Use with following flags in the invocation: -device virtio-sound-pci,disable-legacy=on

Re: [PATCH] Add virtio-sound and virtio-sound-pci devices

2023-06-02 Thread Manos Pitsidianakis
On Wed, 31 May 2023 12:36, Alex Bennée wrote: If it's based of shouldn't we keep the author attribution and their original s-o-b? I kept the Copyright in the headers but not the Signed-off-by lines, I'll add them in v2. What about:

[PATCH] Add virtio-sound and virtio-sound-pci devices

2023-05-26 Thread Manos Pitsidianakis
This patch adds an audio device implementing the recent virtio sound spec (1.2) and a corresponding PCI wrapper device. PCM functionality is implemented, and jack[0], chmaps[1] messages are at the moment ignored. To test this, you'll need a >6.0 kernel compiled with the virtio-snd flag enabled,

Re: [Qemu-devel] Throttling filter node status?

2018-02-08 Thread Manos Pitsidianakis
On Wed, Feb 07, 2018 at 06:35:20PM +, Stefan Hajnoczi wrote: Hi Manos, I hope you're doing well and that you've had a good time at university after Google Summer of Code. Do you have time to work on getting the remainder of your GSoC work merged over the coming weeks? If not, don't feel

Re: [Qemu-devel] [Qemu-block] [PATCH v2] throttle: fix a qemu crash problem when calling blk_delete

2017-11-07 Thread Manos Pitsidianakis
On Fri, Nov 03, 2017 at 02:26:33PM +, Stefan Hajnoczi wrote: On Wed, Oct 25, 2017 at 10:40:47AM +0200, Alberto Garcia wrote: On Tue 24 Oct 2017 05:33:51 AM CEST, sochin jiang wrote: > --- a/block/throttle-groups.c > +++ b/block/throttle-groups.c > @@ -576,7 +576,9 @@ void

Re: [Qemu-devel] [PATCH v13 2/6] qmp: Use ThrottleLimits structure

2017-11-06 Thread Manos Pitsidianakis
On Fri, Oct 13, 2017 at 09:26:17AM -0500, Eric Blake wrote: [adding Markus, and block list] On 10/13/2017 09:16 AM, Alberto Garcia wrote: On Mon 02 Oct 2017 04:33:28 PM CEST, Pradeep Jagadeesh wrote: This patch factors out code to use the ThrottleLimits structure. { 'struct':

Re: [Qemu-devel] [Qemu-block] [PATCH RFC] block: add block-insert-node QMP command

2017-10-06 Thread Manos Pitsidianakis
On Fri, Oct 06, 2017 at 02:59:55PM +0200, Max Reitz wrote: On 2017-10-04 23:04, Manos Pitsidianakis wrote: On Wed, Oct 04, 2017 at 08:09:24PM +0200, Max Reitz wrote: On 2017-10-04 19:05, Manos Pitsidianakis wrote: On Wed, Oct 04, 2017 at 02:49:27PM +0200, Max Reitz wrote: On 2017-08-15 09:45

Re: [Qemu-devel] [Qemu-block] [PATCH RFC] block: add block-insert-node QMP command

2017-10-04 Thread Manos Pitsidianakis
On Wed, Oct 04, 2017 at 08:09:24PM +0200, Max Reitz wrote: On 2017-10-04 19:05, Manos Pitsidianakis wrote: On Wed, Oct 04, 2017 at 02:49:27PM +0200, Max Reitz wrote: On 2017-08-15 09:45, Manos Pitsidianakis wrote: block-insert-node and its pair command block-remove-node provide runtime

Re: [Qemu-devel] [Qemu-block] [PATCH RFC] block: add block-insert-node QMP command

2017-10-04 Thread Manos Pitsidianakis
On Wed, Oct 04, 2017 at 02:49:27PM +0200, Max Reitz wrote: On 2017-08-15 09:45, Manos Pitsidianakis wrote: block-insert-node and its pair command block-remove-node provide runtime insertion and removal of filter nodes. block-insert-node takes a (parent, child) and (node, child) pair of edges

Re: [Qemu-devel] [PATCH RFC] block: add block-insert-node QMP command

2017-10-04 Thread Manos Pitsidianakis
On Fri, Sep 29, 2017 at 07:52:35PM +0200, Kevin Wolf wrote: Am 15.08.2017 um 09:45 hat Manos Pitsidianakis geschrieben: block-insert-node and its pair command block-remove-node provide runtime insertion and removal of filter nodes. block-insert-node takes a (parent, child) and (node, child

Re: [Qemu-devel] [PATCH v3 0/3] add bdrv_co_drain_begin/end BlockDriver callbacks

2017-09-26 Thread Manos Pitsidianakis
On Tue, Sep 26, 2017 at 12:00:24PM +0100, Stefan Hajnoczi wrote: On Sat, Sep 23, 2017 at 02:14:08PM +0300, Manos Pitsidianakis wrote: This patch series renames bdrv_co_drain to bdrv_co_drain_begin and adds a new bdrv_co_drain_end callback to match bdrv_drained_begin/end and drained_begin/end

Re: [Qemu-devel] [PATCH v2 1/4] qom: provide root container for internal objs

2017-09-25 Thread Manos Pitsidianakis
On Mon, Sep 25, 2017 at 04:14:26PM +0800, Peter Xu wrote: On Mon, Sep 25, 2017 at 09:14:21AM +0200, Andreas Färber wrote: Am 25.09.2017 um 08:37 schrieb Peter Xu: > We have object_get_objects_root() to keep user created objects, however > no place for objects that will be used internally.

[Qemu-devel] [PATCH v3 2/3] block: rename bdrv_co_drain to bdrv_co_drain_begin

2017-09-23 Thread Manos Pitsidianakis
Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com> Reviewed-by: Fam Zheng <f...@redhat.com> Signed-off-by: Manos Pitsidianakis <el13...@mail.ntua.gr> --- include/block/block_int.h | 4 ++-- block/io.c| 4 ++-- block/qed.c | 6 +++--- 3 files cha

[Qemu-devel] [PATCH v3 0/3] add bdrv_co_drain_begin/end BlockDriver callbacks

2017-09-23 Thread Manos Pitsidianakis
oc comment based on mailing discussion v2: add doc for callbacks and change order of request polling for completion [Stefan] Manos Pitsidianakis (3): block: add bdrv_co_drain_end callback block: rename bdrv_co_drain to bdrv_co_drain_begin block/throttle.c: add bdrv_co_drain_begin/end cal

[Qemu-devel] [PATCH v3 3/3] block/throttle.c: add bdrv_co_drain_begin/end callbacks

2017-09-23 Thread Manos Pitsidianakis
Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com> Reviewed-by: Fam Zheng <f...@redhat.com> Signed-off-by: Manos Pitsidianakis <el13...@mail.ntua.gr> --- block/throttle.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/block/throttle.c b/block/throttle.

[Qemu-devel] [PATCH v3 1/3] block: add bdrv_co_drain_end callback

2017-09-23 Thread Manos Pitsidianakis
BlockDriverState has a bdrv_co_drain() callback but no equivalent for the end of the drain. The throttle driver (block/throttle.c) needs a way to mark the end of the drain in order to toggle io_limits_disabled correctly, thus bdrv_co_drain_end is needed. Signed-off-by: Manos Pitsidianakis <e

Re: [Qemu-devel] [PATCH v11 1/6] throttle: factor out duplicate code

2017-09-23 Thread Manos Pitsidianakis
On Fri, Sep 22, 2017 at 01:31:58PM +0200, Pradeep Jagadeesh wrote: On 9/18/2017 6:20 PM, Manos Pitsidianakis wrote: On Thu, Sep 14, 2017 at 06:40:05AM -0400, Pradeep Jagadeesh wrote: This patch factors out the duplicate throttle code that was still present in block and fsdev devices. Signed

Re: [Qemu-devel] [PATCH v2 1/3] block: add bdrv_co_drain_end callback

2017-09-21 Thread Manos Pitsidianakis
On Thu, Sep 21, 2017 at 09:29:43PM +0800, Fam Zheng wrote: On Thu, 09/21 16:17, Manos Pitsidianakis wrote: BlockDriverState has a bdrv_do_drain() callback but no equivalent for the end s/bdrv_do_drain/bdrv_co_drain/ of the drain. The throttle driver (block/throttle.c) needs a way to mark

Re: [Qemu-devel] [PATCH v2 0/3] add bdrv_co_drain_begin/end BlockDriver callbacks

2017-09-21 Thread Manos Pitsidianakis
On Thu, Sep 21, 2017 at 09:35:35PM +0800, Fam Zheng wrote: On Thu, 09/21 16:17, Manos Pitsidianakis wrote: This patch series renames bdrv_co_drain to bdrv_co_drain_begin and adds a new bdrv_co_drain_end callback to match bdrv_drained_begin/end and drained_begin/end of BdrvChild. This is needed

[Qemu-devel] [PATCH v2 3/3] block/throttle.c: add bdrv_co_drain_begin/end callbacks

2017-09-21 Thread Manos Pitsidianakis
Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com> Signed-off-by: Manos Pitsidianakis <el13...@mail.ntua.gr> --- block/throttle.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/block/throttle.c b/block/throttle.c index 5bca76300f..833175ac77 100644 --- a/bloc

[Qemu-devel] [PATCH v2 0/3] add bdrv_co_drain_begin/end BlockDriver callbacks

2017-09-21 Thread Manos Pitsidianakis
g for completion [Stefan] Manos Pitsidianakis (3): block: add bdrv_co_drain_end callback block: rename bdrv_co_drain to bdrv_co_drain_begin block/throttle.c: add bdrv_co_drain_begin/end callbacks include/block/block_int.h | 8 +++- block/io.c

[Qemu-devel] [PATCH v2 1/3] block: add bdrv_co_drain_end callback

2017-09-21 Thread Manos Pitsidianakis
BlockDriverState has a bdrv_do_drain() callback but no equivalent for the end of the drain. The throttle driver (block/throttle.c) needs a way to mark the end of the drain in order to toggle io_limits_disabled correctly, thus bdrv_co_drain_end is needed. Signed-off-by: Manos Pitsidianakis <e

[Qemu-devel] [PATCH v2 2/3] block: rename bdrv_co_drain to bdrv_co_drain_begin

2017-09-21 Thread Manos Pitsidianakis
Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com> Signed-off-by: Manos Pitsidianakis <el13...@mail.ntua.gr> --- include/block/block_int.h | 2 +- block/io.c| 4 ++-- block/qed.c | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/i

Re: [Qemu-devel] [PATCH 1/3] block: add bdrv_co_drain_end callback

2017-09-20 Thread Manos Pitsidianakis
On Wed, Sep 20, 2017 at 03:26:32PM +0100, Stefan Hajnoczi wrote: On Wed, Sep 20, 2017 at 01:23:09PM +0300, Manos Pitsidianakis wrote: @@ -188,7 +194,7 @@ static bool bdrv_drain_recurse(BlockDriverState *bs) waited = BDRV_POLL_WHILE(bs, atomic_read(>in_flight) > 0); /* Ensu

Re: [Qemu-devel] [PATCH 1/2] block/block-backend.c: add blk_check_byte_request call to blk_pread/blk_pwrite

2017-09-20 Thread Manos Pitsidianakis
On Wed, Sep 20, 2017 at 02:24:21PM +0200, Kevin Wolf wrote: Am 20.09.2017 um 13:43 hat Manos Pitsidianakis geschrieben: blk_check_byte_request() is called from the blk_co_pwritev/blk_co_preadv to check if the request offset and request bytes parameters are valid for the given Blockbackend

Re: [Qemu-devel] [PATCH v2] throttle-groups: update tg->any_timer_armed[] on detach

2017-09-20 Thread Manos Pitsidianakis
ast since QEMU 2.10.0 with -drive iops=100: $ dd if=/dev/zero of=/dev/vdb oflag=direct count=1000 (qemu) stop (qemu) cont ...I/O is stuck... Reported-by: Yongxue Hong <yh...@redhat.com> Signed-off-by: Stefan Hajnoczi <stefa...@redhat.com> Reviewed-by: Manos Pitsidianakis <el

Re: [Qemu-devel] [PATCH v2] throttle-groups: update tg->any_timer_armed[] on detach

2017-09-20 Thread Manos Pitsidianakis
On Wed, Sep 20, 2017 at 01:08:52PM +0200, Alberto Garcia wrote: On Wed 20 Sep 2017 12:17:40 PM CEST, Stefan Hajnoczi wrote: @@ -592,6 +592,17 @@ void throttle_group_attach_aio_context(ThrottleGroupMember *tgm, void throttle_group_detach_aio_context(ThrottleGroupMember *tgm) {

[Qemu-devel] [PATCH 0/2] remove blk_pread_unthrottled()

2017-09-20 Thread Manos Pitsidianakis
Cleanups for minor stuff I noticed while looking around blk_root_drained_* Manos Pitsidianakis (2): block/block-backend.c: add blk_check_byte_request call to blk_pread/blk_pwrite block/block-backend.c: remove blk_pread_unthrottled() include/sysemu/block-backend.h | 2 -- block/block

[Qemu-devel] [PATCH 2/2] block/block-backend.c: remove blk_pread_unthrottled()

2017-09-20 Thread Manos Pitsidianakis
blk_pread_unthrottled was used to bypass I/O throttling on the BlockBackend in the case of async I/O. This is not needed anymore and we can just call blk_pread() directly. Signed-off-by: Manos Pitsidianakis <el13...@mail.ntua.gr> --- include/sysemu/block-backend.h | 2 -- block/block-bac

[Qemu-devel] [PATCH 3/3] block/throttle.c: add bdrv_co_drain_begin/end callbacks

2017-09-20 Thread Manos Pitsidianakis
Signed-off-by: Manos Pitsidianakis <el13...@mail.ntua.gr> --- block/throttle.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/block/throttle.c b/block/throttle.c index 5bca76300f..833175ac77 100644 --- a/block/throttle.c +++ b/block/throttle.c @@ -197,6 +197,21 @@

[Qemu-devel] [PATCH 0/3] add bdrv_co_drain_begin/end BlockDriver callbacks

2017-09-20 Thread Manos Pitsidianakis
io_limits_disabled correctly. Based-on: <20170918202529.28379-1-el13...@mail.ntua.gr> "block/throttle-groups.c: allocate RestartData on the heap" Which fixes a coroutine crash in block/throttle-groups.c Manos Pitsidianakis (3): block: add bdrv_co_drain_end callback

[Qemu-devel] [PATCH 2/3] block: rename bdrv_co_drain to bdrv_co_drain_begin

2017-09-20 Thread Manos Pitsidianakis
Signed-off-by: Manos Pitsidianakis <el13...@mail.ntua.gr> --- include/block/block_int.h | 2 +- block/io.c| 4 ++-- block/qed.c | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/block/block_int.h b/include/block/block_int.h

[Qemu-devel] [PATCH 1/2] block/block-backend.c: add blk_check_byte_request call to blk_pread/blk_pwrite

2017-09-20 Thread Manos Pitsidianakis
blk_check_byte_request() is called from the blk_co_pwritev/blk_co_preadv to check if the request offset and request bytes parameters are valid for the given Blockbackend. Let's do that in blk_pread/blk_pwrite too. Signed-off-by: Manos Pitsidianakis <el13...@mail.ntua.gr> --- block

[Qemu-devel] [PATCH 1/3] block: add bdrv_co_drain_end callback

2017-09-20 Thread Manos Pitsidianakis
BlockDriverState has a bdrv_do_drain() callback but no equivalent for the end of the drain. The throttle driver (block/throttle.c) needs a way to mark the end of the drain in order to toggle io_limits_disabled correctly, thus bdrv_co_drain_end is needed. Signed-off-by: Manos Pitsidianakis <e

[Qemu-devel] [PATCH] block/throttle-groups.c: allocate RestartData on the heap

2017-09-18 Thread Manos Pitsidianakis
RestartData is the opaque data of the throttle_group_restart_queue_entry coroutine. By being stack allocated, it isn't available anymore if aio_co_enter schedules the coroutine with a bottom halve and runs after throttle_group_restart_queue returns. Signed-off-by: Manos Pitsidianakis <e

Re: [Qemu-devel] [PATCH v11 2/6] qmp: Use ThrottleLimits structure

2017-09-18 Thread Manos Pitsidianakis
On Thu, Sep 14, 2017 at 06:40:06AM -0400, Pradeep Jagadeesh wrote: This patch factors out code to use the ThrottleLimits strurcture. Signed-off-by: Pradeep Jagadeesh Reviewed-by: Greg Kurz Reviewed-by: Eric Blake Reviewed-by:

Re: [Qemu-devel] [PATCH v11 1/6] throttle: factor out duplicate code

2017-09-18 Thread Manos Pitsidianakis
On Thu, Sep 14, 2017 at 06:40:05AM -0400, Pradeep Jagadeesh wrote: This patch factors out the duplicate throttle code that was still present in block and fsdev devices. Signed-off-by: Pradeep Jagadeesh Reviewed-by: Alberto Garcia Reviewed-by:

Re: [Qemu-devel] [PATCH v11 2/6] qmp: Use ThrottleLimits structure

2017-09-18 Thread Manos Pitsidianakis
On Thu, Sep 14, 2017 at 06:40:06AM -0400, Pradeep Jagadeesh wrote: This patch factors out code to use the ThrottleLimits strurcture. Signed-off-by: Pradeep Jagadeesh Reviewed-by: Greg Kurz Reviewed-by: Eric Blake Reviewed-by:

Re: [Qemu-devel] [PATCH v3 4/7] block: remove legacy I/O throttling

2017-09-08 Thread Manos Pitsidianakis
On Fri, Sep 08, 2017 at 06:00:11PM +0200, Kevin Wolf wrote: Am 08.09.2017 um 17:44 hat Manos Pitsidianakis geschrieben: On Thu, Sep 07, 2017 at 03:26:11PM +0200, Kevin Wolf wrote: > We shouldn't really need any throttling code in > blk_root_drained_begin/end any more now because the th

Re: [Qemu-devel] [PATCH v3 4/7] block: remove legacy I/O throttling

2017-09-08 Thread Manos Pitsidianakis
On Thu, Sep 07, 2017 at 03:26:11PM +0200, Kevin Wolf wrote: We shouldn't really need any throttling code in blk_root_drained_begin/end any more now because the throttle node will be drained. If this code is necessary, a bdrv_drain() on an explicit throttle node will work differently from one on

Re: [Qemu-devel] [Qemu-block] [PATCH v9 6/6] qemu-iotests: add 184 for throttle filter driver

2017-09-06 Thread Manos Pitsidianakis
On Tue, Sep 05, 2017 at 04:13:39PM -0500, Eric Blake wrote: On 09/05/2017 02:06 PM, Kevin Wolf wrote: Am 05.09.2017 um 18:16 hat Kevin Wolf geschrieben: Am 25.08.2017 um 15:20 hat Manos Pitsidianakis geschrieben: Reviewed-by: Alberto Garcia <be...@igalia.com> Signed-off-by:

[Qemu-devel] GSOC Report: Moving I/O throttling and write notifiers into block filter drivers

2017-08-28 Thread Manos Pitsidianakis
This is a GSOC project summary required for the project's final submission. As part of GSOC 2017, I took the project of moving two hard coded block layer features into filter drivers. I/O Throttling is implemented in block/throttle.c and before write notifiers are split into a driver for each

[Qemu-devel] [PATCH v3 4/7] block: remove legacy I/O throttling

2017-08-25 Thread Manos Pitsidianakis
of the device. The legacy throttle node is managed by the legacy interface completely. More advanced configurations with the filter drive are possible using the QMP API, but these will be ignored by the legacy interface. Signed-off-by: Manos Pitsidianakis <el13...@mail.ntua.gr> --- include

[Qemu-devel] [PATCH v3 6/7] block: remove BlockBackendPublic

2017-08-25 Thread Manos Pitsidianakis
ed-off-by: Manos Pitsidianakis <el13...@mail.ntua.gr> --- include/sysemu/block-backend.h | 12 +--- block/block-backend.c | 43 +++--- block/qapi.c | 4 ++-- blockdev.c | 4 ++-- 4 files changed, 2

[Qemu-devel] [PATCH v3 5/7] block/throttle-groups.c: remove throttle-groups list

2017-08-25 Thread Manos Pitsidianakis
. Signed-off-by: Manos Pitsidianakis <el13...@mail.ntua.gr> --- include/block/throttle-groups.h | 1 + block/block-backend.c | 15 +++-- block/throttle-groups.c | 145 +++- tests/test-throttle.c | 3 + 4 files chang

[Qemu-devel] [PATCH v3 1/7] block: skip implicit nodes in snapshots, blockjobs

2017-08-25 Thread Manos Pitsidianakis
graph. Signed-off-by: Manos Pitsidianakis <el13...@mail.ntua.gr> --- include/block/block_int.h | 17 + block.c | 10 ++ block/qapi.c | 14 +- blockdev.c| 34 ++ 4 files

[Qemu-devel] [PATCH v3 0/6] block: remove legacy I/O throttling

2017-08-25 Thread Manos Pitsidianakis
ctions add new function to get filter child bs take ownership of options in bdrv_new_open_driver() Manos Pitsidianakis (7): block: skip implicit nodes in snapshots, blockjobs block: add options parameter to bdrv_new_open_driver() block: require job-id when device is a node name block:

[Qemu-devel] [PATCH v3 3/7] block: require job-id when device is a node name

2017-08-25 Thread Manos Pitsidianakis
"sync": "full", "target": "backup.img" } } is not a BlockBackend name, instead of automatically getting it from the root BS if device is a node name. That information is lost after calling block_job_create(), so we can do it in its cal

[Qemu-devel] [PATCH v3 7/7] qemu-iotests: add 191 for legacy throttling interface

2017-08-25 Thread Manos Pitsidianakis
Check that the implicit throttle filter driver node, used for compatibility with the legacy throttling interface on the BlockBackend level, works. Reviewed-by: Alberto Garcia <be...@igalia.com> Signed-off-by: Manos Pitsidianakis <el13...@mail.ntua.gr> --- tests/qemu-iotests/1

[Qemu-devel] [PATCH v3 2/7] block: add options parameter to bdrv_new_open_driver()

2017-08-25 Thread Manos Pitsidianakis
Allow passing a QDict *options parameter to bdrv_new_open_driver() so that it can be used if a driver needs it upon creation. The previous behaviour (empty bs->options and bs->explicit_options) remains when options is NULL. Reviewed-by: Alberto Garcia <be...@igalia.com> Signed-o

[Qemu-devel] [PATCH v9 5/6] block: add throttle block filter driver

2017-08-25 Thread Manos Pitsidianakis
-group=bar which registers the throttle filter node with the ThrottleGroup 'bar'. The given group must be created beforehand with object-add or -object. Reviewed-by: Alberto Garcia <be...@igalia.com> Signed-off-by: Manos Pitsidianakis <el13...@mail.ntua.gr> --- qapi/block-core.json

[Qemu-devel] [PATCH v9 1/6] block: move ThrottleGroup membership to ThrottleGroupMember

2017-08-25 Thread Manos Pitsidianakis
. This is done by gathering ThrottleGroup membership details from BlockBackendPublic into ThrottleGroupMember and refactoring existing code to use the structure. Reviewed-by: Alberto Garcia <be...@igalia.com> Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com> Signed-off-by: Manos Pitsidi

[Qemu-devel] [PATCH v9 6/6] qemu-iotests: add 184 for throttle filter driver

2017-08-25 Thread Manos Pitsidianakis
Reviewed-by: Alberto Garcia <be...@igalia.com> Signed-off-by: Manos Pitsidianakis <el13...@mail.ntua.gr> --- tests/qemu-iotests/184 | 205 +++ tests/qemu-iotests/184.out | 300 + tests/qemu-iotests/group

[Qemu-devel] [PATCH v9 0/6] add throttle block driver filter

2017-08-25 Thread Manos Pitsidianakis
error in 'add aio_context field in ThrottleGroupMember' v2: change QOM throttle group object name print valid ranges for uint on error move frees in throttle_group_obj_finalize() split throttle_group_{set,get}() add throttle_recurse_is_first_non_filter() Manos Pitsidianakis (6): block

<    1   2   3   4   5   6   7   >