MIPS: KVM: Recognise r6 CACHE encoding
Recognise the new MIPSr6 CACHE instruction encoding rather than the pre-r6 one when an r6 kernel is being built. A SPECIAL3 opcode is used and the immediate field is reduced to 9 bits wide since MIPSr6. Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Radim KrÄmář <rkrcmar@redhat.com> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:

committed by
Paolo Bonzini

parent
2e0badfaac
commit
5cc4aafced
@@ -72,7 +72,10 @@ int kvm_mips_trans_cache_va(union mips_instruction inst, u32 *opc,
|
||||
synci_inst.i_format.opcode = bcond_op;
|
||||
synci_inst.i_format.rs = inst.i_format.rs;
|
||||
synci_inst.i_format.rt = synci_op;
|
||||
synci_inst.i_format.simmediate = inst.i_format.simmediate;
|
||||
if (cpu_has_mips_r6)
|
||||
synci_inst.i_format.simmediate = inst.spec3_format.simmediate;
|
||||
else
|
||||
synci_inst.i_format.simmediate = inst.i_format.simmediate;
|
||||
|
||||
return kvm_mips_trans_replace(vcpu, opc, synci_inst);
|
||||
}
|
||||
|
Reference in New Issue
Block a user