From: Peter Xu <peterx@redhat.com>
To: qemu-devel@nongnu.org, kvm@vger.kernel.org
Cc: "Jan Kiszka" <jan.kiszka@web.de>,
"Paolo Bonzini" <pbonzini@redhat.com>,
agordeev@redhat.com, "Radim Krčmář" <rkrcmar@redhat.com>,
"Andrew Jones" <drjones@redhat.com>,
peterx@redhat.com
Subject: [Qemu-devel] [kvm-unit-tests PATCH 5/8] intel-iommu: add report prefixes
Date: Fri, 30 Dec 2016 16:55:57 +0800 [thread overview]
Message-ID: <1483088160-6714-6-git-send-email-peterx@redhat.com> (raw)
In-Reply-To: <1483088160-6714-1-git-send-email-peterx@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
---
x86/intel-iommu.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/x86/intel-iommu.c b/x86/intel-iommu.c
index 753f90e..59171a1 100644
--- a/x86/intel-iommu.c
+++ b/x86/intel-iommu.c
@@ -21,6 +21,8 @@ void vtd_test_dmar(struct pci_edu_dev *dev)
{
void *page = alloc_page();
+ report_prefix_push("vtd_dmar");
+
#define DMA_TEST_WORD (0x12345678)
/* Modify the first 4 bytes of the page */
*(uint32_t *)page = DMA_TEST_WORD;
@@ -51,6 +53,8 @@ void vtd_test_dmar(struct pci_edu_dev *dev)
report(VTD_TEST_DMAR_4B, *((uint32_t *)page + 1) == DMA_TEST_WORD);
free_page(page);
+
+ report_prefix_pop();
}
static volatile bool edu_intr_recved;
@@ -64,6 +68,8 @@ static void edu_isr(isr_regs_t *regs)
static void vtd_test_ir(struct pci_edu_dev *dev)
{
#define VTD_TEST_VECTOR (0xee)
+ report_prefix_push("vtd_ir");
+
/*
* Setup EDU PCI device MSI, using interrupt remapping. By
* default, EDU device is using INTx.
@@ -88,6 +94,8 @@ static void vtd_test_ir(struct pci_edu_dev *dev)
/* We are good as long as we reach here */
report(VTD_TEST_IR_MSI, true);
+
+ report_prefix_pop();
}
int main(int argc, char *argv[])
@@ -96,6 +104,8 @@ int main(int argc, char *argv[])
vtd_init();
+ report_prefix_push("vtd_init");
+
report("fault status check", vtd_readl(DMAR_FSTS_REG) == 0);
report("QI enablement", vtd_readl(DMAR_GSTS_REG) & VTD_GCMD_QI);
report("DMAR table setup", vtd_readl(DMAR_GSTS_REG) & VTD_GCMD_ROOT);
@@ -106,6 +116,8 @@ int main(int argc, char *argv[])
vtd_readq(DMAR_CAP_REG) & VTD_CAP_SAGAW);
report("DMAR support huge pages", vtd_readq(DMAR_CAP_REG) & VTD_CAP_SLLPS);
+ report_prefix_pop();
+
if (!edu_init(&dev)) {
printf("Please specify \"-device edu\" to do "
"further IOMMU tests.\n");
--
2.7.4
next prev parent reply other threads:[~2016-12-30 8:56 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-30 8:55 [Qemu-devel] [kvm-unit-tests PATCH 0/8] VT-d ioapic irq test Peter Xu
2016-12-30 8:55 ` [Qemu-devel] [kvm-unit-tests PATCH 1/8] pci: introduce pci_intx_line() Peter Xu
2016-12-30 8:55 ` [Qemu-devel] [kvm-unit-tests PATCH 2/8] pci: introduce pci_msi_set_enable() Peter Xu
2016-12-30 8:55 ` [Qemu-devel] [kvm-unit-tests PATCH 3/8] lib/asm-generic: add atomic.h Peter Xu
2016-12-30 8:55 ` [Qemu-devel] [kvm-unit-tests PATCH 4/8] x86: ioapic: generalize trigger mode Peter Xu
2016-12-30 8:55 ` Peter Xu [this message]
2016-12-30 8:55 ` [Qemu-devel] [kvm-unit-tests PATCH 6/8] intel-iommu: use atomic ops for irte index alloc Peter Xu
2016-12-30 8:55 ` [Qemu-devel] [kvm-unit-tests PATCH 7/8] intel-iommu: allow setup trigger mode for irte Peter Xu
2016-12-30 8:56 ` [Qemu-devel] [kvm-unit-tests PATCH 8/8] intel-iommu: add ioapic irq test Peter Xu
2017-01-12 12:14 ` [Qemu-devel] [kvm-unit-tests PATCH 0/8] VT-d " Paolo Bonzini
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=1483088160-6714-6-git-send-email-peterx@redhat.com \
--to=peterx@redhat.com \
--cc=agordeev@redhat.com \
--cc=drjones@redhat.com \
--cc=jan.kiszka@web.de \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rkrcmar@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).