From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40113) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1afVnz-0000Kh-Jy for qemu-devel@nongnu.org; Mon, 14 Mar 2016 12:57:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1afVny-00051b-P0 for qemu-devel@nongnu.org; Mon, 14 Mar 2016 12:57:19 -0400 Received: from e06smtp17.uk.ibm.com ([195.75.94.113]:37663) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1afVny-00050l-9I for qemu-devel@nongnu.org; Mon, 14 Mar 2016 12:57:18 -0400 Received: from localhost by e06smtp17.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 14 Mar 2016 16:57:17 -0000 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Date: Mon, 14 Mar 2016 17:56:38 +0100 Message-Id: <1457974600-13828-16-git-send-email-clg@fr.ibm.com> In-Reply-To: <1457974600-13828-1-git-send-email-clg@fr.ibm.com> References: <1457974600-13828-1-git-send-email-clg@fr.ibm.com> Subject: [Qemu-devel] [PATCH 15/17] ppc: Add dummy POWER8 MPPR register List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: David Gibson Cc: Thomas Huth , qemu-ppc@nongnu.org, qemu-devel@nongnu.org From: Benjamin Herrenschmidt Controls the micropartition prefetch, this is pretty much meaningless in full emulation (used for priming the caches on real HW). Signed-off-by: Benjamin Herrenschmidt --- target-ppc/cpu.h | 1 + target-ppc/translate_init.c | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/target-ppc/cpu.h b/target-ppc/cpu.h index 81a3e6b5ed29..5203cc6a3bfb 100644 --- a/target-ppc/cpu.h +++ b/target-ppc/cpu.h @@ -1398,6 +1398,7 @@ static inline int cpu_mmu_index (CPUPPCState *env, bool ifetch) #define SPR_DHDES (0x0B1) #define SPR_DPDES (0x0B0) #define SPR_DAWR (0x0B4) +#define SPR_MPPR (0x0B8) #define SPR_RPR (0x0BA) #define SPR_DAWRX (0x0BC) #define SPR_HFSCR (0x0BE) diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c index 28a9c2e73156..cfb1bc088950 100644 --- a/target-ppc/translate_init.c +++ b/target-ppc/translate_init.c @@ -8161,6 +8161,18 @@ static void gen_spr_power8_ic(CPUPPCState *env) #endif } +static void gen_spr_power8_book4(CPUPPCState *env) +{ + /* Add a number of P8 book4 registers */ +#if !defined(CONFIG_USER_ONLY) + spr_register_hv(env, SPR_MPPR, "MPPR", + SPR_NOACCESS, SPR_NOACCESS, + &spr_read_generic, SPR_NOACCESS, + &spr_read_generic, &spr_write_generic, + 0); +#endif +} + static void init_proc_book3s_64(CPUPPCState *env, int version) { gen_spr_ne_601(env); @@ -8216,6 +8228,7 @@ static void init_proc_book3s_64(CPUPPCState *env, int version) gen_spr_power8_rpr(env); gen_spr_power8_dbell(env); gen_spr_power8_ic(env); + gen_spr_power8_book4(env); } if (version < BOOK3S_CPU_POWER8) { gen_spr_book3s_dbg(env); -- 2.1.4