Skip to content

Commit

Permalink
audio: Never send migration section
Browse files Browse the repository at this point in the history
The audio migration vmstate is empty, and always has been; we can't
just remove it though because an old qemu might send it us.
Changes with -audiodev now mean it's sometimes created when it didn't
used to be, and can confuse migration to old qemu.

Change it so that vmstate_audio is never sent; if it's received it
should still be accepted, and old qemu's shouldn't be too upset if it's
missing.

Signed-off-by: Dr. David Alan Gilbert <[email protected]>
Reviewed-by: Daniel P. Berrangé <[email protected]>
Tested-by: Daniel P. Berrangé <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Gerd Hoffmann <[email protected]>
  • Loading branch information
dagrh authored and kraxel committed Aug 10, 2021
1 parent 7bce330 commit da77adb
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions audio/audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -1622,10 +1622,20 @@ void audio_cleanup(void)
}
}

static bool vmstate_audio_needed(void *opaque)
{
/*
* Never needed, this vmstate only exists in case
* an old qemu sends it to us.
*/
return false;
}

static const VMStateDescription vmstate_audio = {
.name = "audio",
.version_id = 1,
.minimum_version_id = 1,
.needed = vmstate_audio_needed,
.fields = (VMStateField[]) {
VMSTATE_END_OF_LIST()
}
Expand Down

0 comments on commit da77adb

Please sign in to comment.