aboutsummaryrefslogtreecommitdiff
path: root/target
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@linaro.org>2023-11-06 07:55:22 +0100
committerPhilippe Mathieu-Daudé <philmd@linaro.org>2023-11-07 13:08:48 +0100
commit6d3910c9dbad5ff47c43214397f7afef9645ceb7 (patch)
tree478e4c8784bf1e408ed0938d253ec80f58207e1f /target
parent6233759ae15302e0ea60b8cda849fcd2c01d8098 (diff)
downloadqemu-6d3910c9dbad5ff47c43214397f7afef9645ceb7.zip
qemu-6d3910c9dbad5ff47c43214397f7afef9645ceb7.tar.gz
qemu-6d3910c9dbad5ff47c43214397f7afef9645ceb7.tar.bz2
hw/s390x/sclp: Have sclp_service_call[_protected]() take S390CPU*
"hw/s390x/sclp.h" is a header used by target-agnostic objects (such hw/char/sclpconsole[-lm].c), thus can not use target-specific types, such CPUS390XState. Have sclp_service_call[_protected]() take a S390CPU pointer, which is target-agnostic. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-Id: <20231106114500.5269-3-philmd@linaro.org>
Diffstat (limited to 'target')
-rw-r--r--target/s390x/kvm/kvm.c4
-rw-r--r--target/s390x/tcg/misc_helper.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/target/s390x/kvm/kvm.c b/target/s390x/kvm/kvm.c
index 1ddad0b..33ab355 100644
--- a/target/s390x/kvm/kvm.c
+++ b/target/s390x/kvm/kvm.c
@@ -1174,12 +1174,12 @@ static void kvm_sclp_service_call(S390CPU *cpu, struct kvm_run *run,
break;
case ICPT_PV_INSTR:
g_assert(s390_is_pv());
- sclp_service_call_protected(env, sccb, code);
+ sclp_service_call_protected(cpu, sccb, code);
/* Setting the CC is done by the Ultravisor. */
break;
case ICPT_INSTRUCTION:
g_assert(!s390_is_pv());
- r = sclp_service_call(env, sccb, code);
+ r = sclp_service_call(cpu, sccb, code);
if (r < 0) {
kvm_s390_program_interrupt(cpu, -r);
return;
diff --git a/target/s390x/tcg/misc_helper.c b/target/s390x/tcg/misc_helper.c
index 56c7f00..6aa7907 100644
--- a/target/s390x/tcg/misc_helper.c
+++ b/target/s390x/tcg/misc_helper.c
@@ -102,7 +102,7 @@ uint64_t HELPER(stck)(CPUS390XState *env)
uint32_t HELPER(servc)(CPUS390XState *env, uint64_t r1, uint64_t r2)
{
qemu_mutex_lock_iothread();
- int r = sclp_service_call(env, r1, r2);
+ int r = sclp_service_call(env_archcpu(env), r1, r2);
qemu_mutex_unlock_iothread();
if (r < 0) {
tcg_s390_program_interrupt(env, -r, GETPC());