Searched hist:"7 eef87dc99e419b1cc051e4417c37e4744d7b661" (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/arch/s390/kvm/ |
H A D | kvm-s390.c | diff 851755871c1f3184f4124c466e85881f17fa3226 Mon Feb 06 03:59:02 CST 2012 Christian Borntraeger <borntraeger@de.ibm.com> KVM: s390: Sanitize fpc registers for KVM_SET_FPU
commit 7eef87dc99e419b1cc051e4417c37e4744d7b661 (KVM: s390: fix register setting) added a load of the floating point control register to the KVM_SET_FPU path. Lets make sure that the fpc is valid.
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com> diff 7eef87dc99e419b1cc051e4417c37e4744d7b661 Tue Oct 18 05:27:14 CDT 2011 Carsten Otte <cotte@de.ibm.com> KVM: s390: fix register setting
KVM common code does vcpu_load prior to calling our arch ioctls and vcpu_put after we're done here. Via the kvm_arch_vcpu_load/put callbacks we do load the fpu and access register state into the processor, which saves us moving the state on every SIE exit the kernel handles. However this breaks register setting from userspace, because of the following sequence: 1a. vcpu load stores userspace register content 1b. vcpu load loads guest register content 2. kvm_arch_vcpu_ioctl_set_fpu/sregs updates saved guest register content 3a. vcpu put stores the guest registers and overwrites the new content 3b. vcpu put loads the userspace register set again
This patch loads the new guest register state into the cpu, so that the correct (new) set of guest registers will be stored in step 3a.
Signed-off-by: Carsten Otte <cotte@de.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
|