From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39215) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZwJKb-0005VS-Ke for qemu-devel@nongnu.org; Tue, 10 Nov 2015 19:32:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZwJKZ-0005CF-A6 for qemu-devel@nongnu.org; Tue, 10 Nov 2015 19:32:09 -0500 From: Benjamin Herrenschmidt Date: Wed, 11 Nov 2015 11:28:28 +1100 Message-Id: <1447201710-10229-76-git-send-email-benh@kernel.crashing.org> In-Reply-To: <1447201710-10229-1-git-send-email-benh@kernel.crashing.org> References: <1447201710-10229-1-git-send-email-benh@kernel.crashing.org> Subject: [Qemu-devel] [PATCH 75/77] ppc: Add dummy logmpp instruction List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-ppc@nongnu.org Cc: qemu-devel@nongnu.org It's used by KVM for micropartition prefetch Signed-off-by: Benjamin Herrenschmidt --- target-ppc/translate.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/target-ppc/translate.c b/target-ppc/translate.c index b34d2c6..1e3996d 100644 --- a/target-ppc/translate.c +++ b/target-ppc/translate.c @@ -3627,6 +3627,16 @@ static void gen_rvwinkle(DisasContext *ctx) gen_stop_exception(ctx); #endif /* defined(CONFIG_USER_ONLY) */ } + +static void gen_logmpp(DisasContext *ctx) +{ +#if defined(CONFIG_USER_ONLY) + GEN_PRIV; +#else + CHK_HV; + /* This doesn't do anything in emulation */ +#endif /* defined(CONFIG_USER_ONLY) */ +} #endif /* #if defined(TARGET_PPC64) */ /*** Floating-point load ***/ @@ -9895,6 +9905,14 @@ GEN_HANDLER_E(nap, 0x13, 0x12, 0x0d, 0x03FFF801, PPC_NONE, PPC2_PM_ISA206), GEN_HANDLER_E(sleep, 0x13, 0x12, 0x0e, 0x03FFF801, PPC_NONE, PPC2_PM_ISA206), GEN_HANDLER_E(rvwinkle, 0x13, 0x12, 0x0f, 0x03FFF801, PPC_NONE, PPC2_PM_ISA206), GEN_HANDLER(hrfid, 0x13, 0x12, 0x08, 0x03FF8001, PPC_64H), + +/* This should be P8 Book4, not ISA207S, but I don't want to add a bit for that + * one dummy instruction. Note also that there's a discrepancy between the + * P8 Book4 which documents it as using RA while KVM implementation uses RB, + * so for now mark both fields as valid + */ +//GEN_HANDLER_E(logmpp, 0x1f, 0x12, 0x1f, 0x03E0F800, PPC_NONE, PPC2_ISA207S), +GEN_HANDLER_E(logmpp, 0x1f, 0x12, 0x1f, 0x03E00000, PPC_NONE, PPC2_ISA207S), #endif GEN_HANDLER(sc, 0x11, 0xFF, 0xFF, 0x03FFF01D, PPC_FLOW), GEN_HANDLER(tw, 0x1F, 0x04, 0x00, 0x00000001, PPC_FLOW), -- 2.5.0