aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/mm
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-08-02 16:11:27 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2016-08-02 16:11:27 -0400
commit221bb8a46e230b9824204ae86537183d9991ff2a (patch)
tree92510d72285b2285be7cb87288bf088cb28af4c1 /arch/mips/mm
parentf7b32e4c021fd788f13f6785e17efbc3eb05b351 (diff)
parent23528bb21ee2c9b27f3feddd77a2a3351a8df148 (diff)
Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm
Pull KVM updates from Paolo Bonzini: - ARM: GICv3 ITS emulation and various fixes. Removal of the old VGIC implementation. - s390: support for trapping software breakpoints, nested virtualization (vSIE), the STHYI opcode, initial extensions for CPU model support. - MIPS: support for MIPS64 hosts (32-bit guests only) and lots of cleanups, preliminary to this and the upcoming support for hardware virtualization extensions. - x86: support for execute-only mappings in nested EPT; reduced vmexit latency for TSC deadline timer (by about 30%) on Intel hosts; support for more than 255 vCPUs. - PPC: bugfixes. * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (302 commits) KVM: PPC: Introduce KVM_CAP_PPC_HTM MIPS: Select HAVE_KVM for MIPS64_R{2,6} MIPS: KVM: Reset CP0_PageMask during host TLB flush MIPS: KVM: Fix ptr->int cast via KVM_GUEST_KSEGX() MIPS: KVM: Sign extend MFC0/RDHWR results MIPS: KVM: Fix 64-bit big endian dynamic translation MIPS: KVM: Fail if ebase doesn't fit in CP0_EBase MIPS: KVM: Use 64-bit CP0_EBase when appropriate MIPS: KVM: Set CP0_Status.KX on MIPS64 MIPS: KVM: Make entry code MIPS64 friendly MIPS: KVM: Use kmap instead of CKSEG0ADDR() MIPS: KVM: Use virt_to_phys() to get commpage PFN MIPS: Fix definition of KSEGX() for 64-bit KVM: VMX: Add VMCS to CPU's loaded VMCSs before VMPTRLD kvm: x86: nVMX: maintain internal copy of current VMCS KVM: PPC: Book3S HV: Save/restore TM state in H_CEDE KVM: PPC: Book3S HV: Pull out TM state save/restore into separate procedures KVM: arm64: vgic-its: Simplify MAPI error handling KVM: arm64: vgic-its: Make vgic_its_cmd_handle_mapi similar to other handlers KVM: arm64: vgic-its: Turn device_id validation into generic ID validation ...
Diffstat (limited to 'arch/mips/mm')
-rw-r--r--arch/mips/mm/c-r4k.c2
-rw-r--r--arch/mips/mm/uasm-micromips.c13
-rw-r--r--arch/mips/mm/uasm-mips.c11
-rw-r--r--arch/mips/mm/uasm.c24
4 files changed, 39 insertions, 11 deletions
diff --git a/arch/mips/mm/c-r4k.c b/arch/mips/mm/c-r4k.c
index ef7f925dd1b0..7a9c345e87e5 100644
--- a/arch/mips/mm/c-r4k.c
+++ b/arch/mips/mm/c-r4k.c
@@ -1206,7 +1206,7 @@ static void probe_pcache(void)
1206 c->icache.linesz; 1206 c->icache.linesz;
1207 c->icache.waybit = __ffs(icache_size/c->icache.ways); 1207 c->icache.waybit = __ffs(icache_size/c->icache.ways);
1208 1208
1209 if (config & 0x8) /* VI bit */ 1209 if (config & MIPS_CONF_VI)
1210 c->icache.flags |= MIPS_CACHE_VTAG; 1210 c->icache.flags |= MIPS_CACHE_VTAG;
1211 1211
1212 /* 1212 /*
diff --git a/arch/mips/mm/uasm-micromips.c b/arch/mips/mm/uasm-micromips.c
index d78178daea4b..277cf52d80e1 100644
--- a/arch/mips/mm/uasm-micromips.c
+++ b/arch/mips/mm/uasm-micromips.c
@@ -53,8 +53,13 @@ static struct insn insn_table_MM[] = {
53 { insn_bltzl, 0, 0 }, 53 { insn_bltzl, 0, 0 },
54 { insn_bne, M(mm_bne32_op, 0, 0, 0, 0, 0), RT | RS | BIMM }, 54 { insn_bne, M(mm_bne32_op, 0, 0, 0, 0, 0), RT | RS | BIMM },
55 { insn_cache, M(mm_pool32b_op, 0, 0, mm_cache_func, 0, 0), RT | RS | SIMM }, 55 { insn_cache, M(mm_pool32b_op, 0, 0, mm_cache_func, 0, 0), RT | RS | SIMM },
56 { insn_cfc1, M(mm_pool32f_op, 0, 0, 0, mm_cfc1_op, mm_32f_73_op), RT | RS },
57 { insn_cfcmsa, M(mm_pool32s_op, 0, msa_cfc_op, 0, 0, mm_32s_elm_op), RD | RE },
58 { insn_ctc1, M(mm_pool32f_op, 0, 0, 0, mm_ctc1_op, mm_32f_73_op), RT | RS },
59 { insn_ctcmsa, M(mm_pool32s_op, 0, msa_ctc_op, 0, 0, mm_32s_elm_op), RD | RE },
56 { insn_daddu, 0, 0 }, 60 { insn_daddu, 0, 0 },
57 { insn_daddiu, 0, 0 }, 61 { insn_daddiu, 0, 0 },
62 { insn_di, M(mm_pool32a_op, 0, 0, 0, mm_di_op, mm_pool32axf_op), RS },
58 { insn_divu, M(mm_pool32a_op, 0, 0, 0, mm_divu_op, mm_pool32axf_op), RT | RS }, 63 { insn_divu, M(mm_pool32a_op, 0, 0, 0, mm_divu_op, mm_pool32axf_op), RT | RS },
59 { insn_dmfc0, 0, 0 }, 64 { insn_dmfc0, 0, 0 },
60 { insn_dmtc0, 0, 0 }, 65 { insn_dmtc0, 0, 0 },
@@ -84,6 +89,8 @@ static struct insn insn_table_MM[] = {
84 { insn_mfhi, M(mm_pool32a_op, 0, 0, 0, mm_mfhi32_op, mm_pool32axf_op), RS }, 89 { insn_mfhi, M(mm_pool32a_op, 0, 0, 0, mm_mfhi32_op, mm_pool32axf_op), RS },
85 { insn_mflo, M(mm_pool32a_op, 0, 0, 0, mm_mflo32_op, mm_pool32axf_op), RS }, 90 { insn_mflo, M(mm_pool32a_op, 0, 0, 0, mm_mflo32_op, mm_pool32axf_op), RS },
86 { insn_mtc0, M(mm_pool32a_op, 0, 0, 0, mm_mtc0_op, mm_pool32axf_op), RT | RS | RD }, 91 { insn_mtc0, M(mm_pool32a_op, 0, 0, 0, mm_mtc0_op, mm_pool32axf_op), RT | RS | RD },
92 { insn_mthi, M(mm_pool32a_op, 0, 0, 0, mm_mthi32_op, mm_pool32axf_op), RS },
93 { insn_mtlo, M(mm_pool32a_op, 0, 0, 0, mm_mtlo32_op, mm_pool32axf_op), RS },
87 { insn_mul, M(mm_pool32a_op, 0, 0, 0, 0, mm_mul_op), RT | RS | RD }, 94 { insn_mul, M(mm_pool32a_op, 0, 0, 0, 0, mm_mul_op), RT | RS | RD },
88 { insn_or, M(mm_pool32a_op, 0, 0, 0, 0, mm_or32_op), RT | RS | RD }, 95 { insn_or, M(mm_pool32a_op, 0, 0, 0, 0, mm_or32_op), RT | RS | RD },
89 { insn_ori, M(mm_ori32_op, 0, 0, 0, 0, 0), RT | RS | UIMM }, 96 { insn_ori, M(mm_ori32_op, 0, 0, 0, 0, 0), RT | RS | UIMM },
@@ -166,13 +173,15 @@ static void build_insn(u32 **buf, enum opcode opc, ...)
166 op = ip->match; 173 op = ip->match;
167 va_start(ap, opc); 174 va_start(ap, opc);
168 if (ip->fields & RS) { 175 if (ip->fields & RS) {
169 if (opc == insn_mfc0 || opc == insn_mtc0) 176 if (opc == insn_mfc0 || opc == insn_mtc0 ||
177 opc == insn_cfc1 || opc == insn_ctc1)
170 op |= build_rt(va_arg(ap, u32)); 178 op |= build_rt(va_arg(ap, u32));
171 else 179 else
172 op |= build_rs(va_arg(ap, u32)); 180 op |= build_rs(va_arg(ap, u32));
173 } 181 }
174 if (ip->fields & RT) { 182 if (ip->fields & RT) {
175 if (opc == insn_mfc0 || opc == insn_mtc0) 183 if (opc == insn_mfc0 || opc == insn_mtc0 ||
184 opc == insn_cfc1 || opc == insn_ctc1)
176 op |= build_rs(va_arg(ap, u32)); 185 op |= build_rs(va_arg(ap, u32));
177 else 186 else
178 op |= build_rt(va_arg(ap, u32)); 187 op |= build_rt(va_arg(ap, u32));
diff --git a/arch/mips/mm/uasm-mips.c b/arch/mips/mm/uasm-mips.c
index 9c2220a45189..cec524167822 100644
--- a/arch/mips/mm/uasm-mips.c
+++ b/arch/mips/mm/uasm-mips.c
@@ -67,9 +67,14 @@ static struct insn insn_table[] = {
67#else 67#else
68 { insn_cache, M6(cache_op, 0, 0, 0, cache6_op), RS | RT | SIMM9 }, 68 { insn_cache, M6(cache_op, 0, 0, 0, cache6_op), RS | RT | SIMM9 },
69#endif 69#endif
70 { insn_cfc1, M(cop1_op, cfc_op, 0, 0, 0, 0), RT | RD },
71 { insn_cfcmsa, M(msa_op, 0, msa_cfc_op, 0, 0, msa_elm_op), RD | RE },
72 { insn_ctc1, M(cop1_op, ctc_op, 0, 0, 0, 0), RT | RD },
73 { insn_ctcmsa, M(msa_op, 0, msa_ctc_op, 0, 0, msa_elm_op), RD | RE },
70 { insn_daddiu, M(daddiu_op, 0, 0, 0, 0, 0), RS | RT | SIMM }, 74 { insn_daddiu, M(daddiu_op, 0, 0, 0, 0, 0), RS | RT | SIMM },
71 { insn_daddu, M(spec_op, 0, 0, 0, 0, daddu_op), RS | RT | RD }, 75 { insn_daddu, M(spec_op, 0, 0, 0, 0, daddu_op), RS | RT | RD },
72 { insn_dinsm, M(spec3_op, 0, 0, 0, 0, dinsm_op), RS | RT | RD | RE }, 76 { insn_dinsm, M(spec3_op, 0, 0, 0, 0, dinsm_op), RS | RT | RD | RE },
77 { insn_di, M(cop0_op, mfmc0_op, 0, 12, 0, 0), RT },
73 { insn_dins, M(spec3_op, 0, 0, 0, 0, dins_op), RS | RT | RD | RE }, 78 { insn_dins, M(spec3_op, 0, 0, 0, 0, dins_op), RS | RT | RD | RE },
74 { insn_divu, M(spec_op, 0, 0, 0, 0, divu_op), RS | RT }, 79 { insn_divu, M(spec_op, 0, 0, 0, 0, divu_op), RS | RT },
75 { insn_dmfc0, M(cop0_op, dmfc_op, 0, 0, 0, 0), RT | RD | SET}, 80 { insn_dmfc0, M(cop0_op, dmfc_op, 0, 0, 0, 0), RT | RD | SET},
@@ -114,7 +119,13 @@ static struct insn insn_table[] = {
114 { insn_mflo, M(spec_op, 0, 0, 0, 0, mflo_op), RD }, 119 { insn_mflo, M(spec_op, 0, 0, 0, 0, mflo_op), RD },
115 { insn_mtc0, M(cop0_op, mtc_op, 0, 0, 0, 0), RT | RD | SET}, 120 { insn_mtc0, M(cop0_op, mtc_op, 0, 0, 0, 0), RT | RD | SET},
116 { insn_mthc0, M(cop0_op, mthc0_op, 0, 0, 0, 0), RT | RD | SET}, 121 { insn_mthc0, M(cop0_op, mthc0_op, 0, 0, 0, 0), RT | RD | SET},
122 { insn_mthi, M(spec_op, 0, 0, 0, 0, mthi_op), RS },
123 { insn_mtlo, M(spec_op, 0, 0, 0, 0, mtlo_op), RS },
124#ifndef CONFIG_CPU_MIPSR6
117 { insn_mul, M(spec2_op, 0, 0, 0, 0, mul_op), RS | RT | RD}, 125 { insn_mul, M(spec2_op, 0, 0, 0, 0, mul_op), RS | RT | RD},
126#else
127 { insn_mul, M(spec_op, 0, 0, 0, mult_mul_op, mult_op), RS | RT | RD},
128#endif
118 { insn_ori, M(ori_op, 0, 0, 0, 0, 0), RS | RT | UIMM }, 129 { insn_ori, M(ori_op, 0, 0, 0, 0, 0), RS | RT | UIMM },
119 { insn_or, M(spec_op, 0, 0, 0, 0, or_op), RS | RT | RD }, 130 { insn_or, M(spec_op, 0, 0, 0, 0, or_op), RS | RT | RD },
120#ifndef CONFIG_CPU_MIPSR6 131#ifndef CONFIG_CPU_MIPSR6
diff --git a/arch/mips/mm/uasm.c b/arch/mips/mm/uasm.c
index ad718debc35a..3e0282d301d6 100644
--- a/arch/mips/mm/uasm.c
+++ b/arch/mips/mm/uasm.c
@@ -49,18 +49,19 @@ enum opcode {
49 insn_invalid, 49 insn_invalid,
50 insn_addiu, insn_addu, insn_and, insn_andi, insn_bbit0, insn_bbit1, 50 insn_addiu, insn_addu, insn_and, insn_andi, insn_bbit0, insn_bbit1,
51 insn_beq, insn_beql, insn_bgez, insn_bgezl, insn_bltz, insn_bltzl, 51 insn_beq, insn_beql, insn_bgez, insn_bgezl, insn_bltz, insn_bltzl,
52 insn_bne, insn_cache, insn_daddiu, insn_daddu, insn_dins, insn_dinsm, 52 insn_bne, insn_cache, insn_cfc1, insn_cfcmsa, insn_ctc1, insn_ctcmsa,
53 insn_divu, insn_dmfc0, insn_dmtc0, insn_drotr, insn_drotr32, insn_dsll, 53 insn_daddiu, insn_daddu, insn_di, insn_dins, insn_dinsm, insn_divu,
54 insn_dmfc0, insn_dmtc0, insn_drotr, insn_drotr32, insn_dsll,
54 insn_dsll32, insn_dsra, insn_dsrl, insn_dsrl32, insn_dsubu, insn_eret, 55 insn_dsll32, insn_dsra, insn_dsrl, insn_dsrl32, insn_dsubu, insn_eret,
55 insn_ext, insn_ins, insn_j, insn_jal, insn_jalr, insn_jr, insn_lb, 56 insn_ext, insn_ins, insn_j, insn_jal, insn_jalr, insn_jr, insn_lb,
56 insn_ld, insn_ldx, insn_lh, insn_ll, insn_lld, insn_lui, insn_lw, 57 insn_ld, insn_ldx, insn_lh, insn_ll, insn_lld, insn_lui, insn_lw,
57 insn_lwx, insn_mfc0, insn_mfhc0, insn_mfhi, insn_mflo, insn_mtc0, 58 insn_lwx, insn_mfc0, insn_mfhc0, insn_mfhi, insn_mflo, insn_mtc0,
58 insn_mthc0, insn_mul, insn_or, insn_ori, insn_pref, insn_rfe, 59 insn_mthc0, insn_mthi, insn_mtlo, insn_mul, insn_or, insn_ori,
59 insn_rotr, insn_sc, insn_scd, insn_sd, insn_sll, insn_sllv, insn_slt, 60 insn_pref, insn_rfe, insn_rotr, insn_sc, insn_scd, insn_sd, insn_sll,
60 insn_sltiu, insn_sltu, insn_sra, insn_srl, insn_srlv, insn_subu, 61 insn_sllv, insn_slt, insn_sltiu, insn_sltu, insn_sra, insn_srl,
61 insn_sw, insn_sync, insn_syscall, insn_tlbp, insn_tlbr, insn_tlbwi, 62 insn_srlv, insn_subu, insn_sw, insn_sync, insn_syscall, insn_tlbp,
62 insn_tlbwr, insn_wait, insn_wsbh, insn_xor, insn_xori, insn_yield, 63 insn_tlbr, insn_tlbwi, insn_tlbwr, insn_wait, insn_wsbh, insn_xor,
63 insn_lddir, insn_ldpte, 64 insn_xori, insn_yield, insn_lddir, insn_ldpte,
64}; 65};
65 66
66struct insn { 67struct insn {
@@ -268,10 +269,15 @@ I_u1s2(_bltz)
268I_u1s2(_bltzl) 269I_u1s2(_bltzl)
269I_u1u2s3(_bne) 270I_u1u2s3(_bne)
270I_u2s3u1(_cache) 271I_u2s3u1(_cache)
272I_u1u2(_cfc1)
273I_u2u1(_cfcmsa)
274I_u1u2(_ctc1)
275I_u2u1(_ctcmsa)
271I_u1u2u3(_dmfc0) 276I_u1u2u3(_dmfc0)
272I_u1u2u3(_dmtc0) 277I_u1u2u3(_dmtc0)
273I_u2u1s3(_daddiu) 278I_u2u1s3(_daddiu)
274I_u3u1u2(_daddu) 279I_u3u1u2(_daddu)
280I_u1(_di);
275I_u1u2(_divu) 281I_u1u2(_divu)
276I_u2u1u3(_dsll) 282I_u2u1u3(_dsll)
277I_u2u1u3(_dsll32) 283I_u2u1u3(_dsll32)
@@ -301,6 +307,8 @@ I_u1(_mfhi)
301I_u1(_mflo) 307I_u1(_mflo)
302I_u1u2u3(_mtc0) 308I_u1u2u3(_mtc0)
303I_u1u2u3(_mthc0) 309I_u1u2u3(_mthc0)
310I_u1(_mthi)
311I_u1(_mtlo)
304I_u3u1u2(_mul) 312I_u3u1u2(_mul)
305I_u2u1u3(_ori) 313I_u2u1u3(_ori)
306I_u3u1u2(_or) 314I_u3u1u2(_or)