qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 2/2] pci: test-dev: try to test fast mmio bus for wi


From: Jason Wang
Subject: [Qemu-devel] [PATCH 2/2] pci: test-dev: try to test fast mmio bus for wildcard mmio event
Date: Wed, 26 Aug 2015 18:04:08 +0800

Test fast mmio by using zero size eventfd.

Signed-off-by: Jason Wang <address@hidden>
---
 hw/misc/pci-testdev.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/hw/misc/pci-testdev.c b/hw/misc/pci-testdev.c
index 26b9b86..7bf67ed 100644
--- a/hw/misc/pci-testdev.c
+++ b/hw/misc/pci-testdev.c
@@ -261,8 +261,12 @@ static void pci_testdev_realize(PCIDevice *pci_dev, Error 
**errp)
         memcpy(test->hdr->name, name, strlen(name) + 1);
         g_free(name);
         test->hdr->offset = cpu_to_le32(IOTEST_SIZE(i) + i * 
IOTEST_ACCESS_WIDTH);
-        test->size = IOTEST_ACCESS_WIDTH;
         test->match_data = strcmp(IOTEST_TEST(i), "wildcard-eventfd");
+        if (!test->match_data && !strcmp(IOTEST_TYPE(i), "mmio")) {
+            test->size = 0;
+        } else {
+            test->size = IOTEST_ACCESS_WIDTH;
+        }
         test->hdr->test = i;
         test->hdr->data = test->match_data ? IOTEST_DATAMATCH : IOTEST_NOMATCH;
         test->hdr->width = IOTEST_ACCESS_WIDTH;
-- 
2.1.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]