aboutsummaryrefslogtreecommitdiff
path: root/hw/ppc.c
diff options
context:
space:
mode:
authorScott Wood <scottwood@freescale.com>2011-04-29 17:10:23 -0500
committerAlexander Graf <agraf@suse.de>2011-05-09 22:31:37 +0200
commit90dc8812229a1d3f31bc08ccf0aa50e10282faef (patch)
tree5b8c980d3fa038f6c5e7b2aec60b1487c6885c21 /hw/ppc.c
parent5666ca4ae06d20497f887241151278e266947087 (diff)
downloadqemu-90dc8812229a1d3f31bc08ccf0aa50e10282faef.zip
qemu-90dc8812229a1d3f31bc08ccf0aa50e10282faef.tar.gz
qemu-90dc8812229a1d3f31bc08ccf0aa50e10282faef.tar.bz2
monitor: add PPC BookE SPRs
Read them via KVM_GET_SREGS in kvm_arch_get_registers(), and display them in "info registers". Also get CR and PID from the existing KVM_GET_REGS. Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'hw/ppc.c')
-rw-r--r--hw/ppc.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/hw/ppc.c b/hw/ppc.c
index 1873328..9157719 100644
--- a/hw/ppc.c
+++ b/hw/ppc.c
@@ -452,6 +452,10 @@ uint64_t cpu_ppc_load_tbl (CPUState *env)
ppc_tb_t *tb_env = env->tb_env;
uint64_t tb;
+ if (kvm_enabled()) {
+ return env->spr[SPR_TBL];
+ }
+
tb = cpu_ppc_get_tb(tb_env, qemu_get_clock_ns(vm_clock), tb_env->tb_offset);
LOG_TB("%s: tb %016" PRIx64 "\n", __func__, tb);
@@ -471,6 +475,10 @@ static inline uint32_t _cpu_ppc_load_tbu(CPUState *env)
uint32_t cpu_ppc_load_tbu (CPUState *env)
{
+ if (kvm_enabled()) {
+ return env->spr[SPR_TBU];
+ }
+
return _cpu_ppc_load_tbu(env);
}
@@ -616,6 +624,10 @@ uint32_t cpu_ppc_load_decr (CPUState *env)
{
ppc_tb_t *tb_env = env->tb_env;
+ if (kvm_enabled()) {
+ return env->spr[SPR_DECR];
+ }
+
return _cpu_ppc_load_decr(env, tb_env->decr_next);
}