aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/kvm/kvm_locore.S')
-rw-r--r--arch/mips/kvm/kvm_locore.S16
1 files changed, 10 insertions, 6 deletions
diff --git a/arch/mips/kvm/kvm_locore.S b/arch/mips/kvm/kvm_locore.S
index 03a2db58b22..ba5ce99c021 100644
--- a/arch/mips/kvm/kvm_locore.S
+++ b/arch/mips/kvm/kvm_locore.S
@@ -159,9 +159,11 @@ FEXPORT(__kvm_mips_vcpu_run)
159 159
160FEXPORT(__kvm_mips_load_asid) 160FEXPORT(__kvm_mips_load_asid)
161 /* Set the ASID for the Guest Kernel */ 161 /* Set the ASID for the Guest Kernel */
162 INT_SLL t0, t0, 1 /* with kseg0 @ 0x40000000, kernel */ 162 PTR_L t0, VCPU_COP0(k1)
163 /* addresses shift to 0x80000000 */ 163 LONG_L t0, COP0_STATUS(t0)
164 bltz t0, 1f /* If kernel */ 164 andi t0, KSU_USER | ST0_ERL | ST0_EXL
165 xori t0, KSU_USER
166 bnez t0, 1f /* If kernel */
165 INT_ADDIU t1, k1, VCPU_GUEST_KERNEL_ASID /* (BD) */ 167 INT_ADDIU t1, k1, VCPU_GUEST_KERNEL_ASID /* (BD) */
166 INT_ADDIU t1, k1, VCPU_GUEST_USER_ASID /* else user */ 168 INT_ADDIU t1, k1, VCPU_GUEST_USER_ASID /* else user */
1671: 1691:
@@ -438,9 +440,11 @@ __kvm_mips_return_to_guest:
438 mtc0 t0, CP0_EPC 440 mtc0 t0, CP0_EPC
439 441
440 /* Set the ASID for the Guest Kernel */ 442 /* Set the ASID for the Guest Kernel */
441 INT_SLL t0, t0, 1 /* with kseg0 @ 0x40000000, kernel */ 443 PTR_L t0, VCPU_COP0(k1)
442 /* addresses shift to 0x80000000 */ 444 LONG_L t0, COP0_STATUS(t0)
443 bltz t0, 1f /* If kernel */ 445 andi t0, KSU_USER | ST0_ERL | ST0_EXL
446 xori t0, KSU_USER
447 bnez t0, 1f /* If kernel */
444 INT_ADDIU t1, k1, VCPU_GUEST_KERNEL_ASID /* (BD) */ 448 INT_ADDIU t1, k1, VCPU_GUEST_KERNEL_ASID /* (BD) */
445 INT_ADDIU t1, k1, VCPU_GUEST_USER_ASID /* else user */ 449 INT_ADDIU t1, k1, VCPU_GUEST_USER_ASID /* else user */
4461: 4501: