aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Graf <agraf@suse.de>2010-04-15 18:11:39 -0400
committerAvi Kivity <avi@redhat.com>2010-05-17 05:18:24 -0400
commit66bb170655799a0149df0844fb8232f27e54323c (patch)
tree54b6db500ad01fde269c55bb6b5d06518908d82c
parent8c60b9fb0f9dca8adb0143456245041e7a036c2f (diff)
KVM: PPC: Add fields to shadow vcpu
After a lot of thought on how to make the entry / exit code easier, I figured it'd be clever to put even more register state into the shadow vcpu. That way we have more registers available to use, making the code easier to read. So this patch adds a few new fields to that shadow vcpu. Later on we will remove the originals from the vcpu and paca. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Avi Kivity <avi@redhat.com>
-rw-r--r--arch/powerpc/include/asm/kvm_book3s_asm.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/kvm_book3s_asm.h b/arch/powerpc/include/asm/kvm_book3s_asm.h
index 183461b48407..e915e7dfa622 100644
--- a/arch/powerpc/include/asm/kvm_book3s_asm.h
+++ b/arch/powerpc/include/asm/kvm_book3s_asm.h
@@ -63,12 +63,33 @@ struct kvmppc_book3s_shadow_vcpu {
63 ulong gpr[14]; 63 ulong gpr[14];
64 u32 cr; 64 u32 cr;
65 u32 xer; 65 u32 xer;
66
67 u32 fault_dsisr;
68 u32 last_inst;
69 ulong ctr;
70 ulong lr;
71 ulong pc;
72 ulong shadow_srr1;
73 ulong fault_dar;
74
66 ulong host_r1; 75 ulong host_r1;
67 ulong host_r2; 76 ulong host_r2;
68 ulong handler; 77 ulong handler;
69 ulong scratch0; 78 ulong scratch0;
70 ulong scratch1; 79 ulong scratch1;
71 ulong vmhandler; 80 ulong vmhandler;
81 u8 in_guest;
82
83#ifdef CONFIG_PPC_BOOK3S_32
84 u32 sr[16]; /* Guest SRs */
85#endif
86#ifdef CONFIG_PPC_BOOK3S_64
87 u8 slb_max; /* highest used guest slb entry */
88 struct {
89 u64 esid;
90 u64 vsid;
91 } slb[64]; /* guest SLB */
92#endif
72}; 93};
73 94
74#endif /*__ASSEMBLY__ */ 95#endif /*__ASSEMBLY__ */