Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b9e3e208 authored by Alexander Graf's avatar Alexander Graf
Browse files

KVM: PPC: E500: Remove kvmppc_e500_tlbil_all usage from guest TLB code



The guest TLB handling code should not have any insight into how the host
TLB shadow code works.

kvmppc_e500_tlbil_all() is a function that is used for distinction between
e500v2 and e500mc (E.HV) on how to flush shadow entries. This function really
is private between the e500.c/e500mc.c file and e500_mmu_host.c.

Instead of this one, use the public kvmppc_core_flush_tlb() function to flush
all shadow TLB entries. As a nice side effect, with this we also end up
flushing TLB1 entries which we forgot to do before.

Signed-off-by: default avatarAlexander Graf <agraf@suse.de>
parent 483ba97c
Loading
Loading
Loading
Loading
+4 −4
Original line number Original line Diff line number Diff line
@@ -239,8 +239,8 @@ int kvmppc_e500_emul_mt_mmucsr0(struct kvmppc_vcpu_e500 *vcpu_e500, ulong value)
		for (esel = 0; esel < vcpu_e500->gtlb_params[1].entries; esel++)
		for (esel = 0; esel < vcpu_e500->gtlb_params[1].entries; esel++)
			kvmppc_e500_gtlbe_invalidate(vcpu_e500, 1, esel);
			kvmppc_e500_gtlbe_invalidate(vcpu_e500, 1, esel);


	/* Invalidate all vcpu id mappings */
	/* Invalidate all host shadow mappings */
	kvmppc_e500_tlbil_all(vcpu_e500);
	kvmppc_core_flush_tlb(&vcpu_e500->vcpu);


	return EMULATE_DONE;
	return EMULATE_DONE;
}
}
@@ -269,8 +269,8 @@ int kvmppc_e500_emul_tlbivax(struct kvm_vcpu *vcpu, gva_t ea)
			kvmppc_e500_gtlbe_invalidate(vcpu_e500, tlbsel, esel);
			kvmppc_e500_gtlbe_invalidate(vcpu_e500, tlbsel, esel);
	}
	}


	/* Invalidate all vcpu id mappings */
	/* Invalidate all host shadow mappings */
	kvmppc_e500_tlbil_all(vcpu_e500);
	kvmppc_core_flush_tlb(&vcpu_e500->vcpu);


	return EMULATE_DONE;
	return EMULATE_DONE;
}
}