diff options
author | Alex Shi <alex.shi@linaro.org> | 2016-03-14 14:12:24 +0800 |
---|---|---|
committer | Alex Shi <alex.shi@linaro.org> | 2016-03-14 14:12:24 +0800 |
commit | 34e0913e457f8469667faf5fa600447aa93371cf (patch) | |
tree | 03a33cde6e4ee41d03ffdb8eb18d63ecbffbc614 /arch/mips/kvm/kvm_locore.S | |
parent | af1d34c770588a9ec6041292b7cd08e2fbc4f3a3 (diff) | |
parent | f3542ea105aefbb16cbcac4f30e2cf583a66d3d8 (diff) |
Merge tag 'v3.14.64' into linux-linaro-lsk-v3.14
This is the 3.14.64 stable release
Diffstat (limited to 'arch/mips/kvm/kvm_locore.S')
-rw-r--r-- | arch/mips/kvm/kvm_locore.S | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/arch/mips/kvm/kvm_locore.S b/arch/mips/kvm/kvm_locore.S index 03a2db58b22d..ba5ce99c021d 100644 --- a/arch/mips/kvm/kvm_locore.S +++ b/arch/mips/kvm/kvm_locore.S @@ -159,9 +159,11 @@ FEXPORT(__kvm_mips_vcpu_run) FEXPORT(__kvm_mips_load_asid) /* Set the ASID for the Guest Kernel */ - INT_SLL t0, t0, 1 /* with kseg0 @ 0x40000000, kernel */ - /* addresses shift to 0x80000000 */ - bltz t0, 1f /* If kernel */ + PTR_L t0, VCPU_COP0(k1) + LONG_L t0, COP0_STATUS(t0) + andi t0, KSU_USER | ST0_ERL | ST0_EXL + xori t0, KSU_USER + bnez t0, 1f /* If kernel */ INT_ADDIU t1, k1, VCPU_GUEST_KERNEL_ASID /* (BD) */ INT_ADDIU t1, k1, VCPU_GUEST_USER_ASID /* else user */ 1: @@ -438,9 +440,11 @@ __kvm_mips_return_to_guest: mtc0 t0, CP0_EPC /* Set the ASID for the Guest Kernel */ - INT_SLL t0, t0, 1 /* with kseg0 @ 0x40000000, kernel */ - /* addresses shift to 0x80000000 */ - bltz t0, 1f /* If kernel */ + PTR_L t0, VCPU_COP0(k1) + LONG_L t0, COP0_STATUS(t0) + andi t0, KSU_USER | ST0_ERL | ST0_EXL + xori t0, KSU_USER + bnez t0, 1f /* If kernel */ INT_ADDIU t1, k1, VCPU_GUEST_KERNEL_ASID /* (BD) */ INT_ADDIU t1, k1, VCPU_GUEST_USER_ASID /* else user */ 1: |