Linux Kernels

MIPS: KVM: Drop unused kvm_mips_sync_icache()

This change “MIPS: KVM: Drop unused kvm_mips_sync_icache()” (commit 2193c71) in Linux kernel is authored by James Hogan <james.hogan [at] imgtec.com> on Thu Jun 9 14:19:06 2016 +0100.

Description of "MIPS: KVM: Drop unused kvm_mips_sync_icache()"

The change “MIPS: KVM: Drop unused kvm_mips_sync_icache()” introduces changes as follows.

MIPS: KVM: Drop unused kvm_mips_sync_icache()

The function kvm_mips_sync_icache() is unused, so lets remove it.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Radim Krčmář <rkrcmar@redhat.com>
Cc: linux-mips@linux-mips.org
Cc: kvm@vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

Linux kernel releases containing commit 2193c71

The Linux kernel releases containing this commit are as follows.

Linux kernel code changes from "MIPS: KVM: Drop unused kvm_mips_sync_icache()"

There are 26 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 arch/mips/kvm/emulate.c | 26 --------------------------
 1 file changed, 26 deletions(-)
 
diff --git a/arch/mips/kvm/emulate.c b/arch/mips/kvm/emulate.c
index 2836668d63fc..6c2adcfd7faf 100644
--- a/arch/mips/kvm/emulate.c
+++ b/arch/mips/kvm/emulate.c
@@ -1529,32 +1529,6 @@ enum emulation_result kvm_mips_emulate_load(uint32_t inst, uint32_t cause,
 	return er;
 }
 
-int kvm_mips_sync_icache(unsigned long va, struct kvm_vcpu *vcpu)
-{
-	unsigned long offset = (va & ~PAGE_MASK);
-	struct kvm *kvm = vcpu->kvm;
-	unsigned long pa;
-	gfn_t gfn;
-	kvm_pfn_t pfn;
-
-	gfn = va >> PAGE_SHIFT;
-
-	if (gfn >= kvm->arch.guest_pmap_npages) {
-		kvm_err("%s: Invalid gfn: %#llx\n", __func__, gfn);
-		kvm_mips_dump_host_tlbs();
-		kvm_arch_vcpu_dump_regs(vcpu);
-		return -1;
-	}
-	pfn = kvm->arch.guest_pmap[gfn];
-	pa = (pfn << PAGE_SHIFT) | offset;
-
-	kvm_debug("%s: va: %#lx, unmapped: %#x\n", __func__, va,
-		  CKSEG0ADDR(pa));
-
-	local_flush_icache_range(CKSEG0ADDR(pa), 32);
-	return 0;
-}
-
 enum emulation_result kvm_mips_emulate_cache(uint32_t inst, uint32_t *opc,
 					     uint32_t cause,
 					     struct kvm_run *run,

The commit for this change in Linux stable tree is 2193c71 (patch).

Last modified: 2020/01/11 09:36