From patchwork Tue Aug 2 09:49:52 2022 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: 594846 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:b345:0:0:0:0 with SMTP id w5csp4196901maz; Tue, 2 Aug 2022 02:55:29 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vYtwGIJLEQjFsHHg3Vb0NmUGdSe6NPuzBJUYqPyJvJUyVc7l6rbq5hodZv7Jz+i9TcxS7C X-Received: by 2002:a05:620a:17a4:b0:6b6:7ef7:643 with SMTP id ay36-20020a05620a17a400b006b67ef70643mr15002508qkb.759.1659434129467; Tue, 02 Aug 2022 02:55:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659434129; cv=none; d=google.com; s=arc-20160816; b=Bwc8rktR3qz38xbPmIgZOj6ikHjT9PSkeS4fZaTuhiJHwaFknjMh3sF2dww9Bm6q3m 6+ASWUdN3w5QW8RSkhQJb4GmcQG/GpSlZSd1lWf6wniEipkz8aUuV/OFPECEFPdi+qpL yWauNHV/X+ux3pRIZW50w/mQosrivZzeGjATDMTnZaSnn1HH6MrkzT8CejcAgcsMG75M tYaQJoPMWCbGDv/JP68piPm/3fZ6rT7UfK0pwiiSEjHheLyDImxD850Hjov0cwBvbsN5 cjBBxU/irjZnAsjE6dMtmIfijfM8G47auyMwPdEgDBOq61j00ig601RQSkHNj6xyulnK 81rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=5cs2obCibuFrGV6ezAp7TXix+CRt2n51MrtUoaGrvvI=; b=0oEhw7YbsxY9pP/lvDrVaX3Dh71+hFYln5Ratt79DMWj8VfMjwqQ0FQDWjinEcd6b2 LYQLvi7zgSI8dhszlYCRsJYe8WdBuvwQFGF/zdrzIle98gNxDx7+SUSzZsuZ8jQfBA5T +wFr08MgQ7QOwDrUlsW08iAw4XUW1dGh/XnHjXCnLtsoNTCR61+vjFRIwIjEQUlARWD3 h20Ab8+4IlqqHAW1jW6T+QygnOGKSO32SYULYrI1B1yNu66nO1A2N1CmssTB5pPhvdzD jEwq7EMneH4VEfFKubHrzamXxOOZxMMQ3Sz815+qu4NhT2se04xAbqCdkXgLVlodwLFv r0Fg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cECP5XUY; 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=pass (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 f11-20020a0562141d2b00b00474182e2352si1477022qvd.305.2022.08.02.02.55.29 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 02 Aug 2022 02:55:29 -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=pass header.i=@linaro.org header.s=google header.b=cECP5XUY; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:57104 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oIocb-0003g8-3A for patch@linaro.org; Tue, 02 Aug 2022 05:55:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33362) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oIoXb-0001HK-Tv for qemu-devel@nongnu.org; Tue, 02 Aug 2022 05:50:22 -0400 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]:34489) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oIoXZ-0002N3-Kf for qemu-devel@nongnu.org; Tue, 02 Aug 2022 05:50:19 -0400 Received: by mail-wm1-x32a.google.com with SMTP id r1-20020a05600c35c100b003a326685e7cso384338wmq.1 for ; Tue, 02 Aug 2022 02:50:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=5cs2obCibuFrGV6ezAp7TXix+CRt2n51MrtUoaGrvvI=; b=cECP5XUY2z/lkBJFqiKOWxATL/VRg51L8ABqJ08XaYSpvPMczxbN21DUMxWEXFW+GO xeJybOb94+Wg8LrGqQJaPmhmuJnv7/oGm1gPoBg8TWvfvS23efR0aaTBBGcz33/L1wcO CSWs4jWzxyth82L0oRTK6Nkl7tPK3tBhrpfn82B1j8bYy+Q0sI9q6k3nMAh5Bm/SdHpy 1ML8J7w97qCyZE3XpeOOZkqV2lC2lHPJFfqlSySkz7b46YRAKbbFbt40Oo/ylDGXkVzo +NHw8OBr4mCCq8PyeZfthE71WpFQhR35MF7hevP7CfIHiqIuL61hLNGzaY+2ytpHLXt/ aj1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=5cs2obCibuFrGV6ezAp7TXix+CRt2n51MrtUoaGrvvI=; b=VXDWxpeaBxK5U/u1oYKU73kqy5H7MNSp5WwWP5GyryEWpoObPd930bdQsDitHnLegx EEUY4i5dT+JIySVcuwrikFQYi9dJYPNof1GYoRfY0YRzH//mpUNlB1e+9XYozxR54URC cD4tL3o2lhfNhcAbftA3bfTYSUhfPl171BcDdlJA4NXEIG8z3tfO1kN7CD+NpP6kjdl6 ZJOktUPlHpPeNk+iegTsaLH8N06MQd3yyHkplxJ+Ww7f7y3+87Ga5sEamLSxtqVcagoj +ftk6tU+k0Mdl3VPYjytwN7Zeb1vrS859kbWHtMaDWweTkPOyv2fx6BipQxtLLcuAmBW C+hw== X-Gm-Message-State: AJIora8UUvoy+Su6PVmkrL5slQCH8lXCxeZkluYd5Jv+WbCJzLHdcLfI Aar2bSTgwM6gFjSgApcnQ1rkrQ== X-Received: by 2002:a05:600c:154a:b0:3a3:2fae:9bae with SMTP id f10-20020a05600c154a00b003a32fae9baemr13955383wmg.23.1659433816391; Tue, 02 Aug 2022 02:50:16 -0700 (PDT) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id z5-20020a5d6405000000b0021f138e07acsm12063874wru.35.2022.08.02.02.50.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Aug 2022 02:50:16 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 045161FFBC; Tue, 2 Aug 2022 10:50:11 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: slp@redhat.com, mst@redhat.com, marcandre.lureau@redhat.com, stefanha@redhat.com, mathieu.poirier@linaro.org, viresh.kumar@linaro.org, =?utf-8?q?Alex_Benn=C3=A9e?= , Jason Wang Subject: [PATCH v4 04/22] hw/virtio: fix vhost_user_read tracepoint Date: Tue, 2 Aug 2022 10:49:52 +0100 Message-Id: <20220802095010.3330793-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220802095010.3330793-1-alex.bennee@linaro.org> References: <20220802095010.3330793-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" As reads happen in the callback we were never seeing them. We only really care about the header so move the tracepoint to when the header is complete. Fixes: 6ca6d8ee9d (hw/virtio: add vhost_user_[read|write] trace points) Signed-off-by: Alex Bennée Acked-by: Jason Wang Message-Id: <20220726192150.2435175-10-alex.bennee@linaro.org> --- hw/virtio/vhost-user.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c index 1936a44e82..c0b50deaf2 100644 --- a/hw/virtio/vhost-user.c +++ b/hw/virtio/vhost-user.c @@ -295,6 +295,8 @@ static int vhost_user_read_header(struct vhost_dev *dev, VhostUserMsg *msg) return -EPROTO; } + trace_vhost_user_read(msg->hdr.request, msg->hdr.flags); + return 0; } @@ -544,8 +546,6 @@ static int vhost_user_set_log_base(struct vhost_dev *dev, uint64_t base, } } - trace_vhost_user_read(msg.hdr.request, msg.hdr.flags); - return 0; }