From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43129) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZUuPr-0007d4-Co for qemu-devel@nongnu.org; Thu, 27 Aug 2015 06:28:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZUuPo-0005ZE-JU for qemu-devel@nongnu.org; Thu, 27 Aug 2015 06:28:19 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51768) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZUuPo-0005Yf-EI for qemu-devel@nongnu.org; Thu, 27 Aug 2015 06:28:16 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id 8D8348E764 for ; Thu, 27 Aug 2015 10:28:15 +0000 (UTC) Date: Thu, 27 Aug 2015 13:28:13 +0300 From: "Michael S. Tsirkin" Message-ID: <20150827132731-mutt-send-email-mst@redhat.com> References: <1440583448-15797-1-git-send-email-jasowang@redhat.com> <1440583448-15797-2-git-send-email-jasowang@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1440583448-15797-2-git-send-email-jasowang@redhat.com> Subject: Re: [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: Jason Wang Cc: qemu-devel@nongnu.org On Wed, Aug 26, 2015 at 06:04:08PM +0800, Jason Wang wrote: > Test fast mmio by using zero size eventfd. > > Signed-off-by: Jason Wang wildcard is not the same as ignoring length. I think I have a nicer patch, will post now. > --- > 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