aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kvm
diff options
context:
space:
mode:
authorHendrik Brueckner <brueckner@linux.vnet.ibm.com>2015-06-29 10:43:06 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2015-08-03 04:04:37 -0400
commitd0164ee20d98847d3c777a0ae90e678e7ac1e416 (patch)
tree524bb68d1e46da8876da38e683b5474a7ec7f7ac /arch/s390/kvm
parent2a01bd1bd3d28d1eef26d5509c95d0923f7dc75c (diff)
s390/kernel: remove save_fpu_regs() parameter and use __LC_CURRENT instead
All calls to save_fpu_regs() specify the fpu structure of the current task pointer as parameter. The task pointer of the current task can also be retrieved from the CPU lowcore directly. Remove the parameter definition, load the __LC_CURRENT task pointer from the CPU lowcore, and rebase the FPU structure onto the task structure. Apply the same approach for the load_fpu_regs() function. Reviewed-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kvm')
-rw-r--r--arch/s390/kvm/kvm-s390.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
index c0cceaf4a92e..1903f0212bd0 100644
--- a/arch/s390/kvm/kvm-s390.c
+++ b/arch/s390/kvm/kvm-s390.c
@@ -1224,7 +1224,7 @@ static inline void load_fpu_from(struct fpu *from)
1224void kvm_arch_vcpu_load(struct kvm_vcpu *vcpu, int cpu) 1224void kvm_arch_vcpu_load(struct kvm_vcpu *vcpu, int cpu)
1225{ 1225{
1226 /* Save host register state */ 1226 /* Save host register state */
1227 save_fpu_regs(&current->thread.fpu); 1227 save_fpu_regs();
1228 save_fpu_to(&vcpu->arch.host_fpregs); 1228 save_fpu_to(&vcpu->arch.host_fpregs);
1229 1229
1230 if (test_kvm_facility(vcpu->kvm, 129)) { 1230 if (test_kvm_facility(vcpu->kvm, 129)) {
@@ -1256,7 +1256,7 @@ void kvm_arch_vcpu_put(struct kvm_vcpu *vcpu)
1256 atomic_clear_mask(CPUSTAT_RUNNING, &vcpu->arch.sie_block->cpuflags); 1256 atomic_clear_mask(CPUSTAT_RUNNING, &vcpu->arch.sie_block->cpuflags);
1257 gmap_disable(vcpu->arch.gmap); 1257 gmap_disable(vcpu->arch.gmap);
1258 1258
1259 save_fpu_regs(&current->thread.fpu); 1259 save_fpu_regs();
1260 1260
1261 if (test_kvm_facility(vcpu->kvm, 129)) 1261 if (test_kvm_facility(vcpu->kvm, 129))
1262 /* 1262 /*
@@ -1671,7 +1671,7 @@ int kvm_arch_vcpu_ioctl_set_fpu(struct kvm_vcpu *vcpu, struct kvm_fpu *fpu)
1671 return -EINVAL; 1671 return -EINVAL;
1672 memcpy(vcpu->arch.guest_fpregs.fprs, &fpu->fprs, sizeof(fpu->fprs)); 1672 memcpy(vcpu->arch.guest_fpregs.fprs, &fpu->fprs, sizeof(fpu->fprs));
1673 vcpu->arch.guest_fpregs.fpc = fpu->fpc; 1673 vcpu->arch.guest_fpregs.fpc = fpu->fpc;
1674 save_fpu_regs(&current->thread.fpu); 1674 save_fpu_regs();
1675 load_fpu_from(&vcpu->arch.guest_fpregs); 1675 load_fpu_from(&vcpu->arch.guest_fpregs);
1676 return 0; 1676 return 0;
1677} 1677}
@@ -2241,7 +2241,7 @@ int kvm_s390_vcpu_store_status(struct kvm_vcpu *vcpu, unsigned long addr)
2241 * copying in vcpu load/put. Lets update our copies before we save 2241 * copying in vcpu load/put. Lets update our copies before we save
2242 * it into the save area 2242 * it into the save area
2243 */ 2243 */
2244 save_fpu_regs(&current->thread.fpu); 2244 save_fpu_regs();
2245 if (test_kvm_facility(vcpu->kvm, 129)) { 2245 if (test_kvm_facility(vcpu->kvm, 129)) {
2246 /* 2246 /*
2247 * If the vector extension is available, the vector registers 2247 * If the vector extension is available, the vector registers
@@ -2288,7 +2288,7 @@ int kvm_s390_vcpu_store_adtl_status(struct kvm_vcpu *vcpu, unsigned long addr)
2288 * 2288 *
2289 * Let's update our copies before we save it into the save area. 2289 * Let's update our copies before we save it into the save area.
2290 */ 2290 */
2291 save_fpu_regs(&current->thread.fpu); 2291 save_fpu_regs();
2292 2292
2293 return kvm_s390_store_adtl_status_unloaded(vcpu, addr); 2293 return kvm_s390_store_adtl_status_unloaded(vcpu, addr);
2294} 2294}