From patchwork Mon May 16 20:54:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 572985 Delivered-To: patch@linaro.org Received: by 2002:a5d:5051:0:0:0:0:0 with SMTP id h17csp772168wrt; Mon, 16 May 2022 14:54:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzfCmXQiORgLP12mJipzUHiFvwV+Ku9njZ5xKkP6IgUiNDEvSGDDQARxUckADlCtjt0RuC8 X-Received: by 2002:a05:6214:518d:b0:45a:933f:965d with SMTP id kl13-20020a056214518d00b0045a933f965dmr17758531qvb.94.1652738074659; Mon, 16 May 2022 14:54:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652738074; cv=none; d=google.com; s=arc-20160816; b=Y5Nycfbzn37JFzXk/FyMVL/U5Lo4pKfPF96U00snIeXYWGFi62b81Iivw6pl0OEPJF Kw+x88WrH9Ck5cIL8WKqQ97nIcSx1/1omp9kw5EJgLAbKcIpMWRGH8VSt6nj5R890q6g B3ZtHMe9fKwY3nbIBLoA66xRymUBQXrxWKMg1k2fBtYLdQpGVCJva+yO0s5fdBO/Wwjc wVfGZM5/ef7d0vSil/s0duKvIrJxJ4tPXnkd81eY7boOT8qTCos8tO+EfRelXx0bncyq ZtBUTnermNrIENv+9SRDQcf01ZiGADjhMQQsazFDn5On4aID9gvvRix1xk0fR/WmW0UG H08Q== 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:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=n6WXp9xMmKMm1v0MT4LZmWjQcAIeqsOeuNoimR/qMv4=; b=jzydwQhQrcwajsn17/tXYnsnGZPq8Hhzw1tjxKJWu3b/5SUBCw+s5M4chOonBRPAxA 0LcpCYGxfTCWYQWPqB3zHemTWX6tbgtMMfKBpSqNY5Wc8su2fCCzdLolXX3ZycySXWH7 mScSKAwSx+pC5RWFNiECrGiLNb93jG28aEMjMQuS+FsZkLCHQA3N7QdLJe2DQrYkettA 2ZdjjhCve8PPa+K34YWhyCal9Mc/QXgtmMagg2DJnETHxBhNCVnroJMAuOxNj7YUppdH Ll7VbLBYKWVX9A0lsdXB2+0LOhWdtDzIsfW8ENSeJybx/r1bgKE7u8cwfLiV0R7vzv4n PANA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=TKwDyJbJ; 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=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id e13-20020a0562141d0d00b0045a8e328d28si7524991qvd.569.2022.05.16.14.54.34 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 16 May 2022 14:54:34 -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=@redhat.com header.s=mimecast20190719 header.b=TKwDyJbJ; 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=redhat.com Received: from localhost ([::1]:48428 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nqifh-0007TX-TB for patch@linaro.org; Mon, 16 May 2022 17:54:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59298) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nqhjS-00019V-Ij for qemu-devel@nongnu.org; Mon, 16 May 2022 16:54:22 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:58120) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nqhjQ-0006kL-V7 for qemu-devel@nongnu.org; Mon, 16 May 2022 16:54:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1652734460; h=from:from: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; bh=n6WXp9xMmKMm1v0MT4LZmWjQcAIeqsOeuNoimR/qMv4=; b=TKwDyJbJvGvnYvoWjz70xWK6WTsF2A8+2RxbqHnZdkQHpVJF1l19KkmaWK2u1zovyi5jjE d1olM8uCTJEeerY5f8V1Enof0OZ+NeSTvc9ge/IIiQU5Mln4FibgfzEnCn4lND8rCPZtEY JZWLywCM4tFN82J3EPOqCmeeYmNwkVU= Received: from mail-ej1-f70.google.com (mail-ej1-f70.google.com [209.85.218.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-169-5919fSliM3aCN7LMqn5kUg-1; Mon, 16 May 2022 16:54:18 -0400 X-MC-Unique: 5919fSliM3aCN7LMqn5kUg-1 Received: by mail-ej1-f70.google.com with SMTP id sc20-20020a1709078a1400b006f4a358c817so6339354ejc.16 for ; Mon, 16 May 2022 13:54:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=n6WXp9xMmKMm1v0MT4LZmWjQcAIeqsOeuNoimR/qMv4=; b=Tb3UWhUfkdw0Ya4Knpws2ehEFVic41daVBD6JgtRFqOO94gGPMLNYN4C8rRSZaxbHB HJdQ6DPi8Ptv8lbm0PqVqcimyJzTLhWmdx/2yNFWSECcrSd647+/MFSWaS1tkAPW9Rrb +7dyhcQoxxjvFVm12JBZ7HUcjLzj+jTbUUeB2uv4HCRyUUoIyUUc7hn8/mfyYociTizK P+NmP+m/JqxKh398IzVMfHJ63sZl4P/lkOIR7Rm4MPzvRao9qazATiumPOv0H0FuLnDK lgVkNK5rSzYf6Oxhv4PkhrZTuzkv8xpzpftllPeWLxpDs5RdvViRmkvS4L0rteXm9UF4 knfQ== X-Gm-Message-State: AOAM531sCyh/BtJ29pz8l8Wr7zxtslEmqYeHNgD8/M31m5mE1HA6JYa7 WPTEU0k+ph79ioJMycDEnUp/e0d1kvjKfPr5pb++NyyOnwUW+q5YmOjW0BDwOd8BpW5yPn+Mv2B jfCG8TawxI5uZNFy9ekx9w5XJO3UedCXzmKLsFCWc5eXQlSp7BKLQ3VAFevhL X-Received: by 2002:a05:6402:294e:b0:425:f016:24e7 with SMTP id ed14-20020a056402294e00b00425f01624e7mr15343419edb.111.1652734457310; Mon, 16 May 2022 13:54:17 -0700 (PDT) X-Received: by 2002:a05:6402:294e:b0:425:f016:24e7 with SMTP id ed14-20020a056402294e00b00425f01624e7mr15343395edb.111.1652734457048; Mon, 16 May 2022 13:54:17 -0700 (PDT) Received: from redhat.com ([2.55.131.38]) by smtp.gmail.com with ESMTPSA id h16-20020a056402095000b0042ac43be19dsm156054edz.3.2022.05.16.13.54.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 May 2022 13:54:16 -0700 (PDT) Date: Mon, 16 May 2022 16:54:13 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Cc: Peter Maydell , Alex =?utf-8?q?Benn=C3=A9e?= , Philippe =?utf-8?q?M?= =?utf-8?q?athieu-Daud=C3=A9?= Subject: [PULL v2 59/86] virtio-pci: add notification trace points Message-ID: <20220516204913.542894-60-mst@redhat.com> References: <20220516204913.542894-1-mst@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220516204913.542894-1-mst@redhat.com> X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent Received-SPF: pass client-ip=170.10.129.124; envelope-from=mst@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, 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" From: Alex Bennée Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20200925125147.26943-6-alex.bennee@linaro.org> Signed-off-by: Alex Bennée Message-Id: <20220321153037.3622127-3-alex.bennee@linaro.org> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/virtio/virtio-pci.c | 3 +++ hw/virtio/trace-events | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c index 602be7f83d..0566ad7d00 100644 --- a/hw/virtio/virtio-pci.c +++ b/hw/virtio/virtio-pci.c @@ -38,6 +38,7 @@ #include "hw/virtio/virtio-bus.h" #include "qapi/visitor.h" #include "sysemu/replay.h" +#include "trace.h" #define VIRTIO_PCI_REGION_SIZE(dev) VIRTIO_PCI_CONFIG_OFF(msix_present(dev)) @@ -1380,6 +1381,7 @@ static void virtio_pci_notify_write(void *opaque, hwaddr addr, unsigned queue = addr / virtio_pci_queue_mem_mult(proxy); if (vdev != NULL && queue < VIRTIO_QUEUE_MAX) { + trace_virtio_pci_notify_write(addr, val, size); virtio_queue_notify(vdev, queue); } } @@ -1393,6 +1395,7 @@ static void virtio_pci_notify_write_pio(void *opaque, hwaddr addr, unsigned queue = val; if (vdev != NULL && queue < VIRTIO_QUEUE_MAX) { + trace_virtio_pci_notify_write_pio(addr, val, size); virtio_queue_notify(vdev, queue); } } diff --git a/hw/virtio/trace-events b/hw/virtio/trace-events index 333348d9d5..7a6576d833 100644 --- a/hw/virtio/trace-events +++ b/hw/virtio/trace-events @@ -89,7 +89,12 @@ virtio_mmio_guest_page(uint64_t size, int shift) "guest page size 0x%" PRIx64 " virtio_mmio_queue_write(uint64_t value, int max_size) "mmio_queue write 0x%" PRIx64 " max %d" virtio_mmio_setting_irq(int level) "virtio_mmio setting IRQ %d" -# virtio-iommu.c +# virtio-pci.c +virtio_pci_notify(uint16_t vector) "virtio_pci_notify vec 0x%x" +virtio_pci_notify_write(uint64_t addr, uint64_t val, unsigned int size) "0x%" PRIx64" = 0x%" PRIx64 " (%d)" +virtio_pci_notify_write_pio(uint64_t addr, uint64_t val, unsigned int size) "0x%" PRIx64" = 0x%" PRIx64 " (%d)" + +# hw/virtio/virtio-iommu.c virtio_iommu_device_reset(void) "reset!" virtio_iommu_system_reset(void) "system reset!" virtio_iommu_get_features(uint64_t features) "device supports features=0x%"PRIx64