diff options
Diffstat (limited to 'arch/s390/kvm/intercept.c')
-rw-r--r-- | arch/s390/kvm/intercept.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/arch/s390/kvm/intercept.c b/arch/s390/kvm/intercept.c index 950c13ecaf60..71af87dbb42c 100644 --- a/arch/s390/kvm/intercept.c +++ b/arch/s390/kvm/intercept.c | |||
@@ -30,8 +30,6 @@ static int handle_lctlg(struct kvm_vcpu *vcpu) | |||
30 | int reg, rc; | 30 | int reg, rc; |
31 | 31 | ||
32 | vcpu->stat.instruction_lctlg++; | 32 | vcpu->stat.instruction_lctlg++; |
33 | if ((vcpu->arch.sie_block->ipb & 0xff) != 0x2f) | ||
34 | return -EOPNOTSUPP; | ||
35 | 33 | ||
36 | useraddr = kvm_s390_get_base_disp_rsy(vcpu); | 34 | useraddr = kvm_s390_get_base_disp_rsy(vcpu); |
37 | 35 | ||
@@ -95,6 +93,21 @@ static int handle_lctl(struct kvm_vcpu *vcpu) | |||
95 | return 0; | 93 | return 0; |
96 | } | 94 | } |
97 | 95 | ||
96 | static const intercept_handler_t eb_handlers[256] = { | ||
97 | [0x2f] = handle_lctlg, | ||
98 | [0x8a] = kvm_s390_handle_priv_eb, | ||
99 | }; | ||
100 | |||
101 | static int handle_eb(struct kvm_vcpu *vcpu) | ||
102 | { | ||
103 | intercept_handler_t handler; | ||
104 | |||
105 | handler = eb_handlers[vcpu->arch.sie_block->ipb & 0xff]; | ||
106 | if (handler) | ||
107 | return handler(vcpu); | ||
108 | return -EOPNOTSUPP; | ||
109 | } | ||
110 | |||
98 | static const intercept_handler_t instruction_handlers[256] = { | 111 | static const intercept_handler_t instruction_handlers[256] = { |
99 | [0x01] = kvm_s390_handle_01, | 112 | [0x01] = kvm_s390_handle_01, |
100 | [0x82] = kvm_s390_handle_lpsw, | 113 | [0x82] = kvm_s390_handle_lpsw, |
@@ -104,7 +117,7 @@ static const intercept_handler_t instruction_handlers[256] = { | |||
104 | [0xb7] = handle_lctl, | 117 | [0xb7] = handle_lctl, |
105 | [0xb9] = kvm_s390_handle_b9, | 118 | [0xb9] = kvm_s390_handle_b9, |
106 | [0xe5] = kvm_s390_handle_e5, | 119 | [0xe5] = kvm_s390_handle_e5, |
107 | [0xeb] = handle_lctlg, | 120 | [0xeb] = handle_eb, |
108 | }; | 121 | }; |
109 | 122 | ||
110 | static int handle_noop(struct kvm_vcpu *vcpu) | 123 | static int handle_noop(struct kvm_vcpu *vcpu) |