> 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 }