diff options
Diffstat (limited to 'arch/s390/kvm/kvm-s390.c')
-rw-r--r-- | arch/s390/kvm/kvm-s390.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c index 2c243124a4e2..e519860c6031 100644 --- a/arch/s390/kvm/kvm-s390.c +++ b/arch/s390/kvm/kvm-s390.c | |||
@@ -753,7 +753,7 @@ static void kvm_gmap_notifier(struct gmap *gmap, unsigned long address) | |||
753 | 753 | ||
754 | kvm_for_each_vcpu(i, vcpu, kvm) { | 754 | kvm_for_each_vcpu(i, vcpu, kvm) { |
755 | /* match against both prefix pages */ | 755 | /* match against both prefix pages */ |
756 | if (vcpu->arch.sie_block->prefix == (address & ~0x1000UL)) { | 756 | if (kvm_s390_get_prefix(vcpu) == (address & ~0x1000UL)) { |
757 | VCPU_EVENT(vcpu, 2, "gmap notifier for %lx", address); | 757 | VCPU_EVENT(vcpu, 2, "gmap notifier for %lx", address); |
758 | kvm_make_request(KVM_REQ_MMU_RELOAD, vcpu); | 758 | kvm_make_request(KVM_REQ_MMU_RELOAD, vcpu); |
759 | exit_sie_sync(vcpu); | 759 | exit_sie_sync(vcpu); |
@@ -1017,7 +1017,7 @@ retry: | |||
1017 | if (kvm_check_request(KVM_REQ_MMU_RELOAD, vcpu)) { | 1017 | if (kvm_check_request(KVM_REQ_MMU_RELOAD, vcpu)) { |
1018 | int rc; | 1018 | int rc; |
1019 | rc = gmap_ipte_notify(vcpu->arch.gmap, | 1019 | rc = gmap_ipte_notify(vcpu->arch.gmap, |
1020 | vcpu->arch.sie_block->prefix, | 1020 | kvm_s390_get_prefix(vcpu), |
1021 | PAGE_SIZE * 2); | 1021 | PAGE_SIZE * 2); |
1022 | if (rc) | 1022 | if (rc) |
1023 | return rc; | 1023 | return rc; |
@@ -1338,7 +1338,7 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) | |||
1338 | 1338 | ||
1339 | kvm_run->psw_mask = vcpu->arch.sie_block->gpsw.mask; | 1339 | kvm_run->psw_mask = vcpu->arch.sie_block->gpsw.mask; |
1340 | kvm_run->psw_addr = vcpu->arch.sie_block->gpsw.addr; | 1340 | kvm_run->psw_addr = vcpu->arch.sie_block->gpsw.addr; |
1341 | kvm_run->s.regs.prefix = vcpu->arch.sie_block->prefix; | 1341 | kvm_run->s.regs.prefix = kvm_s390_get_prefix(vcpu); |
1342 | memcpy(&kvm_run->s.regs.crs, &vcpu->arch.sie_block->gcr, 128); | 1342 | memcpy(&kvm_run->s.regs.crs, &vcpu->arch.sie_block->gcr, 128); |
1343 | 1343 | ||
1344 | if (vcpu->sigset_active) | 1344 | if (vcpu->sigset_active) |
@@ -1357,6 +1357,7 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) | |||
1357 | int kvm_s390_store_status_unloaded(struct kvm_vcpu *vcpu, unsigned long gpa) | 1357 | int kvm_s390_store_status_unloaded(struct kvm_vcpu *vcpu, unsigned long gpa) |
1358 | { | 1358 | { |
1359 | unsigned char archmode = 1; | 1359 | unsigned char archmode = 1; |
1360 | unsigned int px; | ||
1360 | u64 clkcomp; | 1361 | u64 clkcomp; |
1361 | int rc; | 1362 | int rc; |
1362 | 1363 | ||
@@ -1375,8 +1376,9 @@ int kvm_s390_store_status_unloaded(struct kvm_vcpu *vcpu, unsigned long gpa) | |||
1375 | vcpu->run->s.regs.gprs, 128); | 1376 | vcpu->run->s.regs.gprs, 128); |
1376 | rc |= write_guest_abs(vcpu, gpa + offsetof(struct save_area, psw), | 1377 | rc |= write_guest_abs(vcpu, gpa + offsetof(struct save_area, psw), |
1377 | &vcpu->arch.sie_block->gpsw, 16); | 1378 | &vcpu->arch.sie_block->gpsw, 16); |
1379 | px = kvm_s390_get_prefix(vcpu); | ||
1378 | rc |= write_guest_abs(vcpu, gpa + offsetof(struct save_area, pref_reg), | 1380 | rc |= write_guest_abs(vcpu, gpa + offsetof(struct save_area, pref_reg), |
1379 | &vcpu->arch.sie_block->prefix, 4); | 1381 | &px, 4); |
1380 | rc |= write_guest_abs(vcpu, | 1382 | rc |= write_guest_abs(vcpu, |
1381 | gpa + offsetof(struct save_area, fp_ctrl_reg), | 1383 | gpa + offsetof(struct save_area, fp_ctrl_reg), |
1382 | &vcpu->arch.guest_fpregs.fpc, 4); | 1384 | &vcpu->arch.guest_fpregs.fpc, 4); |