diff mbox series

[v4,37/40] target/arm/machine: remove TARGET_AARCH64 from migration state

Message ID 20250504052914.3525365-38-pierrick.bouvier@linaro.org
State Superseded
Headers show
Series single-binary: compile target/arm twice | expand

Commit Message

Pierrick Bouvier May 4, 2025, 5:29 a.m. UTC
This exposes two new subsections for arm: vmstate_sve and vmstate_za.
Those sections have a ".needed" callback, which already allow to skip
them when not needed.

vmstate_sve .needed is checking cpu_isar_feature(aa64_sve, cpu).
vmstate_za .needed is checking ZA flag in cpu->env.svcr.

Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
---
 target/arm/machine.c | 4 ----
 1 file changed, 4 deletions(-)

Comments

Richard Henderson May 4, 2025, 4:20 p.m. UTC | #1
On 5/3/25 22:29, Pierrick Bouvier wrote:
> This exposes two new subsections for arm: vmstate_sve and vmstate_za.
> Those sections have a ".needed" callback, which already allow to skip
> them when not needed.
> 
> vmstate_sve .needed is checking cpu_isar_feature(aa64_sve, cpu).
> vmstate_za .needed is checking ZA flag in cpu->env.svcr.
> 
> Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
> ---
>   target/arm/machine.c | 4 ----
>   1 file changed, 4 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~

> 
> diff --git a/target/arm/machine.c b/target/arm/machine.c
> index f7956898fa1..868246a98c0 100644
> --- a/target/arm/machine.c
> +++ b/target/arm/machine.c
> @@ -241,7 +241,6 @@ static const VMStateDescription vmstate_iwmmxt = {
>       }
>   };
>   
> -#ifdef TARGET_AARCH64
>   /* The expression ARM_MAX_VQ - 2 is 0 for pure AArch32 build,
>    * and ARMPredicateReg is actively empty.  This triggers errors
>    * in the expansion of the VMSTATE macros.
> @@ -321,7 +320,6 @@ static const VMStateDescription vmstate_za = {
>           VMSTATE_END_OF_LIST()
>       }
>   };
> -#endif /* AARCH64 */
>   
>   static bool serror_needed(void *opaque)
>   {
> @@ -1102,10 +1100,8 @@ const VMStateDescription vmstate_arm_cpu = {
>           &vmstate_pmsav7,
>           &vmstate_pmsav8,
>           &vmstate_m_security,
> -#ifdef TARGET_AARCH64
>           &vmstate_sve,
>           &vmstate_za,
> -#endif
>           &vmstate_serror,
>           &vmstate_irq_line_state,
>           &vmstate_wfxt_timer,
diff mbox series

Patch

diff --git a/target/arm/machine.c b/target/arm/machine.c
index f7956898fa1..868246a98c0 100644
--- a/target/arm/machine.c
+++ b/target/arm/machine.c
@@ -241,7 +241,6 @@  static const VMStateDescription vmstate_iwmmxt = {
     }
 };
 
-#ifdef TARGET_AARCH64
 /* The expression ARM_MAX_VQ - 2 is 0 for pure AArch32 build,
  * and ARMPredicateReg is actively empty.  This triggers errors
  * in the expansion of the VMSTATE macros.
@@ -321,7 +320,6 @@  static const VMStateDescription vmstate_za = {
         VMSTATE_END_OF_LIST()
     }
 };
-#endif /* AARCH64 */
 
 static bool serror_needed(void *opaque)
 {
@@ -1102,10 +1100,8 @@  const VMStateDescription vmstate_arm_cpu = {
         &vmstate_pmsav7,
         &vmstate_pmsav8,
         &vmstate_m_security,
-#ifdef TARGET_AARCH64
         &vmstate_sve,
         &vmstate_za,
-#endif
         &vmstate_serror,
         &vmstate_irq_line_state,
         &vmstate_wfxt_timer,