]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - arch/mips/kvm/mips.c
KVM: MIPS/Entry: Update entry code to support VZ
[linux.git] / arch / mips / kvm / mips.c
index ab689df283b39a0b60fc4cf50f6fc81698e45954..1fa088854cb66e6833d11aec91ff2f569a5587b1 100644 (file)
@@ -324,8 +324,10 @@ struct kvm_vcpu *kvm_arch_vcpu_create(struct kvm *kvm, unsigned int id)
        /* Build guest exception vectors dynamically in unmapped memory */
        handler = gebase + 0x2000;
 
-       /* TLB refill */
+       /* TLB refill (or XTLB refill on 64-bit VZ where KX=1) */
        refill_start = gebase;
+       if (IS_ENABLED(CONFIG_KVM_MIPS_VZ) && IS_ENABLED(CONFIG_64BIT))
+               refill_start += 0x080;
        refill_end = kvm_mips_build_tlb_refill_exception(refill_start, handler);
 
        /* General Exception Entry point */