diff options
author | Thomas Huth <thuth@linux.vnet.ibm.com> | 2013-09-19 10:26:18 -0400 |
---|---|---|
committer | Cornelia Huck <cornelia.huck@de.ibm.com> | 2013-11-28 05:08:10 -0500 |
commit | 210b1607012cc9034841a393e0591b2c86d9e26c (patch) | |
tree | 76a6752ba4ccfc5b1d9ff86283b874a9242ba642 | |
parent | 0a00a775d2a49d16efba721c786859844184599c (diff) |
KVM: s390: Removed SIE_INTERCEPT_UCONTROL
The SIE_INTERCEPT_UCONTROL can be removed by moving the related code
from kvm_arch_vcpu_ioctl_run() to vcpu_post_run().
Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
-rw-r--r-- | arch/s390/kvm/kvm-s390.c | 24 | ||||
-rw-r--r-- | arch/s390/kvm/kvm-s390.h | 2 |
2 files changed, 6 insertions, 20 deletions
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c index 569494e01ec6..7f4783525144 100644 --- a/arch/s390/kvm/kvm-s390.c +++ b/arch/s390/kvm/kvm-s390.c | |||
@@ -732,14 +732,12 @@ static int vcpu_post_run(struct kvm_vcpu *vcpu, int exit_reason) | |||
732 | 732 | ||
733 | if (exit_reason >= 0) { | 733 | if (exit_reason >= 0) { |
734 | rc = 0; | 734 | rc = 0; |
735 | } else { | 735 | } else if (kvm_is_ucontrol(vcpu->kvm)) { |
736 | if (kvm_is_ucontrol(vcpu->kvm)) { | 736 | vcpu->run->exit_reason = KVM_EXIT_S390_UCONTROL; |
737 | rc = SIE_INTERCEPT_UCONTROL; | 737 | vcpu->run->s390_ucontrol.trans_exc_code = |
738 | } else { | 738 | current->thread.gmap_addr; |
739 | VCPU_EVENT(vcpu, 3, "%s", "fault in sie instruction"); | 739 | vcpu->run->s390_ucontrol.pgm_code = 0x10; |
740 | trace_kvm_s390_sie_fault(vcpu); | 740 | rc = -EREMOTE; |
741 | rc = kvm_s390_inject_program_int(vcpu, PGM_ADDRESSING); | ||
742 | } | ||
743 | } | 741 | } |
744 | 742 | ||
745 | memcpy(&vcpu->run->s.regs.gprs[14], &vcpu->arch.sie_block->gg14, 16); | 743 | memcpy(&vcpu->run->s.regs.gprs[14], &vcpu->arch.sie_block->gg14, 16); |
@@ -833,16 +831,6 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) | |||
833 | rc = -EINTR; | 831 | rc = -EINTR; |
834 | } | 832 | } |
835 | 833 | ||
836 | #ifdef CONFIG_KVM_S390_UCONTROL | ||
837 | if (rc == SIE_INTERCEPT_UCONTROL) { | ||
838 | kvm_run->exit_reason = KVM_EXIT_S390_UCONTROL; | ||
839 | kvm_run->s390_ucontrol.trans_exc_code = | ||
840 | current->thread.gmap_addr; | ||
841 | kvm_run->s390_ucontrol.pgm_code = 0x10; | ||
842 | rc = 0; | ||
843 | } | ||
844 | #endif | ||
845 | |||
846 | if (rc == -EOPNOTSUPP) { | 834 | if (rc == -EOPNOTSUPP) { |
847 | /* intercept cannot be handled in-kernel, prepare kvm-run */ | 835 | /* intercept cannot be handled in-kernel, prepare kvm-run */ |
848 | kvm_run->exit_reason = KVM_EXIT_S390_SIEIC; | 836 | kvm_run->exit_reason = KVM_EXIT_S390_SIEIC; |
diff --git a/arch/s390/kvm/kvm-s390.h b/arch/s390/kvm/kvm-s390.h index b44912a32949..aad541fc9098 100644 --- a/arch/s390/kvm/kvm-s390.h +++ b/arch/s390/kvm/kvm-s390.h | |||
@@ -27,8 +27,6 @@ typedef int (*intercept_handler_t)(struct kvm_vcpu *vcpu); | |||
27 | /* declare vfacilities extern */ | 27 | /* declare vfacilities extern */ |
28 | extern unsigned long *vfacilities; | 28 | extern unsigned long *vfacilities; |
29 | 29 | ||
30 | /* negativ values are error codes, positive values for internal conditions */ | ||
31 | #define SIE_INTERCEPT_UCONTROL (1<<0) | ||
32 | int kvm_handle_sie_intercept(struct kvm_vcpu *vcpu); | 30 | int kvm_handle_sie_intercept(struct kvm_vcpu *vcpu); |
33 | 31 | ||
34 | #define VM_EVENT(d_kvm, d_loglevel, d_string, d_args...)\ | 32 | #define VM_EVENT(d_kvm, d_loglevel, d_string, d_args...)\ |