summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kvm/e500.h
diff options
context:
space:
mode:
authorScott Wood <scottwood@freescale.com>2011-12-20 16:34:37 +0100
committerAvi Kivity <avi@redhat.com>2012-04-08 11:51:14 +0200
commit4f802fe98bd5bd4fe1dd86df3e5c58546e65ad09 (patch)
treedd13f1ed180c846523a84f54b7bdfe07dce5acd9 /arch/powerpc/kvm/e500.h
parentKVM: PPC: e500: refactor core-specific TLB code (diff)
downloadlinux-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.h5
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];