diff options
author | Scott Wood <scottwood@freescale.com> | 2011-12-20 16:34:37 +0100 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2012-04-08 11:51:14 +0200 |
commit | 4f802fe98bd5bd4fe1dd86df3e5c58546e65ad09 (patch) | |
tree | dd13f1ed180c846523a84f54b7bdfe07dce5acd9 /arch/powerpc/kvm/e500.h | |
parent | KVM: PPC: e500: refactor core-specific TLB code (diff) | |
download | linux-4f802fe98bd5bd4fe1dd86df3e5c58546e65ad09.tar.xz linux-4f802fe98bd5bd4fe1dd86df3e5c58546e65ad09.zip |
KVM: PPC: e500: Track TLB1 entries with a bitmap
Rather than invalidate everything when a TLB1 entry needs to be
taken down, keep track of which host TLB1 entries are used for
a given guest TLB1 entry, and invalidate just those entries.
Based on code from Ashish Kalra <Ashish.Kalra@freescale.com>
and Liu Yu <yu.liu@freescale.com>.
Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/powerpc/kvm/e500.h')
-rw-r--r-- | arch/powerpc/kvm/e500.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/powerpc/kvm/e500.h b/arch/powerpc/kvm/e500.h index 34cef08f1361..f4dee55ae6c7 100644 --- a/arch/powerpc/kvm/e500.h +++ b/arch/powerpc/kvm/e500.h @@ -2,6 +2,7 @@ * Copyright (C) 2008-2011 Freescale Semiconductor, Inc. All rights reserved. * * Author: Yu Liu <yu.liu@freescale.com> + * Ashish Kalra <ashish.kalra@freescale.com> * * Description: * This file is based on arch/powerpc/kvm/44x_tlb.h and @@ -25,6 +26,7 @@ #define E500_TLB_VALID 1 #define E500_TLB_DIRTY 2 +#define E500_TLB_BITMAP 4 struct tlbe_ref { pfn_t pfn; @@ -82,6 +84,9 @@ struct kvmppc_vcpu_e500 { struct page **shared_tlb_pages; int num_shared_tlb_pages; + u64 *g2h_tlb1_map; + unsigned int *h2g_tlb1_rmap; + #ifdef CONFIG_KVM_E500 u32 pid[E500_PID_NUM]; |