qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Liu Ping Fan <qemulist@gmail.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH 1/2] ppc: tcg: add nap insn support
Date: Mon,  6 Jan 2014 08:56:30 +0800	[thread overview]
Message-ID: <1388969791-4752-1-git-send-email-pingfank@linux.vnet.ibm.com> (raw)

Add the emulation of insn "nap" for hypervisor

Signed-off-by: Liu Ping Fan <pingfank@linux.vnet.ibm.com>
---
 target-ppc/excp_helper.c | 4 ++++
 target-ppc/helper.h      | 1 +
 target-ppc/translate.c   | 6 ++++++
 3 files changed, 11 insertions(+)

diff --git a/target-ppc/excp_helper.c b/target-ppc/excp_helper.c
index c959460..a9712bc 100644
--- a/target-ppc/excp_helper.c
+++ b/target-ppc/excp_helper.c
@@ -889,6 +889,10 @@ void helper_hrfid(CPUPPCState *env)
     do_rfi(env, env->spr[SPR_HSRR0], env->spr[SPR_HSRR1],
            ~((target_ulong)0x783F0000), 0);
 }
+
+void helper_nap(CPUPPCState *env)
+{
+}
 #endif
 
 /*****************************************************************************/
diff --git a/target-ppc/helper.h b/target-ppc/helper.h
index 6d282bb..87873db 100644
--- a/target-ppc/helper.h
+++ b/target-ppc/helper.h
@@ -17,6 +17,7 @@ DEF_HELPER_1(rfmci, void, env)
 #if defined(TARGET_PPC64)
 DEF_HELPER_1(rfid, void, env)
 DEF_HELPER_1(hrfid, void, env)
+DEF_HELPER_1(nap, void, env)
 #endif
 #endif
 
diff --git a/target-ppc/translate.c b/target-ppc/translate.c
index 66c7771..ce63783 100644
--- a/target-ppc/translate.c
+++ b/target-ppc/translate.c
@@ -3798,6 +3798,11 @@ static void gen_hrfid(DisasContext *ctx)
     gen_sync_exception(ctx);
 #endif
 }
+
+static void gen_nap(DisasContext *ctx)
+{
+    gen_helper_nap(cpu_env);
+}
 #endif
 
 /* sc */
@@ -8732,6 +8737,7 @@ GEN_HANDLER(rfi, 0x13, 0x12, 0x01, 0x03FF8001, PPC_FLOW),
 #if defined(TARGET_PPC64)
 GEN_HANDLER(rfid, 0x13, 0x12, 0x00, 0x03FF8001, PPC_64B),
 GEN_HANDLER(hrfid, 0x13, 0x12, 0x08, 0x03FF8001, PPC_64H),
+GEN_HANDLER(nap, 0x13, 0x12, 0x0d, 0x03FF8001, PPC_64H),
 #endif
 GEN_HANDLER(sc, 0x11, 0xFF, 0xFF, 0x03FFF01D, PPC_FLOW),
 GEN_HANDLER(tw, 0x1F, 0x04, 0x00, 0x00000001, PPC_FLOW),
-- 
1.8.1.4

             reply	other threads:[~2014-01-06  0:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-06  0:56 Liu Ping Fan [this message]
2014-01-06  0:56 ` [Qemu-devel] [PATCH 2/2] ppc: tcg: implement helper_nap Liu Ping Fan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1388969791-4752-1-git-send-email-pingfank@linux.vnet.ibm.com \
    --to=qemulist@gmail.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).