• James Hogan's avatar
    MIPS: KVM: Don't hardcode restored HWREna · b937ff62
    James Hogan authored
    KVM modifies CP0_HWREna during guest execution so it can trap and
    emulate RDHWR instructions, however it always restores the hardcoded
    value 0x2000000F. This assumes the presence of the UserLocal register,
    and the absence of any implementation dependent or future HW registers.
    
    Fix by exporting the value that traps.c write into CP0_HWREna, and
    loading from there instead of hard coding.
    Signed-off-by: default avatarJames Hogan <james.hogan@imgtec.com>
    Acked-by: default avatarRalf Baechle <ralf@linux-mips.org>
    Cc: Paolo Bonzini <pbonzini@redhat.com>
    Cc: Radim Krčmář <rkrcmar@redhat.com>
    Cc: linux-mips@linux-mips.org
    Cc: kvm@vger.kernel.org
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    b937ff62
setup.h 846 Bytes