Bug 953302

Summary: RHEL7 cannot read hda-audio v1 migration
Product: Red Hat Enterprise Linux 7 Reporter: Paolo Bonzini <pbonzini>
Component: qemu-kvmAssignee: Virtualization Maintenance <virt-maint>
Status: CLOSED NOTABUG QA Contact: Virtualization Bugs <virt-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.0CC: acathrow, juzhang, kraxel, owasserm, pbonzini, qiguo, qzhang, virt-maint, xhan
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 953304 (view as bug list) Environment:
Last Closed: 2013-04-18 16:36:51 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Paolo Bonzini 2013-04-17 21:26:50 UTC
Old-enough RHEL6 machine types generate hda-audio v1 migration data.  Even though the same machine types in RHEL7 should generate v2 migration data, we need to read version 1.

This should be doable upstream too (using minimum_version_id_old).

Comment 2 Gerd Hoffmann 2013-04-18 08:59:16 UTC
Hmm, I think this works just fine, upstream vmstate:

static const VMStateDescription vmstate_hda_audio = {
    .name = "hda-audio",
    .version_id = 2,
    .post_load = hda_audio_post_load,
    .fields = (VMStateField []) {
        VMSTATE_STRUCT_ARRAY(st, HDAAudioState, 4, 0,
                             vmstate_hda_audio_stream,
                             HDAAudioStream),
        VMSTATE_BOOL_ARRAY(running_compat, HDAAudioState, 16),
        ^^^^ v1 compat field
        VMSTATE_BOOL_ARRAY_V(running_real, HDAAudioState, 2 * 16, 2),
        VMSTATE_END_OF_LIST()
    }
};

IIRC rhel-6 has a rhel-only patch to also *generate* v1 on old machine types,
which isn't needed on rhel-7.

Comment 3 Paolo Bonzini 2013-04-18 16:36:51 UTC
Right, this works fine.  I don't know why I thought that .minimum_version_id = 0 means "only .version_id supported", instead it means "all versions supported" of course.