Patch "KVM: PPC: Fix ONE_REG AltiVec support" has been added to the 4.4-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
KVM: PPC: Fix ONE_REG AltiVec support
to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
kvm-ppc-fix-one_reg-altivec-support.patch
and it can be found in the queue-4.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
b4d7f161feb3015d6306e1d35b565c888ff70c9dMon Sep 17 00:00:00 2001
From: Greg Kurz <[email protected]>
Date: Wed, 13 Jan 2016 18:28:17 +0100
Subject: KVM: PPC: Fix ONE_REG AltiVec support
From: Greg Kurz <[email protected]>
commit b4d7f161feb3015d6306e1d35b565c888ff70c9d upstream.
The get and set operations got exchanged by mistake when moving the code from book3s.c to powerpc.c.
--- arch/powerpc/kvm/powerpc.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-)
arch/powerpc/kvm/powerpc.c +10 -10
@@ -919,21 +919,17 @@ int kvm_vcpu_ioctl_get_one_reg(struct kv r = -ENXIO ; break; } - vcpu->arch.vr.vr[reg->id -KVM_REG_PPC_VR0 ] = val.vval; + val.vval = vcpu->arch.vr.vr[reg->id -KVM_REG_PPC_VR0 ];break ;case KVM_REG_PPC_VSCR :if (!cpu_has_feature (CPU_FTR_ALTIVEC )) { r = -ENXIO ;break ; } - vcpu->arch.vr.vscr.u[3 ] =set_reg_val (reg->id, val); + val =get_reg_val (reg->id, vcpu->arch.vr.vscr.u[3 ]);break ;case KVM_REG_PPC_VRSAVE : -if (!cpu_has_feature (CPU_FTR_ALTIVEC )) { - r = -ENXIO ; -break ; - } - vcpu->arch.vrsave =set_reg_val (reg->id, val); + val =get_reg_val (reg->id, vcpu->arch.vrsave);break ;#endif /* CONFIG_ALTIVEC */ default :
@@ -974,17 +970,21 @@ int kvm_vcpu_ioctl_set_one_reg(struct kv r = -ENXIO ; break; } - val.vval = vcpu->arch.vr.vr[reg->id -KVM_REG_PPC_VR0 ]; + vcpu->arch.vr.vr[reg->id -KVM_REG_PPC_VR0 ] = val.vval;break ;case KVM_REG_PPC_VSCR :if (!cpu_has_feature (CPU_FTR_ALTIVEC )) { r = -ENXIO ;break ; } - val =get_reg_val (reg->id, vcpu->arch.vr.vscr.u[3 ]); + vcpu->arch.vr.vscr.u[3 ] =set_reg_val (reg->id, val);break ;case KVM_REG_PPC_VRSAVE : - val =get_reg_val (reg->id, vcpu->arch.vrsave); +if (!cpu_has_feature (CPU_FTR_ALTIVEC )) { + r = -ENXIO ; +break ; + } + vcpu->arch.vrsave =set_reg_val (reg->id, val);break ;#endif /* CONFIG_ALTIVEC */ default :
Patches currently in stable-queue which might be from [email protected] are
queue-4.4/kvm-ppc-fix-one_reg-altivec-support.patch