diff options
author | James Hogan <james.hogan@imgtec.com> | 2014-01-17 12:01:31 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2014-01-24 22:39:56 +0100 |
commit | 08596b0a757824df775cac0f4fa06975f578d3b2 (patch) | |
tree | d600208c08034e523dbd3466c32f83fea01521e5 /arch/mips/sgi-ip27/ip27-smp.c | |
parent | e36059e508c209703c3a60ef716a5b524fb0a832 (diff) |
MIPS: KVM: remove shadow_tlb code
The kvm_mips_init_shadow_tlb() function is called from
kvm_arch_vcpu_init() and initialises entries 0 to
current_cpu_data.tlbsize-1 of the virtual cpu's shadow_tlb[64] array.
However newer cores with FTLBs can have a tlbsize > 64, for example the
ProAptiv I'm testing on has a total tlbsize of 576. This causes
kvm_mips_init_shadow_tlb() to overflow the shadow_tlb[64] array and
overwrite the comparecount_timer among other things, causing a lock up
when starting a KVM guest.
Aside from kvm_mips_init_shadow_tlb() which only initialises it, the
shadow_tlb[64] array is only actually used by the following functions:
- kvm_shadow_tlb_put() & kvm_shadow_tlb_load()
These are never called. The only call sites are #if 0'd out.
- kvm_mips_dump_shadow_tlbs()
This is never called.
It was originally added for trap & emulate, but turned out to be
unnecessary so it was disabled.
So instead of fixing the shadow_tlb initialisation code, lets just
remove the shadow_tlb[64] array and the above functions entirely. The
only functional change here is the removal of broken shadow_tlb
initialisation. The rest just deletes dead code.
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Cc: Gleb Natapov <gleb@redhat.com>
Cc: kvm@vger.kernel.org
Cc: Sanjay Lal <sanjayl@kymasys.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: John Crispin <blogic@openwrt.org>
Patchwork: http://patchwork.linux-mips.org/patch/6384/
Diffstat (limited to 'arch/mips/sgi-ip27/ip27-smp.c')
0 files changed, 0 insertions, 0 deletions