Add fields to PACA
authorAlexander Graf <agraf@suse.de>
Fri, 30 Oct 2009 05:47:22 +0000 (05:47 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Thu, 5 Nov 2009 05:50:26 +0000 (16:50 +1100)
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 <agraf@suse.de>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/include/asm/paca.h

index 7d8514ceceaeeb54314788ec2018fc375bace078..5e9b4ef71415c70b207769b8a9caa1ff486eea71 100644 (file)
@@ -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[];