From patchwork Fri May 26 16:53: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: 685925 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp1025195wrt; Fri, 26 May 2023 09:54:21 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5lnFoXaTSRzx6xQ4iwzd6E8o5KzwhOl5gtxBjObpKGvySbc3tAs1alUMgrPBrBJdu5oNjO X-Received: by 2002:ac8:5989:0:b0:3f6:bf18:3d82 with SMTP id e9-20020ac85989000000b003f6bf183d82mr2104831qte.15.1685120061360; Fri, 26 May 2023 09:54:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685120061; cv=none; d=google.com; s=arc-20160816; b=1BDMUoIuN0RGg29nZSCHegiD9XYabtWvqlkkWoCZAXaRZ5aP8tRcTiVZneZF9OgJZi hQytnditLtVpZKuzGDE5H06qwF9joR/BNxHdVxds+RZk7TrvFGuO8CAyJQPdGre+DXyU cCSKdxlV7njfBTtk3O/ot8oZdW/ktbB4mT7BYBpFto8WQ3m4ETHayTSnhFWC6tnQfH+d v25Y/D37J+NWKAxtOIQYPNtV4V6t9bXSLb8jU6LICX4XLgybHJA0lsOcvNjhtWYfv0fI tLqMgjTHsKbbqs5FQ0FCjn5G6AyXzXzJbjlsn24fw1OqEmfERigwRTKgaMW2LuLsbdF6 mFhQ== 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=0JSph40thfd9YqqHizrdfQZmv5A6L4soqJWF31SYGqc=; b=kkNeOrwP9h/c6xGOUEsjMdiY0pbjxJt5I/i1imPp0+FxM6NGpS5CK92VQXJ5sjp0N+ 2xVvU7zUYHxQGxvaLtgbqPwvSGOdd8j3/xOtOjkiKaDoo5HYPKJRDSeXzJSMitTIWtPC nEX7FprJ4rYwI7oEEbtnsByz80WQ7yzTFIwiIrmEfBBNsEx8k5rcvxHjO+zPJ9snFHhX 6vRtVQ6jrIyRfdp8cXsbuk4dAb04ZI8Mbln3b09U3Vixug7/M/vgObpF7pUcPcUirH4q iXgkYOu0PrpvT3UqUsR4WX44rjl8OZsJO8nfOVA3pZlRIh+J9PuxCkDAQqX4hGFYQnEi S1MQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=PdT59P+i; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 170.10.129.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.129.124]) by mx.google.com with ESMTPS id e21-20020ac84e55000000b003ef4198357csi1545617qtw.744.2023.05.26.09.54.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 May 2023 09:54:21 -0700 (PDT) Received-SPF: pass (google.com: domain of libvir-list-bounces@redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=PdT59P+i; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 170.10.129.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=1685120061; 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=0JSph40thfd9YqqHizrdfQZmv5A6L4soqJWF31SYGqc=; b=PdT59P+ikIAgil2RKklRJ7M4AWZUf8dZ/sUUrULrhk8paopRpC/FiFNvElUTHIjvGpHN9k 8gqI2PEQ4qV7euBiDVUev9USUU0cd375rDdpdqN8U+EZNwW2vo61Ljyqy61quzZcSrEvkq loxL2zyJyGszd1NqYarrR0zpTlUunZ0= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-265-KjtVD1IENW6HePKZKYf71w-1; Fri, 26 May 2023 12:54:13 -0400 X-MC-Unique: KjtVD1IENW6HePKZKYf71w-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 54BED800141; Fri, 26 May 2023 16:54:09 +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 3E528C154D3; Fri, 26 May 2023 16:54:09 +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 04D1A19465B2; Fri, 26 May 2023 16:54:09 +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-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 700891946A41 for ; Fri, 26 May 2023 16:54:07 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 63023492B0B; Fri, 26 May 2023 16:54:07 +0000 (UTC) Delivered-To: libvir-list@redhat.com Received: from mimecast-mx02.redhat.com (mimecast02.extmail.prod.ext.rdu2.redhat.com [10.11.55.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5BD25492B0A for ; Fri, 26 May 2023 16:54:07 +0000 (UTC) Received: from us-smtp-inbound-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) (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 415EA800B2A for ; Fri, 26 May 2023 16:54:07 +0000 (UTC) Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-342-L6OAzHrvOOO8pC0JZtuo9A-1; Fri, 26 May 2023 12:54:04 -0400 X-MC-Unique: L6OAzHrvOOO8pC0JZtuo9A-1 Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-3f6e1394060so7036675e9.3 for ; Fri, 26 May 2023 09:54:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685120043; x=1687712043; 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=0JSph40thfd9YqqHizrdfQZmv5A6L4soqJWF31SYGqc=; b=Y8YPbiRw2zZRbce9MedwAHT/P+1jxW0Bz45UwhyKCdronmrYdHbhK43aMdkiXDlVQs TFwXkTJ9QDpsOM0cTU9+3hLiRvFs2YGUChClSpeV6fMvW2lTYKrUHbU6x86wkBMlaCkR 7po143i6UHQ2yDySU4u9ZI6EeBRUNft4CvvkXTGezFnUEBWcoqXL+VqYy8PUlrlwsyn9 UPSWsa+FQdJ3fE6O19bB7d38P61NOXrDhFybkAmR66hh+oSCb68YKzQCyz7AvNg/ECCX DOu6MXYk/wCaXe+VtNVtpBGgWSy2X8lSCkd1TYF2kzt0iGkDyfqvO9VhZrxv2maAgoay NHWw== X-Gm-Message-State: AC+VfDyN4UHR3AeVzbPQnPlYMgGBIV2fbloJsNcYlDMKxBjPsatun6wS 4gcKr3UDMGBZE3hgBtl/axIgUQ== X-Received: by 2002:a1c:4c0f:0:b0:3f6:13f5:d1ea with SMTP id z15-20020a1c4c0f000000b003f613f5d1eamr1715999wmf.11.1685120043138; Fri, 26 May 2023 09:54:03 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id v24-20020a1cf718000000b003f60b328417sm5780501wmh.17.2023.05.26.09.54.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 May 2023 09:54:02 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 396C21FFBC; Fri, 26 May 2023 17:54:02 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org, Stefan Hajnoczi Subject: [PATCH v6 01/11] *-user: remove the guest_user_syscall tracepoints Date: Fri, 26 May 2023 17:53:51 +0100 Message-Id: <20230526165401.574474-2-alex.bennee@linaro.org> In-Reply-To: <20230526165401.574474-1-alex.bennee@linaro.org> References: <20230526165401.574474-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.10 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, Kyle Evans , Riku Voipio , Richard Henderson , Markus Armbruster , Greg Kurz , Yanan Wang , Marcel Apfelbaum , Michael Roth , Paolo Bonzini , Christian Schoenebeck , Eric Blake , Warner Losh Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 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. Reviewed-by: Warner Losh Reviewed-by: Stefan Hajnoczi Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée Message-Id: <20230524133952.3971948-2-alex.bennee@linaro.org> --- 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