summaryrefslogtreecommitdiff
path: root/arch/s390/kvm/interrupt.c
diff options
context:
space:
mode:
authorJanosch Frank <frankja@linux.ibm.com>2024-02-20 11:56:34 +0300
committerHeiko Carstens <hca@linux.ibm.com>2024-02-21 17:09:13 +0300
commit4a5993287467d2d0401503256dc9d2690c7f2020 (patch)
treeb0cfbebe89c5e2b9c571dd203b8098f7b1327598 /arch/s390/kvm/interrupt.c
parent778666df60f0d96f215e33e27448de47a2207fb3 (diff)
downloadlinux-4a5993287467d2d0401503256dc9d2690c7f2020.tar.xz
KVM: s390: introduce kvm_s390_fpu_(store|load)
It's a bit nicer than having multiple lines and will help if there's another re-work since we'll only have to change one location. Signed-off-by: Janosch Frank <frankja@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Diffstat (limited to 'arch/s390/kvm/interrupt.c')
-rw-r--r--arch/s390/kvm/interrupt.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/arch/s390/kvm/interrupt.c b/arch/s390/kvm/interrupt.c
index c81708acd1f4..dc721d50a942 100644
--- a/arch/s390/kvm/interrupt.c
+++ b/arch/s390/kvm/interrupt.c
@@ -584,11 +584,7 @@ static int __write_machine_check(struct kvm_vcpu *vcpu,
mci.val = mchk->mcic;
/* take care of lazy register loading */
- fpu_stfpc(&vcpu->run->s.regs.fpc);
- if (cpu_has_vx())
- save_vx_regs((__vector128 *)&vcpu->run->s.regs.vrs);
- else
- save_fp_regs((freg_t *)&vcpu->run->s.regs.fprs);
+ kvm_s390_fpu_store(vcpu->run);
save_access_regs(vcpu->run->s.regs.acrs);
if (MACHINE_HAS_GS && vcpu->arch.gs_enabled)
save_gs_cb(current->thread.gs_cb);