All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Lluís Vilanova" <vilanova@ac.upc.edu>
To: qemu-devel@nongnu.org
Cc: Blue Swirl <blauwirbel@gmail.com>,
	Riku Voipio <riku.voipio@iki.fi>,
	Stefan Hajnoczi <stefanha@redhat.com>
Subject: [Qemu-devel] [PATCH 4/5] user: Set current vCPU during syscall execution
Date: Tue, 23 Feb 2016 19:22:30 +0100	[thread overview]
Message-ID: <145625174988.12025.2541064572501885088.stgit@localhost> (raw)
In-Reply-To: <145625172744.12025.2350972792125742783.stgit@localhost>

Will be later used by tracing events.

Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
---
 bsd-user/syscall.c   |    2 ++
 linux-user/syscall.c |    2 ++
 2 files changed, 4 insertions(+)

diff --git a/bsd-user/syscall.c b/bsd-user/syscall.c
index 35f784c..ce941b0 100644
--- a/bsd-user/syscall.c
+++ b/bsd-user/syscall.c
@@ -320,6 +320,7 @@ abi_long do_freebsd_syscall(void *cpu_env, int num, abi_long arg1,
 #ifdef DEBUG
     gemu_log("freebsd syscall %d\n", num);
 #endif
+    current_cpu = cpu;                  /* accessed by tracing events*/
     if(do_strace)
         print_freebsd_syscall(num, arg1, arg2, arg3, arg4, arg5, arg6);
 
@@ -399,6 +400,7 @@ abi_long do_freebsd_syscall(void *cpu_env, int num, abi_long arg1,
 #endif
     if (do_strace)
         print_freebsd_syscall_ret(num, ret);
+    current_cpu = NULL;
     return ret;
  efault:
     ret = -TARGET_EFAULT;
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 54ce14a..52f9d85 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -5859,6 +5859,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
 #ifdef DEBUG
     gemu_log("syscall %d", num);
 #endif
+    current_cpu = cpu;                  /* accessed by tracing events*/
     if(do_strace)
         print_syscall(num, arg1, arg2, arg3, arg4, arg5, arg6);
 
@@ -10240,6 +10241,7 @@ fail:
 #endif
     if(do_strace)
         print_syscall_ret(num, ret);
+    current_cpu = NULL;
     return ret;
 efault:
     ret = -TARGET_EFAULT;

  parent reply	other threads:[~2016-02-23 18:22 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-23 18:22 [Qemu-devel] [PATCH 0/5] trace: Add events for vCPU memory accesses Lluís Vilanova
2016-02-23 18:22 ` [Qemu-devel] [PATCH 1/5] exec: [tcg] Track which vCPU is performing translation and execution Lluís Vilanova
2016-03-16 15:01   ` Peter Maydell
2016-02-23 18:22 ` [Qemu-devel] [PATCH 2/5] trace: [all] Add "guest_vmem" event Lluís Vilanova
2016-03-16 15:01   ` Peter Maydell
2016-03-17 19:22     ` Lluís Vilanova
2016-03-17 20:18       ` Richard Henderson
2016-03-17 20:25       ` Peter Maydell
2016-03-18 18:50         ` Lluís Vilanova
2016-03-19 13:59           ` Peter Maydell
2016-03-20 18:09             ` Lluís Vilanova
2016-03-20 19:59               ` Peter Maydell
2016-03-21 16:51                 ` Lluís Vilanova
2016-02-23 18:22 ` [Qemu-devel] [PATCH 3/5] user: Refactor lock_user body into do_lock_user Lluís Vilanova
2016-02-23 18:22 ` Lluís Vilanova [this message]
2016-02-23 18:22 ` [Qemu-devel] [PATCH 5/5] trace: [all] Add "guest_vmem_user_syscall" event Lluís Vilanova
2016-03-02 10:55 ` [Qemu-devel] [PATCH 0/5] trace: Add events for vCPU memory accesses Stefan Hajnoczi
2016-03-16 15:10   ` Peter Maydell
2016-03-22 12:55     ` Stefan Hajnoczi
2016-03-22 14:02       ` Lluís Vilanova
2016-03-22 14:47         ` Peter Maydell
2016-03-22 19:23           ` Lluís Vilanova
2016-03-22 20:23             ` Peter Maydell
2016-03-23 14:08               ` Lluís Vilanova

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=145625174988.12025.2541064572501885088.stgit@localhost \
    --to=vilanova@ac.upc.edu \
    --cc=blauwirbel@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=riku.voipio@iki.fi \
    --cc=stefanha@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.