[PATCH] target/loongarch: Replace VMSTATE_UINTTL() -> VMSTATE_UINT64()

Philippe Mathieu-Daudé posted 1 patch 3 days, 13 hours ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20250925004327.58764-1-philmd@linaro.org
Maintainers: Song Gao <gaosong@loongson.cn>
target/loongarch/machine.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[PATCH] target/loongarch: Replace VMSTATE_UINTTL() -> VMSTATE_UINT64()
Posted by Philippe Mathieu-Daudé 3 days, 13 hours ago
All LoongArchCPU::pc and LoongArchCPU::gpr[] fields are of
uint64_t type. Use the appropriate VMSTATE_UINT64() macro.

There is no functional change (the migration stream is not
modified), because the LoongArch targets are only built as 64-bit:

  $ git grep TARGET_LONG_BITS configs/targets/loongarch64*
  configs/targets/loongarch64-linux-user.mak:7:TARGET_LONG_BITS=64
  configs/targets/loongarch64-softmmu.mak:7:TARGET_LONG_BITS=64

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 target/loongarch/machine.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/loongarch/machine.c b/target/loongarch/machine.c
index 4e70f5c8798..bead853efe8 100644
--- a/target/loongarch/machine.c
+++ b/target/loongarch/machine.c
@@ -171,8 +171,8 @@ const VMStateDescription vmstate_loongarch_cpu = {
     .version_id = 3,
     .minimum_version_id = 3,
     .fields = (const VMStateField[]) {
-        VMSTATE_UINTTL_ARRAY(env.gpr, LoongArchCPU, 32),
-        VMSTATE_UINTTL(env.pc, LoongArchCPU),
+        VMSTATE_UINT64_ARRAY(env.gpr, LoongArchCPU, 32),
+        VMSTATE_UINT64(env.pc, LoongArchCPU),
 
         /* Remaining CSRs */
         VMSTATE_UINT64(env.CSR_CRMD, LoongArchCPU),
-- 
2.51.0


Re: [PATCH] target/loongarch: Replace VMSTATE_UINTTL() -> VMSTATE_UINT64()
Posted by gaosong 3 days, 13 hours ago
在 2025/9/25 上午8:43, Philippe Mathieu-Daudé 写道:
> All LoongArchCPU::pc and LoongArchCPU::gpr[] fields are of
> uint64_t type. Use the appropriate VMSTATE_UINT64() macro.
>
> There is no functional change (the migration stream is not
> modified), because the LoongArch targets are only built as 64-bit:
>
>    $ git grep TARGET_LONG_BITS configs/targets/loongarch64*
>    configs/targets/loongarch64-linux-user.mak:7:TARGET_LONG_BITS=64
>    configs/targets/loongarch64-softmmu.mak:7:TARGET_LONG_BITS=64
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   target/loongarch/machine.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
Reviewed-by: Song Gao <gaosong@loongson.cn>

Thanks.
Song Gao
> diff --git a/target/loongarch/machine.c b/target/loongarch/machine.c
> index 4e70f5c8798..bead853efe8 100644
> --- a/target/loongarch/machine.c
> +++ b/target/loongarch/machine.c
> @@ -171,8 +171,8 @@ const VMStateDescription vmstate_loongarch_cpu = {
>       .version_id = 3,
>       .minimum_version_id = 3,
>       .fields = (const VMStateField[]) {
> -        VMSTATE_UINTTL_ARRAY(env.gpr, LoongArchCPU, 32),
> -        VMSTATE_UINTTL(env.pc, LoongArchCPU),
> +        VMSTATE_UINT64_ARRAY(env.gpr, LoongArchCPU, 32),
> +        VMSTATE_UINT64(env.pc, LoongArchCPU),
>   
>           /* Remaining CSRs */
>           VMSTATE_UINT64(env.CSR_CRMD, LoongArchCPU),