aboutsummaryrefslogtreecommitdiff
path: root/target
diff options
context:
space:
mode:
authorFei Li <sherrylf@linux.vnet.ibm.com>2017-02-17 15:40:41 +0800
committerChristian Borntraeger <borntraeger@de.ibm.com>2017-07-14 12:29:47 +0200
commit2283f4d67a0e05ae056d2077f65496c3c4df5d6f (patch)
treef7a5b032321f60bec43789b65a1c517f74df0666 /target
parent1622ffd5151ad09c47785a380531ef1ebfc95be8 (diff)
s390x/sic: realize SIC handling
Currently, we do nothing for the SIC instruction, but we need to implement it properly. Let's add proper handling in the backend code. Co-authored-by: Yi Min Zhao <zyimin@linux.vnet.ibm.com> Signed-off-by: Yi Min Zhao <zyimin@linux.vnet.ibm.com> Signed-off-by: Fei Li <sherrylf@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Diffstat (limited to 'target')
-rw-r--r--target/s390x/kvm.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/target/s390x/kvm.c b/target/s390x/kvm.c
index 7a2a7c0895..78ebe831fb 100644
--- a/target/s390x/kvm.c
+++ b/target/s390x/kvm.c
@@ -1206,7 +1206,21 @@ static int kvm_stpcifc_service_call(S390CPU *cpu, struct kvm_run *run)
static int kvm_sic_service_call(S390CPU *cpu, struct kvm_run *run)
{
- /* NOOP */
+ CPUS390XState *env = &cpu->env;
+ uint8_t r1 = (run->s390_sieic.ipa & 0x00f0) >> 4;
+ uint8_t r3 = run->s390_sieic.ipa & 0x000f;
+ uint8_t isc;
+ uint16_t mode;
+ int r;
+
+ cpu_synchronize_state(CPU(cpu));
+ mode = env->regs[r1] & 0xffff;
+ isc = (env->regs[r3] >> 27) & 0x7;
+ r = css_do_sic(env, isc, mode);
+ if (r) {
+ enter_pgmcheck(cpu, -r);
+ }
+
return 0;
}