summaryrefslogtreecommitdiff
path: root/arch/powerpc/kvm/book3s_paired_singles.c
diff options
context:
space:
mode:
authorAnton Blanchard <anton@samba.org>2015-10-29 00:44:05 (GMT)
committerMichael Ellerman <mpe@ellerman.id.au>2015-12-01 02:52:25 (GMT)
commitdc4fbba11e4661a6a77a1f89ba32f9082e6395ff (patch)
tree567037dc8e93063615e558eda1c80f8a82154749 /arch/powerpc/kvm/book3s_paired_singles.c
parenta0e72cf12b1a1f159b6822ed2e1e41893d996fc7 (diff)
downloadlinux-dc4fbba11e4661a6a77a1f89ba32f9082e6395ff.tar.xz
powerpc: Create disable_kernel_{fp,altivec,vsx,spe}()
The enable_kernel_*() functions leave the relevant MSR bits enabled until we exit the kernel sometime later. Create disable versions that wrap the kernel use of FP, Altivec VSX or SPE. While we don't want to disable it normally for performance reasons (MSR writes are slow), it will be used for a debug boot option that does this and catches bad uses in other areas of the kernel. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/kvm/book3s_paired_singles.c')
-rw-r--r--arch/powerpc/kvm/book3s_paired_singles.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/powerpc/kvm/book3s_paired_singles.c b/arch/powerpc/kvm/book3s_paired_singles.c
index a759d9a..eab96cf 100644
--- a/arch/powerpc/kvm/book3s_paired_singles.c
+++ b/arch/powerpc/kvm/book3s_paired_singles.c
@@ -1265,6 +1265,7 @@ int kvmppc_emulate_paired_single(struct kvm_run *run, struct kvm_vcpu *vcpu)
if (rcomp)
kvmppc_set_cr(vcpu, cr);
+ disable_kernel_fp();
preempt_enable();
return emulated;