qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jason Wang <jasowang@redhat.com>
To: qemu-devel@nongnu.org
Cc: Jason Wang <jasowang@redhat.com>, mst@redhat.com
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	[thread overview]
Message-ID: <1440583448-15797-2-git-send-email-jasowang@redhat.com> (raw)
In-Reply-To: <1440583448-15797-1-git-send-email-jasowang@redhat.com>

Test fast mmio by using zero size eventfd.

Signed-off-by: Jason Wang <jasowang@redhat.com>
---
 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	other threads:[~2015-08-26 10:04 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-26 10:04 [Qemu-devel] [PATCH 1/2] memory: allow zero size for adjust_endianness() Jason Wang
2015-08-26 10:04 ` Jason Wang [this message]
2015-08-27 10:28   ` [Qemu-devel] [PATCH 2/2] pci: test-dev: try to test fast mmio bus for wildcard mmio event Michael S. Tsirkin
2015-08-26 14:21 ` [Qemu-devel] [PATCH 1/2] memory: allow zero size for adjust_endianness() Peter Maydell
2015-08-26 14:51   ` Greg Kurz
2015-08-27  4:50     ` Jason Wang
2015-08-27 10:49       ` Peter Maydell
2015-08-27 10:53         ` Michael S. Tsirkin
2015-08-27 11:04           ` Peter Maydell
2015-08-27 11:08             ` Michael S. Tsirkin
2015-08-27 12:12               ` Peter Maydell
2015-08-27 12:17                 ` Michael S. Tsirkin
2015-08-27 12:20                   ` Peter Maydell
2015-08-27 12:25                     ` Michael S. Tsirkin
2015-08-27 12:27                       ` Peter Maydell
2015-08-27 12:30                         ` Michael S. Tsirkin
2015-08-27 13:10                           ` Greg Kurz
2015-08-28  2:23                             ` Jason Wang

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=1440583448-15797-2-git-send-email-jasowang@redhat.com \
    --to=jasowang@redhat.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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).