On 6/24/25 2:27 AM, Thomas Huth wrote:
On 23/06/2025 22.12, jro...@linux.ibm.com wrote:
From: Jared Rossi <jro...@linux.ibm.com>
Replace a recently introduced legacy API call with the preferred API
call.
fixes: 0927875 (hw/s390x: Build an IPLB for each boot device)
Signed-off-by: Jared Rossi <jro...@linux.ibm.com>
---
hw/s390x/ipl.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/hw/s390x/ipl.c b/hw/s390x/ipl.c
index 2f082396c7..f2606303e6 100644
--- a/hw/s390x/ipl.c
+++ b/hw/s390x/ipl.c
@@ -399,8 +399,16 @@ static uint64_t
s390_ipl_map_iplb_chain(IplParameterBlock *iplb_chain)
uint16_t count = be16_to_cpu(ipl->qipl.chain_len);
uint64_t len = sizeof(IplParameterBlock) * count;
uint64_t chain_addr =
find_iplb_chain_addr(ipl->bios_start_addr, count);
+ MemTxResult ret;
+
+ ret = address_space_write(&address_space_memory, chain_addr,
+ MEMTXATTRS_UNSPECIFIED, iplb_chain, len);
+
+ if (ret != MEMTX_OK) {
+ error_report("Failed to map IPLB chain.");
+ exit(1);
+ }
- cpu_physical_memory_write(chain_addr, iplb_chain, len);
By using address_space_memory, you're basically open-coding
cpu_physical_memory_write() here. That does not make too much sense.
If I got Philippe right in
https://lore.kernel.org/qemu-devel/469f3e5a-897a-4456-bd02-185435129...@linaro.org/
, he rather asked about a device specific address space instead.
However, that ipl device does not have its own address space as far as
I can see, so that request does not make much sense here (unless I
missed something). Thus I'd suggest to drop this patch here.
Thomas
Yes, it is basically the same. I interpreted Philippe's request to mean
avoid introducing new calls to cpu_physical_memory_* functions as per
the documentation in load-stores.rst. If the request was to use a
device specific address space, then Thomas is correct and it cannot done
be here.
Regards,
Jared Rossi