diff options
author | Alexey Kardashevskiy <aik@ozlabs.ru> | 2014-06-04 22:50:58 +1000 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2014-06-16 13:24:44 +0200 |
commit | 70c5340744f044d2195216d0e3c7c0c554dbd7ca (patch) | |
tree | ad14cd30919b7cf760a4dc6b4b9d5946961e4738 /target-ppc/translate_init.c | |
parent | 45ed0be146b7433d1123f09eb1a984210a311625 (diff) | |
download | hqemu-70c5340744f044d2195216d0e3c7c0c554dbd7ca.zip hqemu-70c5340744f044d2195216d0e3c7c0c554dbd7ca.tar.gz |
target-ppc: Add POWER8's MMCR2/MMCRS SPRs
This adds POWER8 specific PMU MMCR2/MMCRS SPRs.
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: Tom Musta <tommusta@gmail.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'target-ppc/translate_init.c')
-rw-r--r-- | target-ppc/translate_init.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c index 30ae66a..548b582 100644 --- a/target-ppc/translate_init.c +++ b/target-ppc/translate_init.c @@ -7507,6 +7507,26 @@ static void gen_spr_970_pmu_user(CPUPPCState *env) 0x00000000); } +static void gen_spr_power8_pmu_sup(CPUPPCState *env) +{ + spr_register_kvm(env, SPR_POWER_MMCR2, "MMCR2", + SPR_NOACCESS, SPR_NOACCESS, + &spr_read_generic, &spr_write_generic, + KVM_REG_PPC_MMCR2, 0x00000000); + spr_register_kvm(env, SPR_POWER_MMCRS, "MMCRS", + SPR_NOACCESS, SPR_NOACCESS, + &spr_read_generic, &spr_write_generic, + KVM_REG_PPC_MMCRS, 0x00000000); +} + +static void gen_spr_power8_pmu_user(CPUPPCState *env) +{ + spr_register(env, SPR_POWER_UMMCR2, "UMMCR2", + &spr_read_ureg, SPR_NOACCESS, + &spr_read_ureg, &spr_write_ureg, + 0x00000000); +} + static void gen_spr_power5p_ear(CPUPPCState *env) { /* External access control */ @@ -7673,6 +7693,8 @@ static void init_proc_book3s_64(CPUPPCState *env, int version) gen_spr_power8_tce_address_control(env); gen_spr_power8_ids(env); gen_spr_power8_fscr(env); + gen_spr_power8_pmu_sup(env); + gen_spr_power8_pmu_user(env); } #if !defined(CONFIG_USER_ONLY) switch (version) { |