diff options
author | Alexander Graf <agraf@suse.de> | 2010-03-24 16:48:31 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2010-05-17 05:17:12 -0400 |
commit | a2b07664f6cd14836ff84a77f48566673dca00bb (patch) | |
tree | 24caf8fa84b9cf2ce2aec130ba17665b6db4d1cc /arch/powerpc/kvm/book3s.c | |
parent | ad0a048b096ac819f28667602285453468a8d8f9 (diff) |
KVM: PPC: Make build work without CONFIG_VSX/ALTIVEC
The FPU/Altivec/VSX enablement also brought access to some structure
elements that are only defined when the respective config options
are enabled.
Unfortuately I forgot to check for the config options at some places,
so let's do that now.
Unbreaks the build when CONFIG_VSX is not set.
Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/powerpc/kvm/book3s.c')
-rw-r--r-- | arch/powerpc/kvm/book3s.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/powerpc/kvm/book3s.c b/arch/powerpc/kvm/book3s.c index 7696d0f547e3..d2b3dabe2dc3 100644 --- a/arch/powerpc/kvm/book3s.c +++ b/arch/powerpc/kvm/book3s.c | |||
@@ -609,7 +609,9 @@ void kvmppc_giveup_ext(struct kvm_vcpu *vcpu, ulong msr) | |||
609 | { | 609 | { |
610 | struct thread_struct *t = ¤t->thread; | 610 | struct thread_struct *t = ¤t->thread; |
611 | u64 *vcpu_fpr = vcpu->arch.fpr; | 611 | u64 *vcpu_fpr = vcpu->arch.fpr; |
612 | #ifdef CONFIG_VSX | ||
612 | u64 *vcpu_vsx = vcpu->arch.vsr; | 613 | u64 *vcpu_vsx = vcpu->arch.vsr; |
614 | #endif | ||
613 | u64 *thread_fpr = (u64*)t->fpr; | 615 | u64 *thread_fpr = (u64*)t->fpr; |
614 | int i; | 616 | int i; |
615 | 617 | ||
@@ -689,7 +691,9 @@ static int kvmppc_handle_ext(struct kvm_vcpu *vcpu, unsigned int exit_nr, | |||
689 | { | 691 | { |
690 | struct thread_struct *t = ¤t->thread; | 692 | struct thread_struct *t = ¤t->thread; |
691 | u64 *vcpu_fpr = vcpu->arch.fpr; | 693 | u64 *vcpu_fpr = vcpu->arch.fpr; |
694 | #ifdef CONFIG_VSX | ||
692 | u64 *vcpu_vsx = vcpu->arch.vsr; | 695 | u64 *vcpu_vsx = vcpu->arch.vsr; |
696 | #endif | ||
693 | u64 *thread_fpr = (u64*)t->fpr; | 697 | u64 *thread_fpr = (u64*)t->fpr; |
694 | int i; | 698 | int i; |
695 | 699 | ||
@@ -1221,8 +1225,12 @@ int __kvmppc_vcpu_run(struct kvm_run *kvm_run, struct kvm_vcpu *vcpu) | |||
1221 | { | 1225 | { |
1222 | int ret; | 1226 | int ret; |
1223 | struct thread_struct ext_bkp; | 1227 | struct thread_struct ext_bkp; |
1228 | #ifdef CONFIG_ALTIVEC | ||
1224 | bool save_vec = current->thread.used_vr; | 1229 | bool save_vec = current->thread.used_vr; |
1230 | #endif | ||
1231 | #ifdef CONFIG_VSX | ||
1225 | bool save_vsx = current->thread.used_vsr; | 1232 | bool save_vsx = current->thread.used_vsr; |
1233 | #endif | ||
1226 | ulong ext_msr; | 1234 | ulong ext_msr; |
1227 | 1235 | ||
1228 | /* No need to go into the guest when all we do is going out */ | 1236 | /* No need to go into the guest when all we do is going out */ |