diff options
author | Janosch Frank <frankja@linux.ibm.com> | 2019-10-22 10:42:52 +0200 |
---|---|---|
committer | Christian Borntraeger <borntraeger@de.ibm.com> | 2020-02-27 19:47:11 +0100 |
commit | da24a0cc58ed549dbcc3089ba3bb08ef3d7073af (patch) | |
tree | ad46491b3669c58e8d4c71545afa4fdd137c5ac4 /arch/s390/kvm/intercept.c | |
parent | KVM: s390: protvirt: Handle SE notification interceptions (diff) | |
download | linux-da24a0cc58ed549dbcc3089ba3bb08ef3d7073af.tar.xz linux-da24a0cc58ed549dbcc3089ba3bb08ef3d7073af.zip |
KVM: s390: protvirt: Instruction emulation
We have two new SIE exit codes dealing with instructions.
104 (0x68) for a secure instruction interception, on which the SIE needs
hypervisor action to complete the instruction. We can piggy-back on the
existing instruction handlers.
108 which is merely a notification and provides data for tracking and
management. For example this is used to tell the host about a new value
for the prefix register. As there will be several special case handlers
in later patches, we handle this in a separate function.
Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
[borntraeger@de.ibm.com: patch merging, splitting, fixing]
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Diffstat (limited to 'arch/s390/kvm/intercept.c')
-rw-r--r-- | arch/s390/kvm/intercept.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/s390/kvm/intercept.c b/arch/s390/kvm/intercept.c index 9090f29ae822..9966c43c6035 100644 --- a/arch/s390/kvm/intercept.c +++ b/arch/s390/kvm/intercept.c @@ -444,6 +444,11 @@ static int handle_operexc(struct kvm_vcpu *vcpu) return kvm_s390_inject_program_int(vcpu, PGM_OPERATION); } +static int handle_pv_notification(struct kvm_vcpu *vcpu) +{ + return handle_instruction(vcpu); +} + int kvm_handle_sie_intercept(struct kvm_vcpu *vcpu) { int rc, per_rc = 0; @@ -489,6 +494,12 @@ int kvm_handle_sie_intercept(struct kvm_vcpu *vcpu) */ rc = 0; break; + case ICPT_PV_INSTR: + rc = handle_instruction(vcpu); + break; + case ICPT_PV_NOTIFY: + rc = handle_pv_notification(vcpu); + break; default: return -EOPNOTSUPP; } |