qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-devel@nongnu.org
Cc: Riku Voipio <riku.voipio@iki.fi>, patches@linaro.org
Subject: [Qemu-devel] [PATCH 4/6] linux-user/main.c: Call cpu_exec_start/end on all target archs
Date: Thu,  8 Jan 2015 12:19:46 +0000	[thread overview]
Message-ID: <1420719588-8138-5-git-send-email-peter.maydell@linaro.org> (raw)
In-Reply-To: <1420719588-8138-1-git-send-email-peter.maydell@linaro.org>

The start_exclusive() infrastructure is used on all target
architectures, even if only to do the "stop all CPUs before
dumping core" in force_sig(), so be consistent and call
cpu_exec_start/end in the main loop of every target.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 linux-user/main.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/linux-user/main.c b/linux-user/main.c
index 67b0231..bbd1cfd 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -283,7 +283,9 @@ void cpu_loop(CPUX86State *env)
     target_siginfo_t info;
 
     for(;;) {
+        cpu_exec_start(cs);
         trapnr = cpu_x86_exec(env);
+        cpu_exec_end(cs);
         switch(trapnr) {
         case 0x80:
             /* linux syscall from int $0x80 */
@@ -1288,7 +1290,9 @@ void cpu_loop (CPUSPARCState *env)
     target_siginfo_t info;
 
     while (1) {
+        cpu_exec_start(cs);
         trapnr = cpu_sparc_exec (env);
+        cpu_exec_end(cs);
 
         /* Compute PSR before exposing state.  */
         if (env->cc_op != CC_OP_FLAGS) {
@@ -2656,7 +2660,9 @@ void cpu_loop(CPUOpenRISCState *env)
     int trapnr, gdbsig;
 
     for (;;) {
+        cpu_exec_start(cs);
         trapnr = cpu_exec(env);
+        cpu_exec_end(cs);
         gdbsig = 0;
 
         switch (trapnr) {
@@ -2744,7 +2750,9 @@ void cpu_loop(CPUSH4State *env)
     target_siginfo_t info;
 
     while (1) {
+        cpu_exec_start(cs);
         trapnr = cpu_sh4_exec (env);
+        cpu_exec_end(cs);
 
         switch (trapnr) {
         case 0x160:
@@ -2804,7 +2812,9 @@ void cpu_loop(CPUCRISState *env)
     target_siginfo_t info;
     
     while (1) {
+        cpu_exec_start(cs);
         trapnr = cpu_cris_exec (env);
+        cpu_exec_end(cs);
         switch (trapnr) {
         case 0xaa:
             {
@@ -2863,7 +2873,9 @@ void cpu_loop(CPUMBState *env)
     target_siginfo_t info;
     
     while (1) {
+        cpu_exec_start(cs);
         trapnr = cpu_mb_exec (env);
+        cpu_exec_end(cs);
         switch (trapnr) {
         case 0xaa:
             {
@@ -2966,7 +2978,9 @@ void cpu_loop(CPUM68KState *env)
     TaskState *ts = cs->opaque;
 
     for(;;) {
+        cpu_exec_start(cs);
         trapnr = cpu_m68k_exec(env);
+        cpu_exec_end(cs);
         switch(trapnr) {
         case EXCP_ILLEGAL:
             {
@@ -3103,7 +3117,9 @@ void cpu_loop(CPUAlphaState *env)
     abi_long sysret;
 
     while (1) {
+        cpu_exec_start(cs);
         trapnr = cpu_alpha_exec (env);
+        cpu_exec_end(cs);
 
         /* All of the traps imply a transition through PALcode, which
            implies an REI instruction has been executed.  Which means
@@ -3289,7 +3305,9 @@ void cpu_loop(CPUS390XState *env)
     target_ulong addr;
 
     while (1) {
+        cpu_exec_start(cs);
         trapnr = cpu_s390x_exec(env);
+        cpu_exec_end(cs);
         switch (trapnr) {
         case EXCP_INTERRUPT:
             /* Just indicate that signals should be handled asap.  */
-- 
1.9.1

  parent reply	other threads:[~2015-01-08 12:19 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-08 12:19 [Qemu-devel] [PATCH 0/6] linux-user: Fix various clang warnings Peter Maydell
2015-01-08 12:19 ` [Qemu-devel] [PATCH 1/6] linux-user/signal.c: Remove current_exec_domain_sig() Peter Maydell
2015-01-08 12:19 ` [Qemu-devel] [PATCH 2/6] linux-user/alpha: Add define for NR_shmat to enable shmat syscall Peter Maydell
2015-01-10 15:56   ` Peter Maydell
2015-01-10 21:02     ` Richard Henderson
2015-01-08 12:19 ` [Qemu-devel] [PATCH 3/6] linux-user/arm/nwfpe: Delete unused aCC array Peter Maydell
2015-01-08 12:19 ` Peter Maydell [this message]
2015-01-08 12:19 ` [Qemu-devel] [PATCH 5/6] linux-user/main.c: Mark end_exclusive() as possibly unused Peter Maydell
2015-01-21  8:40   ` Thomas Huth
2015-01-21 10:54     ` Peter Maydell
2015-01-08 12:19 ` [Qemu-devel] [PATCH 6/6] linux-user/signal.c: Remove unnecessary wrapper copy_siginfo_to_user Peter Maydell
2015-01-20 14:54 ` [Qemu-devel] [PATCH 0/6] linux-user: Fix various clang warnings Peter Maydell
2015-01-21 10:23   ` Riku Voipio
2015-01-27 19:06     ` Peter Maydell

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=1420719588-8138-5-git-send-email-peter.maydell@linaro.org \
    --to=peter.maydell@linaro.org \
    --cc=patches@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=riku.voipio@iki.fi \
    /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).