From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60515) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZUXZ3-0006fv-Ns for qemu-devel@nongnu.org; Wed, 26 Aug 2015 06:04:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZUXZ2-0006AH-To for qemu-devel@nongnu.org; Wed, 26 Aug 2015 06:04:17 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37265) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZUXZ2-0006A5-PE for qemu-devel@nongnu.org; Wed, 26 Aug 2015 06:04:16 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id 65B40461DD for ; Wed, 26 Aug 2015 10:04:16 +0000 (UTC) From: Jason Wang Date: Wed, 26 Aug 2015 18:04:08 +0800 Message-Id: <1440583448-15797-2-git-send-email-jasowang@redhat.com> In-Reply-To: <1440583448-15797-1-git-send-email-jasowang@redhat.com> References: <1440583448-15797-1-git-send-email-jasowang@redhat.com> Subject: [Qemu-devel] [PATCH 2/2] pci: test-dev: try to test fast mmio bus for wildcard mmio event List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Jason Wang , mst@redhat.com Test fast mmio by using zero size eventfd. Signed-off-by: Jason Wang --- 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