From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexander Graf Date: Fri, 30 Oct 2009 15:47:22 +0000 Subject: [PATCH 22/27] Add fields to PACA Message-Id: <1256917647-6200-23-git-send-email-agraf@suse.de> List-Id: References: <1256917647-6200-1-git-send-email-agraf@suse.de> In-Reply-To: <1256917647-6200-1-git-send-email-agraf-l3A5Bk7waGM@public.gmane.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: kvm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Cc: Avi Kivity , kvm-ppc , Hollis Blanchard , Arnd Bergmann , Benjamin Herrenschmidt , Kevin Wolf , bphilips-l3A5Bk7waGM@public.gmane.org, Marcelo Tosatti , Olof Johansson , linuxppc-dev-mnsaURCQ41sdnm+yROfE0A@public.gmane.org For KVM we need to store some information in the PACA, so we need to extend it. This patch adds KVM SLB shadow related entries to the PACA and a field that indicates if we're inside a guest. Signed-off-by: Alexander Graf --- arch/powerpc/include/asm/paca.h | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/include/asm/paca.h b/arch/powerpc/include/asm/paca.h index 7d8514c..5e9b4ef 100644 --- a/arch/powerpc/include/asm/paca.h +++ b/arch/powerpc/include/asm/paca.h @@ -129,6 +129,15 @@ struct paca_struct { u64 system_time; /* accumulated system TB ticks */ u64 startpurr; /* PURR/TB value snapshot */ u64 startspurr; /* SPURR value snapshot */ + +#ifdef CONFIG_KVM_BOOK3S_64_HANDLER + struct { + u64 esid; + u64 vsid; + } kvm_slb[64]; /* guest SLB */ + u8 kvm_slb_max; /* highest used guest slb entry */ + u8 kvm_in_guest; /* are we inside the guest? */ +#endif }; extern struct paca_struct paca[]; -- 1.6.0.2