[PATCH v10 14/14] hvf: arm: warn instead of assert on a write_list_to_cpustate mismatch

Mohamed Mediouni posted 14 patches 1 month, 3 weeks ago
Maintainers: Cameron Esfahani <dirty@apple.com>, Roman Bolshakov <rbolshakov@ddn.com>, Phil Dennis-Jordan <phil@philjordan.eu>, Peter Maydell <peter.maydell@linaro.org>, Paolo Bonzini <pbonzini@redhat.com>, Alexander Graf <agraf@csgraf.de>
There is a newer version of this series
[PATCH v10 14/14] hvf: arm: warn instead of assert on a write_list_to_cpustate mismatch
Posted by Mohamed Mediouni 1 month, 3 weeks ago
For VM save/restore in nested virt scenarios, to be triaged later.

Signed-off-by: Mohamed Mediouni <mohamed@unpredictable.fr>
---
 target/arm/hvf/hvf.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c
index 8d537b6201..4f3c322776 100644
--- a/target/arm/hvf/hvf.c
+++ b/target/arm/hvf/hvf.c
@@ -653,7 +653,12 @@ int hvf_arch_get_registers(CPUState *cpu)
 
         arm_cpu->cpreg_values[i] = val;
     }
-    assert(write_list_to_cpustate(arm_cpu));
+
+    /* Don't make this fatal for now. */
+    if (write_list_to_cpustate(arm_cpu)) {
+        warn_report("hvf_arch_get_registers: not all registers are matching");
+    }
+
 
     aarch64_restore_sp(env, arm_current_el(env));
 
-- 
2.50.1 (Apple Git-155)