• James Hogan's avatar
    MIPS: KVM: Fix ASID restoration logic · 9571c879
    James Hogan authored
    commit 002374f3 upstream.
    
    ASID restoration on guest resume should determine the guest execution
    mode based on the guest Status register rather than bit 30 of the guest
    PC.
    
    Fix the two places in locore.S that do this, loading the guest status
    from the cop0 area. Note, this assembly is specific to the trap &
    emulate implementation of KVM, so it doesn't need to check the
    supervisor bit as that mode is not implemented in the guest.
    
    Fixes: b680f70f ("KVM/MIPS32: Entry point for trampolining to...")
    Signed-off-by: default avatarJames Hogan <james.hogan@imgtec.com>
    Cc: Ralf Baechle <ralf@linux-mips.org>
    Cc: Paolo Bonzini <pbonzini@redhat.com>
    Cc: Gleb Natapov <gleb@kernel.org>
    Cc: linux-mips@linux-mips.org
    Cc: kvm@vger.kernel.org
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    [ luis: backported to 3.16:
      - file rename: locore.S -> kvm_locore.S ]
    Signed-off-by: default avatarLuis Henriques <luis.henriques@canonical.com>
    9571c879
kvm_locore.S 14.4 KB