diff options
Diffstat (limited to 'arch/powerpc/include/asm/kvm_book3s_asm.h')
-rw-r--r-- | arch/powerpc/include/asm/kvm_book3s_asm.h | 41 |
1 files changed, 33 insertions, 8 deletions
diff --git a/arch/powerpc/include/asm/kvm_book3s_asm.h b/arch/powerpc/include/asm/kvm_book3s_asm.h index d5a8a3861635..ef7b3688c3b6 100644 --- a/arch/powerpc/include/asm/kvm_book3s_asm.h +++ b/arch/powerpc/include/asm/kvm_book3s_asm.h | |||
@@ -60,6 +60,36 @@ kvmppc_resume_\intno: | |||
60 | 60 | ||
61 | #else /*__ASSEMBLY__ */ | 61 | #else /*__ASSEMBLY__ */ |
62 | 62 | ||
63 | /* | ||
64 | * This struct goes in the PACA on 64-bit processors. It is used | ||
65 | * to store host state that needs to be saved when we enter a guest | ||
66 | * and restored when we exit, but isn't specific to any particular | ||
67 | * guest or vcpu. It also has some scratch fields used by the guest | ||
68 | * exit code. | ||
69 | */ | ||
70 | struct kvmppc_host_state { | ||
71 | ulong host_r1; | ||
72 | ulong host_r2; | ||
73 | ulong host_msr; | ||
74 | ulong vmhandler; | ||
75 | ulong scratch0; | ||
76 | ulong scratch1; | ||
77 | u8 in_guest; | ||
78 | |||
79 | #ifdef CONFIG_KVM_BOOK3S_64_HV | ||
80 | struct kvm_vcpu *kvm_vcpu; | ||
81 | struct kvmppc_vcore *kvm_vcore; | ||
82 | unsigned long xics_phys; | ||
83 | u64 dabr; | ||
84 | u64 host_mmcr[3]; | ||
85 | u32 host_pmc[8]; | ||
86 | u64 host_purr; | ||
87 | u64 host_spurr; | ||
88 | u64 host_dscr; | ||
89 | u64 dec_expires; | ||
90 | #endif | ||
91 | }; | ||
92 | |||
63 | struct kvmppc_book3s_shadow_vcpu { | 93 | struct kvmppc_book3s_shadow_vcpu { |
64 | ulong gpr[14]; | 94 | ulong gpr[14]; |
65 | u32 cr; | 95 | u32 cr; |
@@ -73,17 +103,12 @@ struct kvmppc_book3s_shadow_vcpu { | |||
73 | ulong shadow_srr1; | 103 | ulong shadow_srr1; |
74 | ulong fault_dar; | 104 | ulong fault_dar; |
75 | 105 | ||
76 | ulong host_r1; | ||
77 | ulong host_r2; | ||
78 | ulong handler; | ||
79 | ulong scratch0; | ||
80 | ulong scratch1; | ||
81 | ulong vmhandler; | ||
82 | u8 in_guest; | ||
83 | |||
84 | #ifdef CONFIG_PPC_BOOK3S_32 | 106 | #ifdef CONFIG_PPC_BOOK3S_32 |
85 | u32 sr[16]; /* Guest SRs */ | 107 | u32 sr[16]; /* Guest SRs */ |
108 | |||
109 | struct kvmppc_host_state hstate; | ||
86 | #endif | 110 | #endif |
111 | |||
87 | #ifdef CONFIG_PPC_BOOK3S_64 | 112 | #ifdef CONFIG_PPC_BOOK3S_64 |
88 | u8 slb_max; /* highest used guest slb entry */ | 113 | u8 slb_max; /* highest used guest slb entry */ |
89 | struct { | 114 | struct { |