aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kvm/intercept.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/s390/kvm/intercept.c')
-rw-r--r--arch/s390/kvm/intercept.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/s390/kvm/intercept.c b/arch/s390/kvm/intercept.c
index 5ddbbde6f65c..eeb1ac7d8fa4 100644
--- a/arch/s390/kvm/intercept.c
+++ b/arch/s390/kvm/intercept.c
@@ -112,6 +112,17 @@ static int handle_instruction(struct kvm_vcpu *vcpu)
112static int handle_prog(struct kvm_vcpu *vcpu) 112static int handle_prog(struct kvm_vcpu *vcpu)
113{ 113{
114 vcpu->stat.exit_program_interruption++; 114 vcpu->stat.exit_program_interruption++;
115
116 /* Restore ITDB to Program-Interruption TDB in guest memory */
117 if (IS_TE_ENABLED(vcpu) &&
118 !(current->thread.per_flags & PER_FLAG_NO_TE) &&
119 IS_ITDB_VALID(vcpu)) {
120 copy_to_guest(vcpu, TDB_ADDR, vcpu->arch.sie_block->itdba,
121 sizeof(struct kvm_s390_itdb));
122 memset((void *) vcpu->arch.sie_block->itdba, 0,
123 sizeof(struct kvm_s390_itdb));
124 }
125
115 trace_kvm_s390_intercept_prog(vcpu, vcpu->arch.sie_block->iprcc); 126 trace_kvm_s390_intercept_prog(vcpu, vcpu->arch.sie_block->iprcc);
116 return kvm_s390_inject_program_int(vcpu, vcpu->arch.sie_block->iprcc); 127 return kvm_s390_inject_program_int(vcpu, vcpu->arch.sie_block->iprcc);
117} 128}