MIPS: KVM: Use tlb_write_random
MIPS: KVM: Use tlb_write_random

When MIPS KVM needs to write a TLB entry for the guest it reads the
CP0_Random register, uses it to generate the CP_Index, and writes the
TLB entry using the TLBWI instruction (tlb_write_indexed()).

However there's an instruction for that, TLBWR (tlb_write_random()) so
use that instead.

This happens to also fix an issue with Ingenic XBurst cores where the
same TLB entry is replaced each time preventing forward progress on
stores due to alternating between TLB load misses for the instruction
fetch and TLB store misses.

Signed-off-by: James Hogan <547fa85bb3888a0222eed8ec39e36708605c6d53@imgtec.com>
Cc: Paolo Bonzini <69d3ebcf5ee4e7f05a50dc23cd96655b730804b4@redhat.com>
Cc: Gleb Natapov <03189597947f75187c4136ade35aec34feed9dc1@kernel.org>
Cc: 8c364499b63077b3209a702ecef6203a4c06f926@vger.kernel.org
Cc: Ralf Baechle <92f48d309cda194c8eda36aa8f9ae28c488fa208@linux-mips.org>
Cc: 562397917b9a8bf316569a848858b12fb417723f@linux-mips.org
Cc: Sanjay Lal <ce98397e1fd764362380e1f394a6c68d73be1d1c@kymasys.com>
Signed-off-by: Paolo Bonzini <69d3ebcf5ee4e7f05a50dc23cd96655b730804b4@redhat.com>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs