From: "Michael S. Tsirkin" <mst@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
"Daniel P. Berrangé" <berrange@redhat.com>,
"Richard W . M . Jones" <rjones@redhat.com>,
"Igor Mammedov" <imammedo@redhat.com>,
"Ani Sinha" <ani@anisinha.ca>
Subject: [PULL 01/41] hw/acpi: add trace events for TCO watchdog register access
Date: Wed, 21 Dec 2022 08:04:06 -0500 [thread overview]
Message-ID: <20221221130339.1234592-2-mst@redhat.com> (raw)
In-Reply-To: <20221221130339.1234592-1-mst@redhat.com>
From: Daniel P. Berrangé <berrange@redhat.com>
These tracepoints aid in understanding and debugging the guest drivers
for the TCO watchdog.
Reviewed-by: Richard W.M. Jones <rjones@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20221216125749.596075-2-berrange@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
hw/acpi/tco.c | 41 ++++++++++++++++++++++++++++-------------
hw/acpi/trace-events | 2 ++
2 files changed, 30 insertions(+), 13 deletions(-)
diff --git a/hw/acpi/tco.c b/hw/acpi/tco.c
index 4783721e4e..9ebd3e5e64 100644
--- a/hw/acpi/tco.c
+++ b/hw/acpi/tco.c
@@ -86,6 +86,7 @@ static inline int can_start_tco_timer(TCOIORegs *tr)
static uint32_t tco_ioport_readw(TCOIORegs *tr, uint32_t addr)
{
uint16_t rld;
+ uint32_t ret = 0;
switch (addr) {
case TCO_RLD:
@@ -96,35 +97,49 @@ static uint32_t tco_ioport_readw(TCOIORegs *tr, uint32_t addr)
} else {
rld = tr->tco.rld;
}
- return rld;
+ ret = rld;
+ break;
case TCO_DAT_IN:
- return tr->tco.din;
+ ret = tr->tco.din;
+ break;
case TCO_DAT_OUT:
- return tr->tco.dout;
+ ret = tr->tco.dout;
+ break;
case TCO1_STS:
- return tr->tco.sts1;
+ ret = tr->tco.sts1;
+ break;
case TCO2_STS:
- return tr->tco.sts2;
+ ret = tr->tco.sts2;
+ break;
case TCO1_CNT:
- return tr->tco.cnt1;
+ ret = tr->tco.cnt1;
+ break;
case TCO2_CNT:
- return tr->tco.cnt2;
+ ret = tr->tco.cnt2;
+ break;
case TCO_MESSAGE1:
- return tr->tco.msg1;
+ ret = tr->tco.msg1;
+ break;
case TCO_MESSAGE2:
- return tr->tco.msg2;
+ ret = tr->tco.msg2;
+ break;
case TCO_WDCNT:
- return tr->tco.wdcnt;
+ ret = tr->tco.wdcnt;
+ break;
case TCO_TMR:
- return tr->tco.tmr;
+ ret = tr->tco.tmr;
+ break;
case SW_IRQ_GEN:
- return tr->sw_irq_gen;
+ ret = tr->sw_irq_gen;
+ break;
}
- return 0;
+ trace_tco_io_read(addr, ret);
+ return ret;
}
static void tco_ioport_writew(TCOIORegs *tr, uint32_t addr, uint32_t val)
{
+ trace_tco_io_write(addr, val);
switch (addr) {
case TCO_RLD:
tr->timeouts_no = 0;
diff --git a/hw/acpi/trace-events b/hw/acpi/trace-events
index eb60b04f9b..78e0a8670e 100644
--- a/hw/acpi/trace-events
+++ b/hw/acpi/trace-events
@@ -55,6 +55,8 @@ piix4_gpe_writeb(uint64_t addr, unsigned width, uint64_t val) "addr: 0x%" PRIx64
# tco.c
tco_timer_reload(int ticks, int msec) "ticks=%d (%d ms)"
tco_timer_expired(int timeouts_no, bool strap, bool no_reboot) "timeouts_no=%d no_reboot=%d/%d"
+tco_io_write(uint64_t addr, uint32_t val) "addr=0x%" PRIx64 " val=0x%" PRIx32
+tco_io_read(uint64_t addr, uint32_t val) "addr=0x%" PRIx64 " val=0x%" PRIx32
# erst.c
acpi_erst_reg_write(uint64_t addr, uint64_t val, unsigned size) "addr: 0x%04" PRIx64 " <== 0x%016" PRIx64 " (size: %u)"
--
MST
next prev parent reply other threads:[~2022-12-21 13:04 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-21 13:04 [PULL 00/41] virtio,pc,pci: features, cleanups, fixes Michael S. Tsirkin
2022-12-21 13:04 ` Michael S. Tsirkin [this message]
2022-12-21 13:04 ` [PULL 02/41] hw/isa: add trace events for ICH9 LPC chip config access Michael S. Tsirkin
2022-12-21 13:04 ` [PULL 03/41] hw/watchdog: add trace events for watchdog action handling Michael S. Tsirkin
2022-12-21 13:04 ` [PULL 04/41] hw: Add compat machines for 8.0 Michael S. Tsirkin
2022-12-21 13:04 ` [PULL 05/41] pc: clean up compat machines Michael S. Tsirkin
2022-12-21 13:04 ` [PULL 06/41] hw/isa: enable TCO watchdog reboot pin strap by default Michael S. Tsirkin
2022-12-21 13:04 ` [PULL 07/41] ich9: honour 'enable_tco' property Michael S. Tsirkin
2022-12-21 13:04 ` [PULL 08/41] virtio: get class_id and pci device id by the virtio id Michael S. Tsirkin
2022-12-21 13:04 ` [PULL 09/41] vdpa: add vdpa-dev support Michael S. Tsirkin
2022-12-21 13:04 ` [PULL 10/41] vdpa: add vdpa-dev-pci support Michael S. Tsirkin
2022-12-21 13:05 ` [PULL 11/41] vdpa-dev: mark the device as unmigratable Michael S. Tsirkin
2022-12-21 13:05 ` [PULL 12/41] vdpa: use v->shadow_vqs_enabled in vhost_vdpa_svqs_start & stop Michael S. Tsirkin
2022-12-21 13:05 ` [PULL 13/41] vhost: set SVQ device call handler at SVQ start Michael S. Tsirkin
2022-12-21 13:05 ` [PULL 14/41] vhost: allocate SVQ device file descriptors at device start Michael S. Tsirkin
2022-12-21 13:05 ` [PULL 15/41] vhost: move iova_tree set to vhost_svq_start Michael S. Tsirkin
2022-12-21 13:05 ` [PULL 16/41] vdpa: add vhost_vdpa_net_valid_svq_features Michael S. Tsirkin
2022-12-21 13:05 ` [PULL 17/41] vdpa: request iova_range only once Michael S. Tsirkin
2022-12-21 13:05 ` [PULL 18/41] vdpa: move SVQ vring features check to net/ Michael S. Tsirkin
2022-12-21 13:05 ` [PULL 19/41] vdpa: allocate SVQ array unconditionally Michael S. Tsirkin
2022-12-21 13:05 ` [PULL 20/41] vdpa: add asid parameter to vhost_vdpa_dma_map/unmap Michael S. Tsirkin
2022-12-21 13:05 ` [PULL 21/41] vdpa: store x-svq parameter in VhostVDPAState Michael S. Tsirkin
2022-12-21 13:05 ` [PULL 22/41] vdpa: add shadow_data to vhost_vdpa Michael S. Tsirkin
2022-12-21 13:05 ` [PULL 23/41] vdpa: always start CVQ in SVQ mode if possible Michael S. Tsirkin
2022-12-21 13:05 ` [PULL 24/41] vhost-user: send set log base message only once Michael S. Tsirkin
2022-12-21 13:05 ` [PULL 25/41] include/hw: attempt to document VirtIO feature variables Michael S. Tsirkin
2022-12-21 13:05 ` [PULL 26/41] acpi/tests/avocado/bits: add SPDX license identifiers for bios bits tests Michael S. Tsirkin
2022-12-21 13:05 ` [PULL 27/41] vhost: fix vq dirty bitmap syncing when vIOMMU is enabled Michael S. Tsirkin
2022-12-21 13:06 ` [PULL 28/41] remove DEC 21154 PCI bridge Michael S. Tsirkin
2022-12-21 13:06 ` [PULL 29/41] pci: drop redundant PCIDeviceClass::is_bridge field Michael S. Tsirkin
2022-12-21 13:06 ` [PULL 30/41] docs/acpi/bits: document BITS_DEBUG environment variable Michael S. Tsirkin
2022-12-21 13:06 ` [PULL 31/41] acpi/tests/avocado/bits: add mformat as one of the dependencies Michael S. Tsirkin
2022-12-21 13:06 ` [PULL 32/41] hw/acpi: Rename tco.c -> ich9_tco.c Michael S. Tsirkin
2022-12-21 13:06 ` [PULL 33/41] hw/cxl/device: Add Flex Bus Port DVSEC Michael S. Tsirkin
2022-12-21 13:06 ` [PULL 34/41] hw/virtio: Add missing "hw/core/cpu.h" include Michael S. Tsirkin
2022-12-21 13:06 ` [PULL 35/41] hw/virtio: Rename virtio_ss[] -> specific_virtio_ss[] Michael S. Tsirkin
2022-12-21 13:06 ` [PULL 38/41] hw/virtio: Extract config read/write accessors to virtio-config-io.c Michael S. Tsirkin
2022-12-21 13:41 ` Michael S. Tsirkin
2022-12-21 13:44 ` Michael S. Tsirkin
2022-12-21 13:06 ` [PULL 40/41] libvhost-user: Switch to unsigned int for inuse field in struct VuVirtq Michael S. Tsirkin
2022-12-21 13:06 ` [PULL 41/41] contrib/vhost-user-blk: Replace lseek64 with lseek Michael S. Tsirkin
2022-12-21 13:44 ` [PULL 36/41] hw/virtio: Guard and restrict scope of qmp_virtio_feature_map_t[] Michael S. Tsirkin
2022-12-21 13:44 ` [PULL 37/41] hw/virtio: Constify qmp_virtio_feature_map_t[] Michael S. Tsirkin
2022-12-21 13:44 ` [PULL 39/41] hw/virtio: Extract QMP related code virtio-qmp.c Michael S. Tsirkin
2022-12-21 18:07 ` [PULL 00/41] virtio,pc,pci: features, cleanups, fixes Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221221130339.1234592-2-mst@redhat.com \
--to=mst@redhat.com \
--cc=ani@anisinha.ca \
--cc=berrange@redhat.com \
--cc=imammedo@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=rjones@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).