aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2013-05-13 14:54:10 +0100
committerPeter Maydell <peter.maydell@linaro.org>2013-05-13 15:19:35 +0100
commit4bf8028777d13fe01553a4d59eebafadd92c08d7 (patch)
tree71b71329f4d0b2aebcf9f379fc3631ad700ab612
parent2eac8557d92d0c21386394a76a1fdb34aa0c63d2 (diff)
downloadqemu-arm-kvm-arm-working-2.tar.gz
target-arm: debug printoutkvm-arm-working-2
-rw-r--r--target-arm/helper.c7
-rw-r--r--target-arm/kvm.c9
2 files changed, 16 insertions, 0 deletions
diff --git a/target-arm/helper.c b/target-arm/helper.c
index b4cafc147f..7315c2db35 100644
--- a/target-arm/helper.c
+++ b/target-arm/helper.c
@@ -129,10 +129,13 @@ bool write_cpustate_to_list(ARMCPU *cpu)
if (ri->type & ARM_CP_NO_MIGRATE) {
continue;
}
+ printf("write_cpustate_to_list: reg 0x%" PRIx32 ": ", regidx);
if (!read_raw_cp_reg(&cpu->env, ri, &v)) {
+ printf("failed\n");
ok = false;
continue;
}
+ printf("0x%" PRIx64 "\n", v);
cpu->cpreg_values[i] = v;
}
return ok;
@@ -161,11 +164,15 @@ bool write_list_to_cpustate(ARMCPU *cpu)
* (to catch read-only registers and partially read-only
* registers where the incoming migration value doesn't match)
*/
+ printf("write_list_to_cpustate: reg 0x%" PRIx32 ": 0x%" PRIx64,
+ regidx, v);
if (!write_raw_cp_reg(&cpu->env, ri, v) ||
!read_raw_cp_reg(&cpu->env, ri, &readback) ||
readback != v) {
ok = false;
+ printf(" failed");
}
+ printf("\n");
}
return ok;
}
diff --git a/target-arm/kvm.c b/target-arm/kvm.c
index 5c91ab756a..302d6ddec7 100644
--- a/target-arm/kvm.c
+++ b/target-arm/kvm.c
@@ -290,7 +290,12 @@ bool write_kvmstate_to_list(ARMCPU *cpu)
abort();
}
if (ret) {
+ printf("write_kvmstate_to_list: reg 0x%" PRIx64 ": failed\n",
+ regidx);
ok = false;
+ } else {
+ printf("write_kvmstate_to_list: reg 0x%" PRIx64 ": 0x%" PRIx64 "\n",
+ regidx, cpu->cpreg_values[i]);
}
}
return ok;
@@ -320,6 +325,8 @@ bool write_list_to_kvmstate(ARMCPU *cpu)
default:
abort();
}
+ printf("write_list_to_kvmstate: reg 0x%" PRIx64 ": 0x%" PRIx64,
+ regidx, cpu->cpreg_values[i]);
ret = kvm_vcpu_ioctl(cs, KVM_SET_ONE_REG, &r);
if (ret) {
/* We might fail for "unknown register" and also for
@@ -327,7 +334,9 @@ bool write_list_to_kvmstate(ARMCPU *cpu)
* a different value from what it actually contains".
*/
ok = false;
+ printf(" failed");
}
+ printf("\n");
}
return ok;
}