From: Thomas Huth <thuth@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Richard Henderson" <richard.henderson@linaro.org>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: [PULL 4/9] target/s390x: Propagate CPUS390XState to cpu_unmap_lowcore()
Date: Fri, 10 Oct 2025 10:21:39 +0200 [thread overview]
Message-ID: <20251010082145.576222-5-thuth@redhat.com> (raw)
In-Reply-To: <20251010082145.576222-1-thuth@redhat.com>
From: Philippe Mathieu-Daudé <philmd@linaro.org>
To be able to access the CPU state in cpu_unmap_lowcore()
in the next commit, propagate it as argument.
cpu_map_lowcore() already takes it.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20251002091132.65703-6-philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
target/s390x/s390x-internal.h | 2 +-
target/s390x/helper.c | 4 ++--
target/s390x/tcg/excp_helper.c | 10 +++++-----
target/s390x/tcg/misc_helper.c | 4 ++--
4 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/target/s390x/s390x-internal.h b/target/s390x/s390x-internal.h
index 56cce2e7f50..1fb752aa1d6 100644
--- a/target/s390x/s390x-internal.h
+++ b/target/s390x/s390x-internal.h
@@ -327,7 +327,7 @@ hwaddr s390_cpu_get_phys_addr_debug(CPUState *cpu, vaddr addr);
int s390_store_status(S390CPU *cpu, hwaddr addr, bool store_arch);
int s390_store_adtl_status(S390CPU *cpu, hwaddr addr, hwaddr len);
LowCore *cpu_map_lowcore(CPUS390XState *env);
-void cpu_unmap_lowcore(LowCore *lowcore);
+void cpu_unmap_lowcore(CPUS390XState *env, LowCore *lowcore);
#endif /* CONFIG_USER_ONLY */
diff --git a/target/s390x/helper.c b/target/s390x/helper.c
index 5c127da1a6a..a6d4a1ce05d 100644
--- a/target/s390x/helper.c
+++ b/target/s390x/helper.c
@@ -117,7 +117,7 @@ LowCore *cpu_map_lowcore(CPUS390XState *env)
return lowcore;
}
-void cpu_unmap_lowcore(LowCore *lowcore)
+void cpu_unmap_lowcore(CPUS390XState *env, LowCore *lowcore)
{
cpu_physical_memory_unmap(lowcore, sizeof(LowCore), 1, sizeof(LowCore));
}
@@ -134,7 +134,7 @@ void do_restart_interrupt(CPUS390XState *env)
mask = be64_to_cpu(lowcore->restart_new_psw.mask);
addr = be64_to_cpu(lowcore->restart_new_psw.addr);
- cpu_unmap_lowcore(lowcore);
+ cpu_unmap_lowcore(env, lowcore);
env->pending_int &= ~INTERRUPT_RESTART;
s390_cpu_set_psw(env, mask, addr);
diff --git a/target/s390x/tcg/excp_helper.c b/target/s390x/tcg/excp_helper.c
index 5e1d4dc9583..0ae4e266065 100644
--- a/target/s390x/tcg/excp_helper.c
+++ b/target/s390x/tcg/excp_helper.c
@@ -285,7 +285,7 @@ static void do_program_interrupt(CPUS390XState *env)
addr = be64_to_cpu(lowcore->program_new_psw.addr);
lowcore->per_breaking_event_addr = cpu_to_be64(env->gbea);
- cpu_unmap_lowcore(lowcore);
+ cpu_unmap_lowcore(env, lowcore);
s390_cpu_set_psw(env, mask, addr);
}
@@ -304,7 +304,7 @@ static void do_svc_interrupt(CPUS390XState *env)
mask = be64_to_cpu(lowcore->svc_new_psw.mask);
addr = be64_to_cpu(lowcore->svc_new_psw.addr);
- cpu_unmap_lowcore(lowcore);
+ cpu_unmap_lowcore(env, lowcore);
s390_cpu_set_psw(env, mask, addr);
@@ -378,7 +378,7 @@ static void do_ext_interrupt(CPUS390XState *env)
lowcore->external_old_psw.mask = cpu_to_be64(s390_cpu_get_psw_mask(env));
lowcore->external_old_psw.addr = cpu_to_be64(env->psw.addr);
- cpu_unmap_lowcore(lowcore);
+ cpu_unmap_lowcore(env, lowcore);
s390_cpu_set_psw(env, mask, addr);
}
@@ -405,7 +405,7 @@ static void do_io_interrupt(CPUS390XState *env)
mask = be64_to_cpu(lowcore->io_new_psw.mask);
addr = be64_to_cpu(lowcore->io_new_psw.addr);
- cpu_unmap_lowcore(lowcore);
+ cpu_unmap_lowcore(env, lowcore);
g_free(io);
s390_cpu_set_psw(env, mask, addr);
@@ -491,7 +491,7 @@ static void do_mchk_interrupt(CPUS390XState *env)
mask = be64_to_cpu(lowcore->mcck_new_psw.mask);
addr = be64_to_cpu(lowcore->mcck_new_psw.addr);
- cpu_unmap_lowcore(lowcore);
+ cpu_unmap_lowcore(env, lowcore);
s390_cpu_set_psw(env, mask, addr);
}
diff --git a/target/s390x/tcg/misc_helper.c b/target/s390x/tcg/misc_helper.c
index f7101be5745..6d9d601d29a 100644
--- a/target/s390x/tcg/misc_helper.c
+++ b/target/s390x/tcg/misc_helper.c
@@ -570,7 +570,7 @@ uint32_t HELPER(tpi)(CPUS390XState *env, uint64_t addr)
lowcore->subchannel_nr = cpu_to_be16(io->nr);
lowcore->io_int_parm = cpu_to_be32(io->parm);
lowcore->io_int_word = cpu_to_be32(io->word);
- cpu_unmap_lowcore(lowcore);
+ cpu_unmap_lowcore(env, lowcore);
}
g_free(io);
@@ -700,7 +700,7 @@ void HELPER(stfl)(CPUS390XState *env)
lowcore = cpu_map_lowcore(env);
prepare_stfl();
memcpy(&lowcore->stfl_fac_list, stfl_bytes, sizeof(lowcore->stfl_fac_list));
- cpu_unmap_lowcore(lowcore);
+ cpu_unmap_lowcore(env, lowcore);
}
#endif
--
2.51.0
next prev parent reply other threads:[~2025-10-10 8:24 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-10 8:21 [PULL 0/9] s390x patches (+ 1 functional test patch) Thomas Huth
2025-10-10 8:21 ` [PULL 1/9] tests/functional: Drop the "Attempting to cache ..." log text Thomas Huth
2025-10-10 8:21 ` [PULL 2/9] s390x/pci: fix interrupt blocking by returning only the device's summary bit Thomas Huth
2025-10-10 8:21 ` [PULL 3/9] target/s390x: Replace legacy cpu_physical_memory_[un]map() calls (1/3) Thomas Huth
2025-10-10 8:21 ` Thomas Huth [this message]
2025-10-10 8:21 ` [PULL 5/9] target/s390x: Replace legacy cpu_physical_memory_[un]map() calls (2/3) Thomas Huth
2025-10-10 8:21 ` [PULL 6/9] target/s390x: Reduce s390_store_adtl_status() scope Thomas Huth
2025-10-10 8:21 ` [PULL 7/9] target/s390x: Reduce s390_store_status() scope Thomas Huth
2025-10-10 8:21 ` [PULL 8/9] target/s390x: Replace legacy cpu_physical_memory_[un]map() calls (3/3) Thomas Huth
2025-10-10 8:21 ` [PULL 9/9] s390x/pci: set kvm_msi_via_irqfd_allowed Thomas Huth
2025-10-10 19:03 ` [PULL 0/9] s390x patches (+ 1 functional test patch) Richard Henderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251010082145.576222-5-thuth@redhat.com \
--to=thuth@redhat.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).