[PATCH 14/27] KVM: PPC: Magic Page BookE support
Liu Yu-B13201
B13201 at freescale.com
Mon Jul 12 21:24:23 EST 2010
> -----Original Message-----
> From: kvm-owner at vger.kernel.org
> [mailto:kvm-owner at vger.kernel.org] On Behalf Of Alexander Graf
> Sent: Thursday, July 01, 2010 6:43 PM
> To: kvm-ppc at vger.kernel.org
> Cc: KVM list; linuxppc-dev
> Subject: [PATCH 14/27] KVM: PPC: Magic Page BookE support
>
> As we now have Book3s support for the magic page, we also
> need BookE to
> join in on the party.
>
> This patch implements generic magic page logic for BookE and specific
> TLB logic for e500. I didn't have any 440 around, so I didn't dare to
> blindly try and write up broken code.
>
> Signed-off-by: Alexander Graf <agraf at suse.de>
> ---
> arch/powerpc/kvm/booke.c | 29 +++++++++++++++++++++++++++++
> arch/powerpc/kvm/e500_tlb.c | 19 +++++++++++++++++--
> 2 files changed, 46 insertions(+), 2 deletions(-)
>
> diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c
> index 0f8ff9d..9609207 100644
> --- a/arch/powerpc/kvm/booke.c
> +++ b/arch/powerpc/kvm/booke.c
> @@ -380,6 +406,9 @@ int kvmppc_handle_exit(struct kvm_run
> *run, struct kvm_vcpu *vcpu,
> gpa_t gpaddr;
> gfn_t gfn;
>
> + if (kvmppc_dtlb_magic_page(vcpu, eaddr))
> + break;
> +
> /* Check the guest TLB. */
> gtlb_index = kvmppc_mmu_dtlb_index(vcpu, eaddr);
> if (gtlb_index < 0) {
How about moving this part into tlb search fail path?
More information about the Linuxppc-dev
mailing list