On 6/23/25 4:12 PM, 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);

Just a small nit: the indentation seems a bit off.

> +
> +    if (ret != MEMTX_OK) {
> +        error_report("Failed to map IPLB chain.");
> +        exit(1);
> +    }
>  
> -    cpu_physical_memory_write(chain_addr, iplb_chain, len);
>      return chain_addr;
>  }
>  

Regards,
Joy

Reply via email to