summaryrefslogtreecommitdiffstats
path: root/hw/s390x/sclp.c
diff options
context:
space:
mode:
authorPeter Maydell2020-01-27 14:02:36 +0100
committerPeter Maydell2020-01-27 14:02:36 +0100
commit105b07f1ba462ec48b27e5cb74ddf81c6a79364c (patch)
treeb52e9840a334833a45da239ca8b6f9902f3217d6 /hw/s390x/sclp.c
parentMerge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging (diff)
parents390x: sigp: Fix sense running reporting (diff)
downloadqemu-105b07f1ba462ec48b27e5cb74ddf81c6a79364c.tar.gz
qemu-105b07f1ba462ec48b27e5cb74ddf81c6a79364c.tar.xz
qemu-105b07f1ba462ec48b27e5cb74ddf81c6a79364c.zip
Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20200127' into staging
s390x changes: - kvm: re-enable adapter interrupt suppression (AIS) - fixes and cleanups # gpg: Signature made Mon 27 Jan 2020 12:14:12 GMT # gpg: using RSA key C3D0D66DC3624FF6A8C018CEDECF6B93C6F02FAF # gpg: issuer "cohuck@redhat.com" # gpg: Good signature from "Cornelia Huck <conny@cornelia-huck.de>" [marginal] # gpg: aka "Cornelia Huck <huckc@linux.vnet.ibm.com>" [full] # gpg: aka "Cornelia Huck <cornelia.huck@de.ibm.com>" [full] # gpg: aka "Cornelia Huck <cohuck@kernel.org>" [marginal] # gpg: aka "Cornelia Huck <cohuck@redhat.com>" [marginal] # Primary key fingerprint: C3D0 D66D C362 4FF6 A8C0 18CE DECF 6B93 C6F0 2FAF * remotes/cohuck/tags/s390x-20200127: s390x: sigp: Fix sense running reporting hw/s390x: Add a more verbose comment about get_machine_class() and the wrappers target/s390x: Remove DisasFields argument from extract_insn target/s390x: Move DisasFields into DisasContext target/s390x: Pass DisasContext to get_field and have_field target/s390x: Remove DisasFields argument from callbacks target/s390x: Move struct DisasFields definition earlier target/s390x/kvm: Enable adapter interruption suppression again docs/devel: fix stable process doc formatting target/s390x: Remove duplicated ifdef macro s390x/event-facility: fix error propagation s390x: adapter routes error handling s390x/event-facility.c: remove unneeded labels intc/s390_flic_kvm.c: remove unneeded label in kvm_flic_load() s390x/sclp.c: remove unneeded label in sclp_service_call() Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/s390x/sclp.c')
-rw-r--r--hw/s390x/sclp.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/hw/s390x/sclp.c b/hw/s390x/sclp.c
index f57ce7b739..af0bfbc2ec 100644
--- a/hw/s390x/sclp.c
+++ b/hw/s390x/sclp.c
@@ -197,24 +197,20 @@ int sclp_service_call(CPUS390XState *env, uint64_t sccb, uint32_t code)
{
SCLPDevice *sclp = get_sclp_device();
SCLPDeviceClass *sclp_c = SCLP_GET_CLASS(sclp);
- int r = 0;
SCCB work_sccb;
hwaddr sccb_len = sizeof(SCCB);
/* first some basic checks on program checks */
if (env->psw.mask & PSW_MASK_PSTATE) {
- r = -PGM_PRIVILEGED;
- goto out;
+ return -PGM_PRIVILEGED;
}
if (cpu_physical_memory_is_io(sccb)) {
- r = -PGM_ADDRESSING;
- goto out;
+ return -PGM_ADDRESSING;
}
if ((sccb & ~0x1fffUL) == 0 || (sccb & ~0x1fffUL) == env->psa
|| (sccb & ~0x7ffffff8UL) != 0) {
- r = -PGM_SPECIFICATION;
- goto out;
+ return -PGM_SPECIFICATION;
}
/*
@@ -226,8 +222,7 @@ int sclp_service_call(CPUS390XState *env, uint64_t sccb, uint32_t code)
/* Valid sccb sizes */
if (be16_to_cpu(work_sccb.h.length) < sizeof(SCCBHeader)) {
- r = -PGM_SPECIFICATION;
- goto out;
+ return -PGM_SPECIFICATION;
}
switch (code & SCLP_CMD_CODE_MASK) {
@@ -257,8 +252,7 @@ out_write:
sclp_c->service_interrupt(sclp, sccb);
-out:
- return r;
+ return 0;
}
static void service_interrupt(SCLPDevice *sclp, uint32_t sccb)