diff options
Diffstat (limited to 'arch/s390/kvm/kvm-s390.c')
-rw-r--r-- | arch/s390/kvm/kvm-s390.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c index f17296e4fc89..dc2b580e27bc 100644 --- a/arch/s390/kvm/kvm-s390.c +++ b/arch/s390/kvm/kvm-s390.c | |||
@@ -123,6 +123,7 @@ int kvm_dev_ioctl_check_extension(long ext) | |||
123 | 123 | ||
124 | switch (ext) { | 124 | switch (ext) { |
125 | case KVM_CAP_S390_PSW: | 125 | case KVM_CAP_S390_PSW: |
126 | case KVM_CAP_S390_GMAP: | ||
126 | r = 1; | 127 | r = 1; |
127 | break; | 128 | break; |
128 | default: | 129 | default: |
@@ -263,10 +264,12 @@ void kvm_arch_vcpu_load(struct kvm_vcpu *vcpu, int cpu) | |||
263 | vcpu->arch.guest_fpregs.fpc &= FPC_VALID_MASK; | 264 | vcpu->arch.guest_fpregs.fpc &= FPC_VALID_MASK; |
264 | restore_fp_regs(&vcpu->arch.guest_fpregs); | 265 | restore_fp_regs(&vcpu->arch.guest_fpregs); |
265 | restore_access_regs(vcpu->arch.guest_acrs); | 266 | restore_access_regs(vcpu->arch.guest_acrs); |
267 | gmap_enable(vcpu->arch.gmap); | ||
266 | } | 268 | } |
267 | 269 | ||
268 | void kvm_arch_vcpu_put(struct kvm_vcpu *vcpu) | 270 | void kvm_arch_vcpu_put(struct kvm_vcpu *vcpu) |
269 | { | 271 | { |
272 | gmap_disable(vcpu->arch.gmap); | ||
270 | save_fp_regs(&vcpu->arch.guest_fpregs); | 273 | save_fp_regs(&vcpu->arch.guest_fpregs); |
271 | save_access_regs(vcpu->arch.guest_acrs); | 274 | save_access_regs(vcpu->arch.guest_acrs); |
272 | restore_fp_regs(&vcpu->arch.host_fpregs); | 275 | restore_fp_regs(&vcpu->arch.host_fpregs); |
@@ -461,7 +464,6 @@ static void __vcpu_run(struct kvm_vcpu *vcpu) | |||
461 | local_irq_disable(); | 464 | local_irq_disable(); |
462 | kvm_guest_enter(); | 465 | kvm_guest_enter(); |
463 | local_irq_enable(); | 466 | local_irq_enable(); |
464 | gmap_enable(vcpu->arch.gmap); | ||
465 | VCPU_EVENT(vcpu, 6, "entering sie flags %x", | 467 | VCPU_EVENT(vcpu, 6, "entering sie flags %x", |
466 | atomic_read(&vcpu->arch.sie_block->cpuflags)); | 468 | atomic_read(&vcpu->arch.sie_block->cpuflags)); |
467 | if (sie64a(vcpu->arch.sie_block, vcpu->arch.guest_gprs)) { | 469 | if (sie64a(vcpu->arch.sie_block, vcpu->arch.guest_gprs)) { |
@@ -470,7 +472,6 @@ static void __vcpu_run(struct kvm_vcpu *vcpu) | |||
470 | } | 472 | } |
471 | VCPU_EVENT(vcpu, 6, "exit sie icptcode %d", | 473 | VCPU_EVENT(vcpu, 6, "exit sie icptcode %d", |
472 | vcpu->arch.sie_block->icptcode); | 474 | vcpu->arch.sie_block->icptcode); |
473 | gmap_disable(vcpu->arch.gmap); | ||
474 | local_irq_disable(); | 475 | local_irq_disable(); |
475 | kvm_guest_exit(); | 476 | kvm_guest_exit(); |
476 | local_irq_enable(); | 477 | local_irq_enable(); |