[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH 14/30] target-ppc: Add more stubs for POWER7 PMU regis
From: |
Alexander Graf |
Subject: |
[Qemu-ppc] [PATCH 14/30] target-ppc: Add more stubs for POWER7 PMU registers |
Date: |
Fri, 26 Apr 2013 20:21:33 +0200 |
From: David Gibson <address@hidden>
In addition to the performance monitor registers found on nearly all
6xx chips, the POWER7 has two additional counters (PMC5 & PMC6) and an
extra control register (MMCRA). This patch adds stub support for them to
qemu - the registers won't do anything, but with this change won't cause
illegal instruction traps accessing them. They're also registered with
their ONE_REG ids, so their value will be kept in sync with KVM where
appropriate.
Signed-off-by: David Gibson <address@hidden>
Signed-off-by: Alexander Graf <address@hidden>
---
target-ppc/cpu.h | 1 +
target-ppc/translate_init.c | 12 ++++++++++++
2 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/target-ppc/cpu.h b/target-ppc/cpu.h
index 99ebf7e..b8b09b9 100644
--- a/target-ppc/cpu.h
+++ b/target-ppc/cpu.h
@@ -1445,6 +1445,7 @@ static inline void cpu_clone_regs(CPUPPCState *env,
target_ulong newsp)
#define SPR_PERF2 (0x302)
#define SPR_RCPU_MI_RBA2 (0x302)
#define SPR_MPC_MI_AP (0x302)
+#define SPR_MMCRA (0x302)
#define SPR_PERF3 (0x303)
#define SPR_RCPU_MI_RBA3 (0x303)
#define SPR_MPC_MI_EPN (0x303)
diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c
index 769f5fd..b0e3536 100644
--- a/target-ppc/translate_init.c
+++ b/target-ppc/translate_init.c
@@ -6977,6 +6977,18 @@ static void init_proc_POWER7 (CPUPPCState *env)
SPR_NOACCESS, SPR_NOACCESS,
&spr_read_generic, &spr_write_generic,
KVM_REG_PPC_DSCR, 0x00000000);
+ spr_register_kvm(env, SPR_MMCRA, "SPR_MMCRA",
+ SPR_NOACCESS, SPR_NOACCESS,
+ &spr_read_generic, &spr_write_generic,
+ KVM_REG_PPC_MMCRA, 0x00000000);
+ spr_register_kvm(env, SPR_PMC5, "SPR_PMC5",
+ SPR_NOACCESS, SPR_NOACCESS,
+ &spr_read_generic, &spr_write_generic,
+ KVM_REG_PPC_PMC5, 0x00000000);
+ spr_register_kvm(env, SPR_PMC6, "SPR_PMC6",
+ SPR_NOACCESS, SPR_NOACCESS,
+ &spr_read_generic, &spr_write_generic,
+ KVM_REG_PPC_PMC6, 0x00000000);
#endif /* !CONFIG_USER_ONLY */
/* Memory management */
/* XXX : not implemented */
--
1.6.0.2
- [Qemu-ppc] [PATCH 23/30] target-ppc: add instruction flags for Book I 2.05, (continued)
- [Qemu-ppc] [PATCH 23/30] target-ppc: add instruction flags for Book I 2.05, Alexander Graf, 2013/04/26
- [Qemu-ppc] [PATCH 29/30] target-ppc: emulate store doubleword pair instructions, Alexander Graf, 2013/04/26
- [Qemu-ppc] [PATCH 24/30] target-ppc: emulate cmpb instruction, Alexander Graf, 2013/04/26
- [Qemu-ppc] [PATCH 28/30] target-ppc: emulate load doubleword pair instructions, Alexander Graf, 2013/04/26
- [Qemu-ppc] [PATCH 26/30] target-ppc: emulate fcpsgn instruction, Alexander Graf, 2013/04/26
- [Qemu-ppc] [PATCH 25/30] target-ppc: emulate prtyw and prtyd instructions, Alexander Graf, 2013/04/26
- [Qemu-ppc] [PATCH 21/30] target-ppc: optimize fabs, fnabs, fneg, Alexander Graf, 2013/04/26
- [Qemu-ppc] [PATCH 19/30] powerpc: correctly handle fpu exceptions., Alexander Graf, 2013/04/26
- [Qemu-ppc] [PATCH 27/30] target-ppc: emulate lfiwax instruction, Alexander Graf, 2013/04/26
- [Qemu-ppc] [PATCH 15/30] pseries: Fix some small errors in XICS logic, Alexander Graf, 2013/04/26
- [Qemu-ppc] [PATCH 14/30] target-ppc: Add more stubs for POWER7 PMU registers,
Alexander Graf <=
- [Qemu-ppc] [PATCH 18/30] pseries: Generate device paths for VIO devices, Alexander Graf, 2013/04/26
- [Qemu-ppc] [PATCH 09/30] Enable kvm emulated watchdog, Alexander Graf, 2013/04/26
- [Qemu-ppc] [PATCH 12/30] pseries: Fix incorrect calculation of RMA size in certain configurations, Alexander Graf, 2013/04/26
- [Qemu-ppc] [PATCH 03/30] PPC: Remove env->hreset_excp_prefix, Alexander Graf, 2013/04/26
- [Qemu-ppc] [PATCH 30/30] target-ppc: add support for extended mtfsf/mtfsfi forms, Alexander Graf, 2013/04/26
- [Qemu-ppc] [PATCH 13/30] pseries: Fixes and enhancements to L1 cache properties, Alexander Graf, 2013/04/26
- [Qemu-ppc] [PATCH 17/30] pseries: Convert VIO code to QOM style type safe(ish) casts, Alexander Graf, 2013/04/26
- [Qemu-ppc] [PATCH 16/30] target-ppc: Synchronize VPA state with KVM, Alexander Graf, 2013/04/26
- Re: [Qemu-ppc] [PULL 00/30] ppc patch queue 2013-04-26, Blue Swirl, 2013/04/26