[PATCH 06/18] target/s390x: Replace target_ulong -> hwaddr in get_phys_page_debug()

Philippe Mathieu-Daudé posted 18 patches 1 month ago
Maintainers: Halil Pasic <pasic@linux.ibm.com>, Christian Borntraeger <borntraeger@linux.ibm.com>, Eric Farman <farman@linux.ibm.com>, Farhan Ali <alifm@linux.ibm.com>, Thomas Huth <thuth@redhat.com>, Matthew Rosato <mjrosato@linux.ibm.com>, Richard Henderson <richard.henderson@linaro.org>, Ilya Leoshkevich <iii@linux.ibm.com>, David Hildenbrand <david@kernel.org>
There is a newer version of this series
[PATCH 06/18] target/s390x: Replace target_ulong -> hwaddr in get_phys_page_debug()
Posted by Philippe Mathieu-Daudé 1 month ago
mmu_translate() fills a hwaddr type.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 target/s390x/helper.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/s390x/helper.c b/target/s390x/helper.c
index a6c89ed0af3..59e1fd0c4fe 100644
--- a/target/s390x/helper.c
+++ b/target/s390x/helper.c
@@ -43,7 +43,7 @@ hwaddr s390_cpu_get_phys_page_debug(CPUState *cs, vaddr vaddr)
 {
     S390CPU *cpu = S390_CPU(cs);
     CPUS390XState *env = &cpu->env;
-    target_ulong raddr;
+    hwaddr raddr;
     int prot;
     uint64_t asc = env->psw.mask & PSW_MASK_ASC;
     uint64_t tec;
-- 
2.52.0


Re: [PATCH 06/18] target/s390x: Replace target_ulong -> hwaddr in get_phys_page_debug()
Posted by Thomas Huth 1 month ago
On 07/01/2026 14.07, Philippe Mathieu-Daudé wrote:
> mmu_translate() fills a hwaddr type.

Does this depend on another patch series again? Currently mmu_translate is 
still defined like this:

int mmu_translate(CPUS390XState *env, target_ulong vaddr, int rw, uint64_t asc,
                   target_ulong *raddr, int *flags, uint64_t *tec)

i.e. the "raddr" parameter is still a target_ulong pointer.

  Thomas


> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   target/s390x/helper.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/target/s390x/helper.c b/target/s390x/helper.c
> index a6c89ed0af3..59e1fd0c4fe 100644
> --- a/target/s390x/helper.c
> +++ b/target/s390x/helper.c
> @@ -43,7 +43,7 @@ hwaddr s390_cpu_get_phys_page_debug(CPUState *cs, vaddr vaddr)
>   {
>       S390CPU *cpu = S390_CPU(cs);
>       CPUS390XState *env = &cpu->env;
> -    target_ulong raddr;
> +    hwaddr raddr;
>       int prot;
>       uint64_t asc = env->psw.mask & PSW_MASK_ASC;
>       uint64_t tec;


Re: [PATCH 06/18] target/s390x: Replace target_ulong -> hwaddr in get_phys_page_debug()
Posted by Philippe Mathieu-Daudé 1 month ago
On 8/1/26 08:37, Thomas Huth wrote:
> On 07/01/2026 14.07, Philippe Mathieu-Daudé wrote:
>> mmu_translate() fills a hwaddr type.
> 
> Does this depend on another patch series again?

I was not expecting dependencies but indeed I'm based on top of
a branch of 272 patches waiting to be merged, so I might have
missed something.

> Currently mmu_translate 
> is still defined like this:
> 
> int mmu_translate(CPUS390XState *env, target_ulong vaddr, int rw, 
> uint64_t asc,
>                    target_ulong *raddr, int *flags, uint64_t *tec)
> 
> i.e. the "raddr" parameter is still a target_ulong pointer.

I tried to arrange patches for incremental changes and bisectability,
but might have failed. That'll be simpler with your "change all of these
in mmu_helper.c in one go." suggestion from next patch.

> 
>   Thomas
> 
> 
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>> ---
>>   target/s390x/helper.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/target/s390x/helper.c b/target/s390x/helper.c
>> index a6c89ed0af3..59e1fd0c4fe 100644
>> --- a/target/s390x/helper.c
>> +++ b/target/s390x/helper.c
>> @@ -43,7 +43,7 @@ hwaddr s390_cpu_get_phys_page_debug(CPUState *cs, 
>> vaddr vaddr)
>>   {
>>       S390CPU *cpu = S390_CPU(cs);
>>       CPUS390XState *env = &cpu->env;
>> -    target_ulong raddr;
>> +    hwaddr raddr;
>>       int prot;
>>       uint64_t asc = env->psw.mask & PSW_MASK_ASC;
>>       uint64_t tec;
>