• Suraj Jitindar Singh's avatar
    target/ppc: Fix setting of cpu->compat_pvr on incoming migration · e07cc192
    Suraj Jitindar Singh authored
    cpu->compat_pvr is used to store the current compat mode of the cpu.
    
    On the receiving side during incoming migration we check compatibility
    with the compat mode by calling ppc_set_compat(). However we fail to set
    the compat mode with the hypervisor since the "new" compat mode doesn't
    differ from the current (due to a "cpu->compat_pvr != compat_pvr" check).
    This means that kvm runs the vcpus without a compat mode, which is the
    incorrect behaviour. The implication being that a compatibility mode
    will never be in effect after migration.
    
    To fix this so that the compat mode is correctly set with the
    hypervisor, store the desired compat mode and reset cpu->compat_pvr to
    zero before calling ppc_set_compat().
    
    Fixes: 5dfaa532
    
     ("ppc: fix ppc_set_compat() with KVM PR")
    
    Signed-off-by: default avatarSuraj Jitindar Singh <sjitindarsingh@gmail.com>
    Signed-off-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
    e07cc192