[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2] timer/aspeed: fix vmstate version id
From: |
Cédric Le Goater |
Subject: |
Re: [Qemu-devel] [PATCH v2] timer/aspeed: fix vmstate version id |
Date: |
Wed, 2 May 2018 15:56:12 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 |
> for a romulus-bmc machine, which uses a ARM1176 CPU, you can download this
> image :
>
>
> https://openpower.xyz/job/openbmc-build/distro=ubuntu,target=romulus/lastSuccessfulBuild/artifact/deploy/images/romulus/flash-romulus
>
> but migration fails :
>
> qemu-system-arm: error while loading state for instance 0x0 of device 'cpu'
>
> There seems to be an issue while reading the CPACR reg.
With a brutal setting of CPACR in cpu_reset, the romulus-bmc machine
migrates. What would be a more appropriate approach ?
Thanks,
C.
@@ -166,6 +166,23 @@ static void arm_cpu_reset(CPUState *s)
#if defined(CONFIG_USER_ONLY)
/* Userspace expects access to cp10 and cp11 for FP/Neon */
env->cp15.cpacr_el1 = deposit64(env->cp15.cpacr_el1, 20, 4, 0xf);
+#else
+ env->cp15.cpacr_el1 = 0;
+ if (arm_feature(env, ARM_FEATURE_VFP)) {
+ if (!arm_feature(env, ARM_FEATURE_NEON)) {
+ /* ASEDIS [31] bit is RAO/WI */
+ env->cp15.cpacr_el1 |= (1ull << 31);
+ }
+
+ /* VFPv3 and upwards with NEON implement 32 double precision
+ * registers (D0-D31).
+ */
+ if (!arm_feature(env, ARM_FEATURE_NEON) ||
+ !arm_feature(env, ARM_FEATURE_VFP3)) {
+ /* D32DIS [30] is RAO/WI if D16-31 are not implemented. */
+ env->cp15.cpacr_el1 |= (1ull << 30);
+ }
+ }
#endif
}
- Re: [Qemu-devel] [PATCH v2] timer/aspeed: fix vmstate version id,
Cédric Le Goater <=