[PATCH v3 0/9] hw/audio/virtio-sound: basic migration support

Alexander Mikhalitsyn posted 9 patches 4 weeks, 1 day ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260626123531.132078-1-alexander@mihalicyn.com
Maintainers: Gerd Hoffmann <kraxel@redhat.com>, "Michael S. Tsirkin" <mst@redhat.com>, Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
There is a newer version of this series
hw/audio/trace-events         |   3 +-
hw/audio/virtio-snd.c         | 679 ++++++++++++++++++++--------------
include/hw/audio/virtio-snd.h |  26 +-
3 files changed, 399 insertions(+), 309 deletions(-)
[PATCH v3 0/9] hw/audio/virtio-sound: basic migration support
Posted by Alexander Mikhalitsyn 4 weeks, 1 day ago
From: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@futurfusion.io>

Dear friends,

This patchset is aimed to support virtio-sound live migration and based on
pre-existing Volker Rümelin's patches from qemu-devel lists [1]. I tried
to ask (https://lore.kernel.org/qemu-devel/9d7ea128c711c201688a4716f53b8a335fc53569.camel@mihalicyn.com/)
if Volker is going to continue his work on this, but received no reply so I
just decided to go forward: take his patches, rebase and resend. Of course,
I kept all authorship/tags so I hope that it is fine.

Testing.

I manually validated this with Ubuntu 24.04 Desktop VM and found no issues.
Also, it was validated with CI (https://gitlab.com/mihalicyn/qemu/-/pipelines/2626702088).

Original patchset:
https://lore.kernel.org/qemu-devel/a289a081-9a61-4bcb-b693-bf6cd7768c0e@t-online.de [1]

Git tree:
https://gitlab.com/mihalicyn/qemu/-/commits/virtio-sound-migration

Changelog for version 3:
- addressed review feedback from Marc-André Lureau:
	- drop VirtIOSoundPCMStream's id field (unused)
	- resurrected error_report(..) in virtio_snd_pcm_start_stop()
	- fixes in "hw/audio/virtio-sound: add stream state variable"
	  [ please, look in commit message for details ]
	- added "hw/audio/virtio-sound: remove channel positions field
	  from VirtIOSoundPCMStream"
	- fixes in "hw/audio/virtio-sound: add missing vmstate fields"
	  [ details in commit message ]

Changelog for version 2:
- no code changes (only commit messages)
  followed suggestions from Daniel P. Berrangé (thanks, Daniel!)
  https://lore.kernel.org/qemu-devel/ajzoxZr4g0Xsr_4p@redhat.com/
  and added some extra details about what I did with the original
  patches during rebase (for some of them it was simpler and less error
  prone to just drop changes and reimplement them by following the idea
  of the patch, cause base code has changed significantly).

Changelog relative to the original Volker Rümelin's submission:
- rebased:
	- "hw/audio/virtio-sound: return correct command response size"
		was dropped as it was already merged
	- "hw/audio/virtio-sound: fix segmentation fault in tx/rx xfer handler"
		was dropped as it seems to be replaced with another fix
		https://github.com/qemu/qemu/commit/731655f87f319fd06f27282c6cafbc2467ac8045
	- I had to drop all pre-existing Reviewed-by tags cause it was 2 years since
	  this patchset was sent and reviewed and I did a quite significant code changes
	  during rebase

Kind regards,
Alex

Alexander Mikhalitsyn (1):
  hw/audio/virtio-sound: remove channel positions field from
    VirtIOSoundPCMStream

Volker Rümelin (8):
  hw/audio/virtio-sound: remove command and stream mutexes
  hw/audio/virtio-sound: allocate an array of streams
  hw/audio/virtio-sound: free all stream buffers on reset
  hw/audio/virtio-sound: split out virtio_snd_pcm_start_stop()
  hw/audio/virtio-sound: add stream state variable
  hw/audio/virtio-sound: introduce virtio_snd_pcm_open()
  hw/audio/virtio-sound: introduce virtio_snd_set_active()
  hw/audio/virtio-sound: add missing vmstate fields

 hw/audio/trace-events         |   3 +-
 hw/audio/virtio-snd.c         | 679 ++++++++++++++++++++--------------
 include/hw/audio/virtio-snd.h |  26 +-
 3 files changed, 399 insertions(+), 309 deletions(-)

-- 
2.47.3


Re: [PATCH v3 0/9] hw/audio/virtio-sound: basic migration support
Posted by Manos Pitsidianakis 3 weeks, 6 days ago
Hi Alexander,

On Fri, Jun 26, 2026 at 3:35 PM Alexander Mikhalitsyn
<alexander@mihalicyn.com> wrote:
>
> From: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@futurfusion.io>

Could you please send your patches from your
aleksandr.mikhalitsyn@futurfusion.io address for the next revision?
Replying to review comments with your personal email is fine, but the
s-o-b should match your sending address. We do not know if the address
belongs to you otherwise. This is not explicitly stated in our Code
Provenance documentation but we need a way to verify your S-o-b
provenance.

Thanks,

>
> Dear friends,
>
> This patchset is aimed to support virtio-sound live migration and based on
> pre-existing Volker Rümelin's patches from qemu-devel lists [1]. I tried
> to ask (https://lore.kernel.org/qemu-devel/9d7ea128c711c201688a4716f53b8a335fc53569.camel@mihalicyn.com/)
> if Volker is going to continue his work on this, but received no reply so I
> just decided to go forward: take his patches, rebase and resend. Of course,
> I kept all authorship/tags so I hope that it is fine.
>
> Testing.
>
> I manually validated this with Ubuntu 24.04 Desktop VM and found no issues.
> Also, it was validated with CI (https://gitlab.com/mihalicyn/qemu/-/pipelines/2626702088).
>
> Original patchset:
> https://lore.kernel.org/qemu-devel/a289a081-9a61-4bcb-b693-bf6cd7768c0e@t-online.de [1]
>
> Git tree:
> https://gitlab.com/mihalicyn/qemu/-/commits/virtio-sound-migration
>
> Changelog for version 3:
> - addressed review feedback from Marc-André Lureau:
>         - drop VirtIOSoundPCMStream's id field (unused)
>         - resurrected error_report(..) in virtio_snd_pcm_start_stop()
>         - fixes in "hw/audio/virtio-sound: add stream state variable"
>           [ please, look in commit message for details ]
>         - added "hw/audio/virtio-sound: remove channel positions field
>           from VirtIOSoundPCMStream"
>         - fixes in "hw/audio/virtio-sound: add missing vmstate fields"
>           [ details in commit message ]
>
> Changelog for version 2:
> - no code changes (only commit messages)
>   followed suggestions from Daniel P. Berrangé (thanks, Daniel!)
>   https://lore.kernel.org/qemu-devel/ajzoxZr4g0Xsr_4p@redhat.com/
>   and added some extra details about what I did with the original
>   patches during rebase (for some of them it was simpler and less error
>   prone to just drop changes and reimplement them by following the idea
>   of the patch, cause base code has changed significantly).
>
> Changelog relative to the original Volker Rümelin's submission:
> - rebased:
>         - "hw/audio/virtio-sound: return correct command response size"
>                 was dropped as it was already merged
>         - "hw/audio/virtio-sound: fix segmentation fault in tx/rx xfer handler"
>                 was dropped as it seems to be replaced with another fix
>                 https://github.com/qemu/qemu/commit/731655f87f319fd06f27282c6cafbc2467ac8045
>         - I had to drop all pre-existing Reviewed-by tags cause it was 2 years since
>           this patchset was sent and reviewed and I did a quite significant code changes
>           during rebase
>
> Kind regards,
> Alex
>
> Alexander Mikhalitsyn (1):
>   hw/audio/virtio-sound: remove channel positions field from
>     VirtIOSoundPCMStream
>
> Volker Rümelin (8):
>   hw/audio/virtio-sound: remove command and stream mutexes
>   hw/audio/virtio-sound: allocate an array of streams
>   hw/audio/virtio-sound: free all stream buffers on reset
>   hw/audio/virtio-sound: split out virtio_snd_pcm_start_stop()
>   hw/audio/virtio-sound: add stream state variable
>   hw/audio/virtio-sound: introduce virtio_snd_pcm_open()
>   hw/audio/virtio-sound: introduce virtio_snd_set_active()
>   hw/audio/virtio-sound: add missing vmstate fields
>
>  hw/audio/trace-events         |   3 +-
>  hw/audio/virtio-snd.c         | 679 ++++++++++++++++++++--------------
>  include/hw/audio/virtio-snd.h |  26 +-
>  3 files changed, 399 insertions(+), 309 deletions(-)
>
> --
> 2.47.3
>

-- 
Manos Pitsidianakis
Emulation and Virtualization Engineer at Linaro Ltd
Re: [PATCH v3 0/9] hw/audio/virtio-sound: basic migration support
Posted by Aleksandr Mikhalitsyn 3 weeks, 5 days ago
Dear Manos,

(replying from my @futurfusion.io address)

I'm using my personal email address hosted at Gmail, cause it works just well with plain text email and does not corrupt patches.
While Microsoft Outlook (behind futurfusion.io) doesn't work that good, so I still do SoB tags with my work email, but send
them through Gmail servers. Hope it is fine.

I'm ready to do all necessary actions to proof that these two email belong to me, for example I send my series from
my Gmail and then reply from futurfusion.io with some ACK to prove that it's me.

Also, in Linux kernel I have a proper email mapping:
https://github.com/torvalds/linux/blob/dc59e4fea9d83f03bad6bddf3fa2e52491777482/.mailmap#L38

P.S. Sorry for doing non-inline reply, it's again because of terrible Outlook.

P.S.2. I'll continue my work on patches next week, cause I'm currently away from home on vacation. ;)
Huge thanks for such a fast review of my patch submission!

Kind regards,
Alex

________________________________
From: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Sent: Monday, June 29, 2026 13:04
To: Alexander Mikhalitsyn <alexander@mihalicyn.com>
Cc: qemu-devel@nongnu.org <qemu-devel@nongnu.org>; Volker Rümelin <vr_qemu@t-online.de>; Marc-André Lureau <marcandre.lureau@redhat.com>; Stéphane Graber <stgraber@stgraber.org>; Daniel P . Berrangé <berrange@redhat.com>; Gerd Hoffmann <kraxel@redhat.com>; Michael S. Tsirkin <mst@redhat.com>; Aleksandr Mikhalitsyn <aleksandr.mikhalitsyn@futurfusion.io>
Subject: Re: [PATCH v3 0/9] hw/audio/virtio-sound: basic migration support

Hi Alexander,

On Fri, Jun 26, 2026 at 3:35 PM Alexander Mikhalitsyn
<alexander@mihalicyn.com> wrote:
>
> From: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@futurfusion.io>

Could you please send your patches from your
aleksandr.mikhalitsyn@futurfusion.io address for the next revision?
Replying to review comments with your personal email is fine, but the
s-o-b should match your sending address. We do not know if the address
belongs to you otherwise. This is not explicitly stated in our Code
Provenance documentation but we need a way to verify your S-o-b
provenance.

Thanks,

>
> Dear friends,
>
> This patchset is aimed to support virtio-sound live migration and based on
> pre-existing Volker Rümelin's patches from qemu-devel lists [1]. I tried
> to ask (https://lore.kernel.org/qemu-devel/9d7ea128c711c201688a4716f53b8a335fc53569.camel@mihalicyn.com/)
> if Volker is going to continue his work on this, but received no reply so I
> just decided to go forward: take his patches, rebase and resend. Of course,
> I kept all authorship/tags so I hope that it is fine.
>
> Testing.
>
> I manually validated this with Ubuntu 24.04 Desktop VM and found no issues.
> Also, it was validated with CI (https://gitlab.com/mihalicyn/qemu/-/pipelines/2626702088).
>
> Original patchset:
> https://lore.kernel.org/qemu-devel/a289a081-9a61-4bcb-b693-bf6cd7768c0e@t-online.de [1]
>
> Git tree:
> https://gitlab.com/mihalicyn/qemu/-/commits/virtio-sound-migration
>
> Changelog for version 3:
> - addressed review feedback from Marc-André Lureau:
>         - drop VirtIOSoundPCMStream's id field (unused)
>         - resurrected error_report(..) in virtio_snd_pcm_start_stop()
>         - fixes in "hw/audio/virtio-sound: add stream state variable"
>           [ please, look in commit message for details ]
>         - added "hw/audio/virtio-sound: remove channel positions field
>           from VirtIOSoundPCMStream"
>         - fixes in "hw/audio/virtio-sound: add missing vmstate fields"
>           [ details in commit message ]
>
> Changelog for version 2:
> - no code changes (only commit messages)
>   followed suggestions from Daniel P. Berrangé (thanks, Daniel!)
>   https://lore.kernel.org/qemu-devel/ajzoxZr4g0Xsr_4p@redhat.com/
>   and added some extra details about what I did with the original
>   patches during rebase (for some of them it was simpler and less error
>   prone to just drop changes and reimplement them by following the idea
>   of the patch, cause base code has changed significantly).
>
> Changelog relative to the original Volker Rümelin's submission:
> - rebased:
>         - "hw/audio/virtio-sound: return correct command response size"
>                 was dropped as it was already merged
>         - "hw/audio/virtio-sound: fix segmentation fault in tx/rx xfer handler"
>                 was dropped as it seems to be replaced with another fix
>                 https://github.com/qemu/qemu/commit/731655f87f319fd06f27282c6cafbc2467ac8045
>         - I had to drop all pre-existing Reviewed-by tags cause it was 2 years since
>           this patchset was sent and reviewed and I did a quite significant code changes
>           during rebase
>
> Kind regards,
> Alex
>
> Alexander Mikhalitsyn (1):
>   hw/audio/virtio-sound: remove channel positions field from
>     VirtIOSoundPCMStream
>
> Volker Rümelin (8):
>   hw/audio/virtio-sound: remove command and stream mutexes
>   hw/audio/virtio-sound: allocate an array of streams
>   hw/audio/virtio-sound: free all stream buffers on reset
>   hw/audio/virtio-sound: split out virtio_snd_pcm_start_stop()
>   hw/audio/virtio-sound: add stream state variable
>   hw/audio/virtio-sound: introduce virtio_snd_pcm_open()
>   hw/audio/virtio-sound: introduce virtio_snd_set_active()
>   hw/audio/virtio-sound: add missing vmstate fields
>
>  hw/audio/trace-events         |   3 +-
>  hw/audio/virtio-snd.c         | 679 ++++++++++++++++++++--------------
>  include/hw/audio/virtio-snd.h |  26 +-
>  3 files changed, 399 insertions(+), 309 deletions(-)
>
> --
> 2.47.3
>

--
Manos Pitsidianakis
Emulation and Virtualization Engineer at Linaro Ltd
Re: [PATCH v3 0/9] hw/audio/virtio-sound: basic migration support
Posted by Manos Pitsidianakis 3 weeks, 5 days ago
On Mon, 29 Jun 2026, 14:32 Aleksandr Mikhalitsyn, <
aleksandr.mikhalitsyn@futurfusion.io> wrote:

> Dear Manos,
>
> (replying from my @futurfusion.io address)
>
> I'm using my personal email address hosted at Gmail, cause it works just
> well with plain text email and does not corrupt patches.
> While Microsoft Outlook (behind futurfusion.io) doesn't work that good,
> so I still do SoB tags with my work email, but send
> them through Gmail servers. Hope it is fine.
>

Ok, that is good enough proof for me! No need to do anything different then
for future revisions.



> I'm ready to do all necessary actions to proof that these two email belong
> to me, for example I send my series from
> my Gmail and then reply from futurfusion.io with some ACK to prove that
> it's me.
>
> Also, in Linux kernel I have a proper email mapping:
>
> https://github.com/torvalds/linux/blob/dc59e4fea9d83f03bad6bddf3fa2e52491777482/.mailmap#L38
>
> P.S. Sorry for doing non-inline reply, it's again because of terrible
> Outlook.
>
> P.S.2. I'll continue my work on patches next week, cause I'm currently
> away from home on vacation. ;)
> Huge thanks for such a fast review of my patch submission!
>
> Kind regards,
> Alex
>
> ------------------------------
> *From:* Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
> *Sent:* Monday, June 29, 2026 13:04
> *To:* Alexander Mikhalitsyn <alexander@mihalicyn.com>
> *Cc:* qemu-devel@nongnu.org <qemu-devel@nongnu.org>; Volker Rümelin <
> vr_qemu@t-online.de>; Marc-André Lureau <marcandre.lureau@redhat.com>;
> Stéphane Graber <stgraber@stgraber.org>; Daniel P . Berrangé <
> berrange@redhat.com>; Gerd Hoffmann <kraxel@redhat.com>; Michael S.
> Tsirkin <mst@redhat.com>; Aleksandr Mikhalitsyn <
> aleksandr.mikhalitsyn@futurfusion.io>
> *Subject:* Re: [PATCH v3 0/9] hw/audio/virtio-sound: basic migration
> support
>
> Hi Alexander,
>
> On Fri, Jun 26, 2026 at 3:35 PM Alexander Mikhalitsyn
> <alexander@mihalicyn.com> wrote:
> >
> > From: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@futurfusion.io>
>
> Could you please send your patches from your
> aleksandr.mikhalitsyn@futurfusion.io address for the next revision?
> Replying to review comments with your personal email is fine, but the
> s-o-b should match your sending address. We do not know if the address
> belongs to you otherwise. This is not explicitly stated in our Code
> Provenance documentation but we need a way to verify your S-o-b
> provenance.
>
> Thanks,
>
> >
> > Dear friends,
> >
> > This patchset is aimed to support virtio-sound live migration and based
> on
> > pre-existing Volker Rümelin's patches from qemu-devel lists [1]. I tried
> > to ask (
> https://lore.kernel.org/qemu-devel/9d7ea128c711c201688a4716f53b8a335fc53569.camel@mihalicyn.com/
> )
> > if Volker is going to continue his work on this, but received no reply
> so I
> > just decided to go forward: take his patches, rebase and resend. Of
> course,
> > I kept all authorship/tags so I hope that it is fine.
> >
> > Testing.
> >
> > I manually validated this with Ubuntu 24.04 Desktop VM and found no
> issues.
> > Also, it was validated with CI (
> https://gitlab.com/mihalicyn/qemu/-/pipelines/2626702088).
> >
> > Original patchset:
> >
> https://lore.kernel.org/qemu-devel/a289a081-9a61-4bcb-b693-bf6cd7768c0e@t-online.de
>  [1]
> >
> > Git tree:
> > https://gitlab.com/mihalicyn/qemu/-/commits/virtio-sound-migration
> >
> > Changelog for version 3:
> > - addressed review feedback from Marc-André Lureau:
> >         - drop VirtIOSoundPCMStream's id field (unused)
> >         - resurrected error_report(..) in virtio_snd_pcm_start_stop()
> >         - fixes in "hw/audio/virtio-sound: add stream state variable"
> >           [ please, look in commit message for details ]
> >         - added "hw/audio/virtio-sound: remove channel positions field
> >           from VirtIOSoundPCMStream"
> >         - fixes in "hw/audio/virtio-sound: add missing vmstate fields"
> >           [ details in commit message ]
> >
> > Changelog for version 2:
> > - no code changes (only commit messages)
> >   followed suggestions from Daniel P. Berrangé (thanks, Daniel!)
> >   https://lore.kernel.org/qemu-devel/ajzoxZr4g0Xsr_4p@redhat.com/
> >   and added some extra details about what I did with the original
> >   patches during rebase (for some of them it was simpler and less error
> >   prone to just drop changes and reimplement them by following the idea
> >   of the patch, cause base code has changed significantly).
> >
> > Changelog relative to the original Volker Rümelin's submission:
> > - rebased:
> >         - "hw/audio/virtio-sound: return correct command response size"
> >                 was dropped as it was already merged
> >         - "hw/audio/virtio-sound: fix segmentation fault in tx/rx xfer
> handler"
> >                 was dropped as it seems to be replaced with another fix
> >
> https://github.com/qemu/qemu/commit/731655f87f319fd06f27282c6cafbc2467ac8045
> >         - I had to drop all pre-existing Reviewed-by tags cause it was 2
> years since
> >           this patchset was sent and reviewed and I did a quite
> significant code changes
> >           during rebase
> >
> > Kind regards,
> > Alex
> >
> > Alexander Mikhalitsyn (1):
> >   hw/audio/virtio-sound: remove channel positions field from
> >     VirtIOSoundPCMStream
> >
> > Volker Rümelin (8):
> >   hw/audio/virtio-sound: remove command and stream mutexes
> >   hw/audio/virtio-sound: allocate an array of streams
> >   hw/audio/virtio-sound: free all stream buffers on reset
> >   hw/audio/virtio-sound: split out virtio_snd_pcm_start_stop()
> >   hw/audio/virtio-sound: add stream state variable
> >   hw/audio/virtio-sound: introduce virtio_snd_pcm_open()
> >   hw/audio/virtio-sound: introduce virtio_snd_set_active()
> >   hw/audio/virtio-sound: add missing vmstate fields
> >
> >  hw/audio/trace-events         |   3 +-
> >  hw/audio/virtio-snd.c         | 679 ++++++++++++++++++++--------------
> >  include/hw/audio/virtio-snd.h |  26 +-
> >  3 files changed, 399 insertions(+), 309 deletions(-)
> >
> > --
> > 2.47.3
> >
>
> --
> Manos Pitsidianakis
> Emulation and Virtualization Engineer at Linaro Ltd
>