diff options
| -rw-r--r-- | arch/s390/kvm/kvm-s390.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c index ba694d2ba51e..34c1c9a90be2 100644 --- a/arch/s390/kvm/kvm-s390.c +++ b/arch/s390/kvm/kvm-s390.c | |||
| @@ -702,14 +702,25 @@ static int __vcpu_run(struct kvm_vcpu *vcpu) | |||
| 702 | return rc; | 702 | return rc; |
| 703 | 703 | ||
| 704 | vcpu->arch.sie_block->icptcode = 0; | 704 | vcpu->arch.sie_block->icptcode = 0; |
| 705 | preempt_disable(); | ||
| 706 | kvm_guest_enter(); | ||
| 707 | preempt_enable(); | ||
| 708 | VCPU_EVENT(vcpu, 6, "entering sie flags %x", | 705 | VCPU_EVENT(vcpu, 6, "entering sie flags %x", |
| 709 | atomic_read(&vcpu->arch.sie_block->cpuflags)); | 706 | atomic_read(&vcpu->arch.sie_block->cpuflags)); |
| 710 | trace_kvm_s390_sie_enter(vcpu, | 707 | trace_kvm_s390_sie_enter(vcpu, |
| 711 | atomic_read(&vcpu->arch.sie_block->cpuflags)); | 708 | atomic_read(&vcpu->arch.sie_block->cpuflags)); |
| 709 | |||
| 710 | /* | ||
| 711 | * As PF_VCPU will be used in fault handler, between guest_enter | ||
| 712 | * and guest_exit should be no uaccess. | ||
| 713 | */ | ||
| 714 | preempt_disable(); | ||
| 715 | kvm_guest_enter(); | ||
| 716 | preempt_enable(); | ||
| 712 | rc = sie64a(vcpu->arch.sie_block, vcpu->run->s.regs.gprs); | 717 | rc = sie64a(vcpu->arch.sie_block, vcpu->run->s.regs.gprs); |
| 718 | kvm_guest_exit(); | ||
| 719 | |||
| 720 | VCPU_EVENT(vcpu, 6, "exit sie icptcode %d", | ||
| 721 | vcpu->arch.sie_block->icptcode); | ||
| 722 | trace_kvm_s390_sie_exit(vcpu, vcpu->arch.sie_block->icptcode); | ||
| 723 | |||
| 713 | if (rc > 0) | 724 | if (rc > 0) |
| 714 | rc = 0; | 725 | rc = 0; |
| 715 | if (rc < 0) { | 726 | if (rc < 0) { |
| @@ -721,10 +732,6 @@ static int __vcpu_run(struct kvm_vcpu *vcpu) | |||
| 721 | rc = kvm_s390_inject_program_int(vcpu, PGM_ADDRESSING); | 732 | rc = kvm_s390_inject_program_int(vcpu, PGM_ADDRESSING); |
| 722 | } | 733 | } |
| 723 | } | 734 | } |
| 724 | VCPU_EVENT(vcpu, 6, "exit sie icptcode %d", | ||
| 725 | vcpu->arch.sie_block->icptcode); | ||
| 726 | trace_kvm_s390_sie_exit(vcpu, vcpu->arch.sie_block->icptcode); | ||
| 727 | kvm_guest_exit(); | ||
| 728 | 735 | ||
| 729 | memcpy(&vcpu->run->s.regs.gprs[14], &vcpu->arch.sie_block->gg14, 16); | 736 | memcpy(&vcpu->run->s.regs.gprs[14], &vcpu->arch.sie_block->gg14, 16); |
| 730 | return rc; | 737 | return rc; |
