From 180a34d2d3fda0151154f9cead4aab9dddd3d0c1 Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Fri, 15 Jan 2010 14:49:11 +0100 Subject: 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 Signed-off-by: Avi Kivity --- arch/powerpc/include/asm/kvm_host.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'arch/powerpc/include') diff --git a/arch/powerpc/include/asm/kvm_host.h b/arch/powerpc/include/asm/kvm_host.h index f7215e622dfd..c30a70c6b931 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 { struct kvmppc_mmu mmu; #endif - u64 fpr[32]; ulong gpr[32]; + u64 fpr[32]; + u32 fpscr; + +#ifdef CONFIG_ALTIVEC + vector128 vr[32]; + vector128 vscr; +#endif + +#ifdef CONFIG_VSX + u64 vsr[32]; +#endif + ulong pc; ulong ctr; ulong lr; @@ -188,6 +199,7 @@ struct kvm_vcpu_arch { #ifdef CONFIG_PPC64 ulong shadow_msr; ulong hflags; + ulong guest_owned_ext; #endif u32 mmucr; ulong sprg0; -- cgit v1.2.2