From patchwork Fri Jun 14 17:11:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 166923 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp2398801ilk; Fri, 14 Jun 2019 11:41:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqzzEQIRyNtzL1FRIIjMTXCmXOcVpytso9SWe/79+y/GoM/H3wKJTU72FEikVmZ//15L8E2Q X-Received: by 2002:a37:5444:: with SMTP id i65mr78453375qkb.263.1560537711700; Fri, 14 Jun 2019 11:41:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560537711; cv=none; d=google.com; s=arc-20160816; b=hyG8PNNM8yW7F6OStk1czbDfbFEahcnDSvnGVHYwoh4qI6+fle3+QRhT/q2qDReaxT jRzjwu3TvThrvQHk28cM3stm7CqyT1vBGM9w01WuflDp4Z52I6GPeNuSU0hzHH5roumz ykkefGuaf9eY9fRSNwhZdDzy4uHBb7vF8fcN23Lbc0SfgB0qzYhPm5bId0xV4fOdywUe Yz6DgmE6B6MKUVehHcyC2SwiER0sFF6r6ZBill5WRtoaFBEJrhJxJpjjb32tjkAOEixV gf3Prm5FG6eubJmK4bTUY6kzlafygkrZQgONWJUKW3f7JlJQs6X0FsDqglhEPjBeFtUi owhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=y/GuCM+htQJxVNj9wpaJsriigpxg4M/lN2SgW++LMIQ=; b=h9xUBa8PJC6gQUM79plriowOLb1T68YpiOZ+W9DhsOh0UJCxZ7cxvmRF1GpZFNLghq oVP0crjGllIspgS40jKd+xSgWXgfikUII6gAESzeArn/XiUzREuL8e24PA+MoyR/TcQD Z3DV/jR3gAFKI1FP+ilRLu4niiHFLN6Aw+E+HyGaMEmfpw4SFxwBTxNaoZewdbYnkR9s r9Y3skAEkYJTXhZfmIwcHOJxrZiaOeQBSUb76YNb62bNxZohUbZTtmSodSiADGS/Fo52 O1rkudbXVPbOIvtS/FZ61PPE0Z0dZOnPM4bgbHORLBhJO7+zvrd4N+FtzuXcBkgK1ri9 2Z7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=KIf3qLrd; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d4si2285693qkc.67.2019.06.14.11.41.51 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 14 Jun 2019 11:41:51 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=KIf3qLrd; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:54210 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbr95-00017V-BB for patch@linaro.org; Fri, 14 Jun 2019 14:41:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39289) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbqJb-0004XN-Tz for qemu-devel@nongnu.org; Fri, 14 Jun 2019 13:48:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hbqJZ-0003YI-Lb for qemu-devel@nongnu.org; Fri, 14 Jun 2019 13:48:39 -0400 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]:36555) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hbqJX-0003SF-Lg for qemu-devel@nongnu.org; Fri, 14 Jun 2019 13:48:35 -0400 Received: by mail-wr1-x444.google.com with SMTP id n4so3439356wrs.3 for ; Fri, 14 Jun 2019 10:48:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=y/GuCM+htQJxVNj9wpaJsriigpxg4M/lN2SgW++LMIQ=; b=KIf3qLrdzY/ShAkF8aEn6dNzEELD95uK7Z4JDC2i7SMHzuSLvNu5YNHJQ49bhW9Snb 2S3h0qv6Oarp/pkE981+oH2t67GBS1qDhOQBkMRKS3Kfr/jO9vN2B86PhNt87nIEl+U8 srz45+qEY063XcJrIjsQSWilYFlyqcnxjQAjTKBst5z2wm+upUc/wIrpuHKt2HhKnWeN uEAz6uuQm6f2+wR8dANFVPf/n7UELr87MbJ78H9lrzI1BTCA62dX8NUJ5Lps5IKiL972 4XGT8sY5zJd4dMHAibwOB7TqhEdXF66wrFvMP8yJvt+CiWU6gIgjAHS0tZB0AP0P2ygg ONSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=y/GuCM+htQJxVNj9wpaJsriigpxg4M/lN2SgW++LMIQ=; b=bEDBL5mj1vO6Jw+OJBuEUnBxuYbw6hOeS8mR3M9dsckTCWn2nG/Fhr1cmYEjqt8oqk wCKp74DhhAoCvtfKs8ty0zwyLab9xJVMzX5wTrDkLkpUAkbgIyVcf2slBDBhr7ixqKeO r5SkT5dBQeDDW3LbowXZZuPGLwOvYxBNRoZ0DPE/FiKFtqXEZ0dawTAPr++B0M29FPOj uC6NptFJ+72KZBhWlwKklMCETI27RuXe/OXdIhlkxMBtzSs1lK9rMS/GsdGHFxcLz4Gt L4BnmFxM/yfs4pwEoUeyYF3jHnDoiiJPzBXOjUUeKi5cliRu7dvvzEH5Q1dvhFgzY7Kz DoXg== X-Gm-Message-State: APjAAAX7baljET1DRlA1FSHVwvKNIHIva9SLB1p5n9nTvqq/GMQeRmz0 q7IpsPBWXH34S3dXQ/Y4ofKHWQ== X-Received: by 2002:adf:f951:: with SMTP id q17mr37939614wrr.173.1560534509447; Fri, 14 Jun 2019 10:48:29 -0700 (PDT) Received: from zen.linaroharston ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id l12sm9601398wrb.81.2019.06.14.10.48.27 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 14 Jun 2019 10:48:27 -0700 (PDT) Received: from zen.linaroharston. (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 807721FFAA; Fri, 14 Jun 2019 18:12:02 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Fri, 14 Jun 2019 18:11:32 +0100 Message-Id: <20190614171200.21078-23-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190614171200.21078-1-alex.bennee@linaro.org> References: <20190614171200.21078-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::444 Subject: [Qemu-devel] [PATCH v3 22/50] *-user: plugin syscalls X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Riku Voipio , "Emilio G. Cota" , Laurent Vivier Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: "Emilio G. Cota" Signed-off-by: Emilio G. Cota --- bsd-user/syscall.c | 9 +++++++++ linux-user/syscall.c | 3 +++ 2 files changed, 12 insertions(+) -- 2.20.1 Reviewed-by: Richard Henderson diff --git a/bsd-user/syscall.c b/bsd-user/syscall.c index 84a983a9a1..50e47d217c 100644 --- a/bsd-user/syscall.c +++ b/bsd-user/syscall.c @@ -323,6 +323,8 @@ abi_long do_freebsd_syscall(void *cpu_env, int num, abi_long arg1, gemu_log("freebsd syscall %d\n", num); #endif trace_guest_user_syscall(cpu, num, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8); + qemu_plugin_vcpu_syscall(cpu, num, arg1, arg2, arg3, arg4, arg5, arg6, arg7, + arg8); if(do_strace) print_freebsd_syscall(num, arg1, arg2, arg3, arg4, arg5, arg6); @@ -404,6 +406,7 @@ abi_long do_freebsd_syscall(void *cpu_env, int num, abi_long arg1, if (do_strace) print_freebsd_syscall_ret(num, ret); trace_guest_user_syscall_ret(cpu, num, ret); + qemu_plugin_vcpu_syscall_ret(cpu, num, ret); return ret; efault: ret = -TARGET_EFAULT; @@ -422,6 +425,8 @@ abi_long do_netbsd_syscall(void *cpu_env, int num, abi_long arg1, gemu_log("netbsd syscall %d\n", num); #endif trace_guest_user_syscall(cpu, num, arg1, arg2, arg3, arg4, arg5, arg6, 0, 0); + qemu_plugin_vcpu_syscall(cpu, num, arg1, arg2, arg3, arg4, arg5, arg6, 0, + 0); if(do_strace) print_netbsd_syscall(num, arg1, arg2, arg3, arg4, arg5, arg6); @@ -480,6 +485,7 @@ abi_long do_netbsd_syscall(void *cpu_env, int num, abi_long arg1, if (do_strace) print_netbsd_syscall_ret(num, ret); trace_guest_user_syscall_ret(cpu, num, ret); + qemu_plugin_vcpu_syscall_ret(cpu, num, ret); return ret; efault: ret = -TARGET_EFAULT; @@ -498,6 +504,8 @@ abi_long do_openbsd_syscall(void *cpu_env, int num, abi_long arg1, gemu_log("openbsd syscall %d\n", num); #endif trace_guest_user_syscall(cpu, num, arg1, arg2, arg3, arg4, arg5, arg6, 0, 0); + qemu_plugin_vcpu_syscall(cpu, num, arg1, arg2, arg3, arg4, arg5, arg6, 0, + 0); if(do_strace) print_openbsd_syscall(num, arg1, arg2, arg3, arg4, arg5, arg6); @@ -556,6 +564,7 @@ abi_long do_openbsd_syscall(void *cpu_env, int num, abi_long arg1, if (do_strace) print_openbsd_syscall_ret(num, ret); trace_guest_user_syscall_ret(cpu, num, ret); + qemu_plugin_vcpu_syscall_ret(cpu, num, ret); return ret; efault: ret = -TARGET_EFAULT; diff --git a/linux-user/syscall.c b/linux-user/syscall.c index b187c1281d..7f3cfdee84 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -11724,6 +11724,8 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, trace_guest_user_syscall(cpu, num, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8); + qemu_plugin_vcpu_syscall(cpu, num, arg1, arg2, arg3, arg4, arg5, arg6, arg7, + arg8); if (unlikely(do_strace)) { print_syscall(num, arg1, arg2, arg3, arg4, arg5, arg6); @@ -11736,5 +11738,6 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, } trace_guest_user_syscall_ret(cpu, num, ret); + qemu_plugin_vcpu_syscall_ret(cpu, num, ret); return ret; }