[PATCH] whpx: fix FP register loop

Osama Abdelkader posted 1 patch 1 month, 3 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260217210805.104427-1-osama.abdelkader@gmail.com
Maintainers: Pedro Barbuda <pbarbuda@microsoft.com>, Mohamed Mediouni <mohamed@unpredictable.fr>, Peter Maydell <peter.maydell@linaro.org>
target/arm/whpx/whpx-all.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[PATCH] whpx: fix FP register loop
Posted by Osama Abdelkader 1 month, 3 weeks ago
In whpx_get_registers and whpx_set_registers the loops over FP registers
were using whpx_reg_match[i].reg instead of whpx_fpreg_match[i].reg

Signed-off-by: Osama Abdelkader <osama.abdelkader@gmail.com>
---
 target/arm/whpx/whpx-all.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/arm/whpx/whpx-all.c b/target/arm/whpx/whpx-all.c
index b0602266af..40ada2d5b6 100644
--- a/target/arm/whpx/whpx-all.c
+++ b/target/arm/whpx/whpx-all.c
@@ -554,7 +554,7 @@ void whpx_get_registers(CPUState *cpu)
     }
 
     for (i = 0; i < ARRAY_SIZE(whpx_fpreg_match); i++) {
-        whpx_get_reg(cpu, whpx_reg_match[i].reg, &val);
+        whpx_get_reg(cpu, whpx_fpreg_match[i].reg, &val);
         memcpy((char *)env + whpx_fpreg_match[i].offset, &val, sizeof(val.Reg128));
     }
 
@@ -605,7 +605,7 @@ void whpx_set_registers(CPUState *cpu, int level)
 
     for (i = 0; i < ARRAY_SIZE(whpx_fpreg_match); i++) {
         memcpy(&val.Reg128, (char *)env + whpx_fpreg_match[i].offset, sizeof(val.Reg128));
-        whpx_set_reg(cpu, whpx_reg_match[i].reg, val);
+        whpx_set_reg(cpu, whpx_fpreg_match[i].reg, val);
     }
 
     clean_whv_register_value(&val);
-- 
2.43.0
Re: [PATCH] whpx: fix FP register loop
Posted by Peter Maydell 1 month, 3 weeks ago
On Tue, 17 Feb 2026 at 21:08, Osama Abdelkader
<osama.abdelkader@gmail.com> wrote:
>
> In whpx_get_registers and whpx_set_registers the loops over FP registers
> were using whpx_reg_match[i].reg instead of whpx_fpreg_match[i].reg
>
> Signed-off-by: Osama Abdelkader <osama.abdelkader@gmail.com>
> ---
>  target/arm/whpx/whpx-all.c | 4 ++--



Applied to target-arm.next, thanks.

-- PMM
Re: [PATCH] whpx: fix FP register loop
Posted by Philippe Mathieu-Daudé 1 month, 3 weeks ago
On 17/2/26 22:08, Osama Abdelkader wrote:
> In whpx_get_registers and whpx_set_registers the loops over FP registers
> were using whpx_reg_match[i].reg instead of whpx_fpreg_match[i].reg
> 
> Signed-off-by: Osama Abdelkader <osama.abdelkader@gmail.com>
> ---
>   target/arm/whpx/whpx-all.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>

Re: [PATCH] whpx: fix FP register loop
Posted by Mohamed Mediouni 1 month, 3 weeks ago

> On 17. Feb 2026, at 22:08, Osama Abdelkader <osama.abdelkader@gmail.com> wrote:
> 
> In whpx_get_registers and whpx_set_registers the loops over FP registers
> were using whpx_reg_match[i].reg instead of whpx_fpreg_match[i].reg
> 
> Signed-off-by: Osama Abdelkader <osama.abdelkader@gmail.com>
> ---

Reviewed-by: Mohamed Mediouni <mohamed@unpredictable.fr <mailto:mohamed@unpredictable.fr>>

Thank you,
> target/arm/whpx/whpx-all.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/target/arm/whpx/whpx-all.c b/target/arm/whpx/whpx-all.c
> index b0602266af..40ada2d5b6 100644
> --- a/target/arm/whpx/whpx-all.c
> +++ b/target/arm/whpx/whpx-all.c
> @@ -554,7 +554,7 @@ void whpx_get_registers(CPUState *cpu)
>     }
> 
>     for (i = 0; i < ARRAY_SIZE(whpx_fpreg_match); i++) {
> -        whpx_get_reg(cpu, whpx_reg_match[i].reg, &val);
> +        whpx_get_reg(cpu, whpx_fpreg_match[i].reg, &val);
>         memcpy((char *)env + whpx_fpreg_match[i].offset, &val, sizeof(val.Reg128));
>     }
> 
> @@ -605,7 +605,7 @@ void whpx_set_registers(CPUState *cpu, int level)
> 
>     for (i = 0; i < ARRAY_SIZE(whpx_fpreg_match); i++) {
>         memcpy(&val.Reg128, (char *)env + whpx_fpreg_match[i].offset, sizeof(val.Reg128));
> -        whpx_set_reg(cpu, whpx_reg_match[i].reg, val);
> +        whpx_set_reg(cpu, whpx_fpreg_match[i].reg, val);
>     }
> 
>     clean_whv_register_value(&val);
> -- 
> 2.43.0
>