summaryrefslogtreecommitdiffstats
path: root/arch/s390/kvm/kvm-s390.c
diff options
context:
space:
mode:
authorHendrik Brueckner2015-06-29 16:43:06 +0200
committerMartin Schwidefsky2015-08-03 10:04:37 +0200
commitd0164ee20d98847d3c777a0ae90e678e7ac1e416 (patch)
tree524bb68d1e46da8876da38e683b5474a7ec7f7ac /arch/s390/kvm/kvm-s390.c
parents390/pci: use pci_rescan_remove_lock (diff)
downloadkernel-qcow2-linux-d0164ee20d98847d3c777a0ae90e678e7ac1e416.tar.gz
kernel-qcow2-linux-d0164ee20d98847d3c777a0ae90e678e7ac1e416.tar.xz
kernel-qcow2-linux-d0164ee20d98847d3c777a0ae90e678e7ac1e416.zip
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/kvm-s390.c')
-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)
void kvm_arch_vcpu_load(struct kvm_vcpu *vcpu, int cpu)
{
/* Save host register state */
- save_fpu_regs(&current->thread.fpu);
+ save_fpu_regs();
save_fpu_to(&vcpu->arch.host_fpregs);
if (test_kvm_facility(vcpu->kvm, 129)) {
@@ -1256,7 +1256,7 @@ void kvm_arch_vcpu_put(struct kvm_vcpu *vcpu)
atomic_clear_mask(CPUSTAT_RUNNING, &vcpu->arch.sie_block->cpuflags);
gmap_disable(vcpu->arch.gmap);
- save_fpu_regs(&current->thread.fpu);
+ save_fpu_regs();
if (test_kvm_facility(vcpu->kvm, 129))
/*
@@ -1671,7 +1671,7 @@ int kvm_arch_vcpu_ioctl_set_fpu(struct kvm_vcpu *vcpu, struct kvm_fpu *fpu)
return -EINVAL;
memcpy(vcpu->arch.guest_fpregs.fprs, &fpu->fprs, sizeof(fpu->fprs));
vcpu->arch.guest_fpregs.fpc = fpu->fpc;
- save_fpu_regs(&current->thread.fpu);
+ save_fpu_regs();
load_fpu_from(&vcpu->arch.guest_fpregs);
return 0;
}
@@ -2241,7 +2241,7 @@ int kvm_s390_vcpu_store_status(struct kvm_vcpu *vcpu, unsigned long addr)
* copying in vcpu load/put. Lets update our copies before we save
* it into the save area
*/
- save_fpu_regs(&current->thread.fpu);
+ save_fpu_regs();
if (test_kvm_facility(vcpu->kvm, 129)) {
/*
* 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)
*
* Let's update our copies before we save it into the save area.
*/
- save_fpu_regs(&current->thread.fpu);
+ save_fpu_regs();
return kvm_s390_store_adtl_status_unloaded(vcpu, addr);
}