From patchwork Wed Aug 26 10:04:08 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Wang X-Patchwork-Id: 510781 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 23179140082 for ; Wed, 26 Aug 2015 20:09:37 +1000 (AEST) Received: from localhost ([::1]:37116 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZUXeB-0006uU-Cb for incoming@patchwork.ozlabs.org; Wed, 26 Aug 2015 06:09:35 -0400 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) Received: from jason-ThinkPad-T430s.nay.redhat.com (dhcp-14-122.nay.redhat.com [10.66.14.122]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t7QA49k3021425; Wed, 26 Aug 2015 06:04:14 -0400 From: Jason Wang To: qemu-devel@nongnu.org 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> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Jason Wang , mst@redhat.com Subject: [Qemu-devel] [PATCH 2/2] pci: test-dev: try to test fast mmio bus for wildcard mmio event X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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;