diff options
author | Alexander Graf <agraf@suse.de> | 2010-01-15 08:49:11 -0500 |
---|---|---|
committer | Marcelo Tosatti <mtosatti@redhat.com> | 2010-03-01 10:35:52 -0500 |
commit | 180a34d2d3fda0151154f9cead4aab9dddd3d0c1 (patch) | |
tree | d55552acc176645c374496b988823071e50bca23 /arch/powerpc/include/asm | |
parent | d5e528136cda31a32ff7d1eaa8d06220eb443781 (diff) |
KVM: PPC: Add support for FPU/Altivec/VSX
When our guest starts using either the FPU, Altivec or VSX we need to make
sure Linux knows about it and sneak into its process switching code
accordingly.
This patch makes accesses to the above parts of the system work inside the
VM.
Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/powerpc/include/asm')
-rw-r--r-- | arch/powerpc/include/asm/kvm_host.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/arch/powerpc/include/asm/kvm_host.h b/arch/powerpc/include/asm/kvm_host.h index f7215e622df..c30a70c6b93 100644 --- a/arch/powerpc/include/asm/kvm_host.h +++ b/arch/powerpc/include/asm/kvm_host.h | |||
@@ -172,9 +172,20 @@ struct kvm_vcpu_arch { | |||
172 | struct kvmppc_mmu mmu; | 172 | struct kvmppc_mmu mmu; |
173 | #endif | 173 | #endif |
174 | 174 | ||
175 | u64 fpr[32]; | ||
176 | ulong gpr[32]; | 175 | ulong gpr[32]; |
177 | 176 | ||
177 | u64 fpr[32]; | ||
178 | u32 fpscr; | ||
179 | |||
180 | #ifdef CONFIG_ALTIVEC | ||
181 | vector128 vr[32]; | ||
182 | vector128 vscr; | ||
183 | #endif | ||
184 | |||
185 | #ifdef CONFIG_VSX | ||
186 | u64 vsr[32]; | ||
187 | #endif | ||
188 | |||
178 | ulong pc; | 189 | ulong pc; |
179 | ulong ctr; | 190 | ulong ctr; |
180 | ulong lr; | 191 | ulong lr; |
@@ -188,6 +199,7 @@ struct kvm_vcpu_arch { | |||
188 | #ifdef CONFIG_PPC64 | 199 | #ifdef CONFIG_PPC64 |
189 | ulong shadow_msr; | 200 | ulong shadow_msr; |
190 | ulong hflags; | 201 | ulong hflags; |
202 | ulong guest_owned_ext; | ||
191 | #endif | 203 | #endif |
192 | u32 mmucr; | 204 | u32 mmucr; |
193 | ulong sprg0; | 205 | ulong sprg0; |