From patchwork Tue May 23 12:49:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 684907 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp1697678wrt; Tue, 23 May 2023 05:50:26 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4kpbdTzYl2BNzpBzHVkFstcgm5C/rHfSMcMfxyPfl43NzRamMl88GOE82CCzGJPJxjwYOm X-Received: by 2002:a05:620a:4883:b0:75b:23a1:8322 with SMTP id ea3-20020a05620a488300b0075b23a18322mr4252331qkb.29.1684846226669; Tue, 23 May 2023 05:50:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684846226; cv=none; d=google.com; s=arc-20160816; b=Kc/p6f/t6WsNKp12XI0z4gnDXXbEpEHedszPDS44oXp8Bqmge9RkPjzum5poiTCTAU lEPN4HtZ0eocv0thLjrQq824s99xmwq648A3PWlp8BgAGWMjoTxJ6sP8W+WOs0Oa9AWN a10k4ctR0vr+eZRBVpxmliBV+H+9cGW1OfveG7p3//ioQmSDLiILDYvDVm4p+VAUSs1f M/Cucws2BR4kgreBZPFhXmbRyfqRneAxDXvKCtnjP2FLwvKi1RLEof7lJcwRwjgRPes2 AkxK1R3u+1TjpkcitBmQx2BgGdpKfETswKTUqGjxQMzpniLKle1p/1dxdtduUjJ4XRWJ Db2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:sender:errors-to:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:references:in-reply-to:message-id:date :subject:to:from:delivered-to:delivered-to:dkim-signature; bh=wquG6em70tm69qFH0/HLZzEpZaZNtHpQCT4NEow+nqk=; b=S/veFkqHT/dw0FGJJUyyIccgoBrtEsmhnjffjm4XDmhjS2iGjMwrk69D2l150943N5 M3qat2t4J3ytUXxfJY5C/UrqHFWEjKtyBIFgQ2psamPZZyMpfhLOQ40U25kSO4fHKmU/ YdcpbJHsNQXcGJlIp2YmHvpIrcYpOcG2USZz9UfpQ6PToJAQHBdcAC0hYM2tUAxJpzu6 tfxz3mU7QOprbgScAqgRmsAqm+LUsuCWxjKdPs3q+lI9E6Hpo7J0SaRDfu4PKtr8JVbL Wkj3+UfKp6i7MhSGpZk1llxXgo4eyBNPlLaU2De1TY6kdG+a6N5jB/Td/no22gO+y6Ql K35Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=hJP1g4Rt; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com. [170.10.133.124]) by mx.google.com with ESMTPS id h17-20020a05620a13f100b0075b286c952dsi786169qkl.693.2023.05.23.05.50.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 May 2023 05:50:26 -0700 (PDT) Received-SPF: pass (google.com: domain of libvir-list-bounces@redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=hJP1g4Rt; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1684846225; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=wquG6em70tm69qFH0/HLZzEpZaZNtHpQCT4NEow+nqk=; b=hJP1g4Rtx+eAGP7rc4Vl7Ab6OUpf/srtAIUiQzxmXNKfJloCqjVL9OPAbirxOoXLJVC9DB zY3UBYeUeuFMOUD8MgOZE9S4EvFtRCAte1Qc4bUiMhXGYE4ZkBpQXfX57bD6wVxyQdQ91Y 0AYi5S4y3Kmv7d3m2mShv/IdR5/NDU8= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-546-7080bhWrM96d0K7HhGj45Q-1; Tue, 23 May 2023 08:50:21 -0400 X-MC-Unique: 7080bhWrM96d0K7HhGj45Q-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 7FE76280AA20; Tue, 23 May 2023 12:50:18 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 698CB9D7B; Tue, 23 May 2023 12:50:18 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 15A7F19452C5; Tue, 23 May 2023 12:50:13 +0000 (UTC) X-Original-To: libvir-list@listman.corp.redhat.com Delivered-To: libvir-list@listman.corp.redhat.com Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 21B351946A44 for ; Tue, 23 May 2023 12:50:07 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 170EF40D1B64; Tue, 23 May 2023 12:50:07 +0000 (UTC) Delivered-To: libvir-list@redhat.com Received: from mimecast-mx02.redhat.com (mimecast06.extmail.prod.ext.rdu2.redhat.com [10.11.55.22]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0F8F140D1B60 for ; Tue, 23 May 2023 12:50:07 +0000 (UTC) Received: from us-smtp-inbound-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E01F8185A78E for ; Tue, 23 May 2023 12:50:06 +0000 (UTC) Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-497-3cmvtiYaNDOgTJdYiwHIrQ-1; Tue, 23 May 2023 08:50:03 -0400 X-MC-Unique: 3cmvtiYaNDOgTJdYiwHIrQ-1 Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-3f42d937d2eso46738705e9.2 for ; Tue, 23 May 2023 05:50:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684846202; x=1687438202; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wquG6em70tm69qFH0/HLZzEpZaZNtHpQCT4NEow+nqk=; b=A3sLFMC4eyo3fxWT/KyQ8nkSp9/dnxDIujeWXjaf9vWiTqsQJPePNDIwcD/gMklBJO +6F1RQp/VOtvIyg58cGk/rrFyWdwDfupe2moY2SIProsxQFZcDb3DGKS3EnTtu3oTvFa GbcoceheaKKqNb2tbhKchdnezzLy2t6mGw7vjxfURkPkzZD8S5xAe2i5Ygz5MWL2Z/v2 Ocmss3Ar1ig5VdA00gbGHTmT1QUin+whVDhS5m3VqSL4rrtZvUQcio3+5gln6xPM6gYT IQDizlQ4bR+g4lfz40l9ZhbT79bcd+SgDSoUPhPCoZB57gOhkXwh2540S8RbDlRjDB6q Xlgg== X-Gm-Message-State: AC+VfDy94q4Jt/ppPIK1wSSbUVEdyxYqY8FTU0A2DoB8S4WmyC3LQDZw WxK+jv00kzfmMTRcjVUlwDzLfA== X-Received: by 2002:a05:600c:3797:b0:3f4:2819:7777 with SMTP id o23-20020a05600c379700b003f428197777mr10079447wmr.38.1684846201838; Tue, 23 May 2023 05:50:01 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id v16-20020a1cf710000000b003f4fe09aa43sm14973884wmh.8.2023.05.23.05.50.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 May 2023 05:50:01 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 0AE011FFBC; Tue, 23 May 2023 13:50:01 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org, Stefan Hajnoczi Subject: [PATCH v4 01/10] *-user: remove the guest_user_syscall tracepoints Date: Tue, 23 May 2023 13:49:51 +0100 Message-Id: <20230523125000.3674739-2-alex.bennee@linaro.org> In-Reply-To: <20230523125000.3674739-1-alex.bennee@linaro.org> References: <20230523125000.3674739-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eduardo Habkost , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , =?utf-8?q?Alex_Benn=C3=A9e?= , libvir-list@redhat.com, Michael Roth , Riku Voipio , Christian Schoenebeck , Markus Armbruster , Greg Kurz , Yanan Wang , Marcel Apfelbaum , Kyle Evans , Paolo Bonzini , Richard Henderson , Eric Blake , Warner Losh Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: linaro.org This is pure duplication now. Both bsd-user and linux-user have builtin strace support and we can also track syscalls via the plugins system. Message-Id: <20230420150009.1675181-2-alex.bennee@linaro.org> Reviewed-by: Warner Losh Reviewed-by: Stefan Hajnoczi Reviewed-by: Richard Henderson Message-Id: <20230503091756.1453057-2-alex.bennee@linaro.org> Signed-off-by: Alex Bennée Message-Id: <20230505155336.137393-2-alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé --- include/user/syscall-trace.h | 4 ---- bsd-user/freebsd/os-syscall.c | 2 -- trace-events | 19 ------------------- 3 files changed, 25 deletions(-) diff --git a/include/user/syscall-trace.h b/include/user/syscall-trace.h index 90bda7631c..557f881a79 100644 --- a/include/user/syscall-trace.h +++ b/include/user/syscall-trace.h @@ -26,9 +26,6 @@ static inline void record_syscall_start(void *cpu, int num, abi_long arg5, abi_long arg6, abi_long arg7, abi_long arg8) { - 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); @@ -36,7 +33,6 @@ static inline void record_syscall_start(void *cpu, int num, static inline void record_syscall_return(void *cpu, int num, abi_long ret) { - trace_guest_user_syscall_ret(cpu, num, ret); qemu_plugin_vcpu_syscall_ret(cpu, num, ret); } diff --git a/bsd-user/freebsd/os-syscall.c b/bsd-user/freebsd/os-syscall.c index c8f998ecec..b0ae43766f 100644 --- a/bsd-user/freebsd/os-syscall.c +++ b/bsd-user/freebsd/os-syscall.c @@ -531,7 +531,6 @@ abi_long do_freebsd_syscall(void *cpu_env, int num, abi_long arg1, CPUState *cpu = env_cpu(cpu_env); abi_long ret; - trace_guest_user_syscall(cpu, num, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8); if (do_strace) { print_freebsd_syscall(num, arg1, arg2, arg3, arg4, arg5, arg6); } @@ -541,7 +540,6 @@ 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); return ret; } diff --git a/trace-events b/trace-events index b6b84b175e..691c3533e4 100644 --- a/trace-events +++ b/trace-events @@ -85,22 +85,3 @@ vcpu guest_cpu_exit(void) # Targets: all vcpu guest_cpu_reset(void) -# include/user/syscall-trace.h - -# @num: System call number. -# @arg*: System call argument value. -# -# Start executing a guest system call in syscall emulation mode. -# -# Mode: user -# Targets: TCG(all) -vcpu guest_user_syscall(uint64_t num, uint64_t arg1, uint64_t arg2, uint64_t arg3, uint64_t arg4, uint64_t arg5, uint64_t arg6, uint64_t arg7, uint64_t arg8) "num=0x%016"PRIx64" arg1=0x%016"PRIx64" arg2=0x%016"PRIx64" arg3=0x%016"PRIx64" arg4=0x%016"PRIx64" arg5=0x%016"PRIx64" arg6=0x%016"PRIx64" arg7=0x%016"PRIx64" arg8=0x%016"PRIx64 - -# @num: System call number. -# @ret: System call result value. -# -# Finish executing a guest system call in syscall emulation mode. -# -# Mode: user -# Targets: TCG(all) -vcpu guest_user_syscall_ret(uint64_t num, uint64_t ret) "num=0x%016"PRIx64" ret=0x%016"PRIx64