From patchwork Tue Feb 23 18:22:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Llu=C3=ADs_Vilanova?= X-Patchwork-Id: 8395381 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 6E9F5C0553 for ; Tue, 23 Feb 2016 18:24:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D5006202EC for ; Tue, 23 Feb 2016 18:24:52 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 31C25202E6 for ; Tue, 23 Feb 2016 18:24:52 +0000 (UTC) Received: from localhost ([::1]:59168 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYHdj-0004io-Jh for patchwork-qemu-devel@patchwork.kernel.org; Tue, 23 Feb 2016 13:24:51 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34356) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYHbc-0001WM-9s for qemu-devel@nongnu.org; Tue, 23 Feb 2016 13:22:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aYHbb-0006WI-0x for qemu-devel@nongnu.org; Tue, 23 Feb 2016 13:22:39 -0500 Received: from roura.ac.upc.es ([147.83.33.10]:36350) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYHba-0006W9-Me for qemu-devel@nongnu.org; Tue, 23 Feb 2016 13:22:38 -0500 Received: from gw-3.ac.upc.es (gw-3.ac.upc.es [147.83.30.9]) by roura.ac.upc.es (8.13.8/8.13.8) with ESMTP id u1NIMUhT000912; Tue, 23 Feb 2016 19:22:30 +0100 Received: from localhost (unknown [84.88.51.85]) by gw-3.ac.upc.es (Postfix) with ESMTPSA id 53D8E7EF; Tue, 23 Feb 2016 19:22:30 +0100 (CET) From: =?utf-8?b?TGx1w61z?= Vilanova To: qemu-devel@nongnu.org Date: Tue, 23 Feb 2016 19:22:30 +0100 Message-Id: <145625174988.12025.2541064572501885088.stgit@localhost> X-Mailer: git-send-email 2.7.0 In-Reply-To: <145625172744.12025.2350972792125742783.stgit@localhost> References: <145625172744.12025.2350972792125742783.stgit@localhost> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-MIME-Autoconverted: from 8bit to quoted-printable by roura.ac.upc.es id u1NIMUhT000912 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 147.83.33.10 Cc: Blue Swirl , Riku Voipio , Stefan Hajnoczi Subject: [Qemu-devel] [PATCH 4/5] user: Set current vCPU during syscall execution X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Will be later used by tracing events. Signed-off-by: LluĂ­s Vilanova --- 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;