From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51082) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bnHIo-0000yk-T6 for qemu-devel@nongnu.org; Thu, 22 Sep 2016 23:37:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bnHIj-0002DQ-Vn for qemu-devel@nongnu.org; Thu, 22 Sep 2016 23:37:29 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58120) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bnHIj-0002DD-PF for qemu-devel@nongnu.org; Thu, 22 Sep 2016 23:37:25 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E9D8B4E4D1 for ; Fri, 23 Sep 2016 03:37:23 +0000 (UTC) Date: Fri, 23 Sep 2016 11:37:20 +0800 From: Peter Xu Message-ID: <20160923033720.GT5134@pxdev.xzpeter.org> References: <1474524908-18716-1-git-send-email-peterx@redhat.com> <20160922111824.e5ax3zu3lhzjxb47@hawk.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20160922111824.e5ax3zu3lhzjxb47@hawk.localdomain> Subject: Re: [Qemu-devel] [PATCH] pci-testdev: enhance to support new testcases List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andrew Jones Cc: qemu-devel@nongnu.org, marcel@redhat.com, pbonzini@redhat.com, mst@redhat.com On Thu, Sep 22, 2016 at 01:18:24PM +0200, Andrew Jones wrote: > On Thu, Sep 22, 2016 at 02:15:08PM +0800, Peter Xu wrote: > > pci-testdev is used mostly in kvm-unit-test for some eventfd tests. > > However I see it a good framework for other tests as well (e.g., the > > IOMMU unit test in the future). So enhanced it to support more > > testcases. > > > > The original memory handlers and protocol are strict and not easy to > > change (we need to keep the old behavior of pci-testdev). So I added a > > new parameter for the device, and memory ops will be dynamically handled > > depending on what testcase it is configured. To specify a new test case > > for pci-testdev, we use: > > > > -device pci-testdev,testcase=XXX > > > > The default will be "eventfd", which is the original behavior for > > pci-testdev. In the future, we can just add new testcase for pci-testdev > > to achieve different goals. > > > > Signed-off-by: Peter Xu > > --- > > > > This is kind-of a RFC since I am not sure whether this is a good way. > > I'm not either :-) I haven't looked too closely at this test device, > but I have been involved in reviewing a kvm-unit-tests series[*] that > will drive it. Please take a look at that series and maybe test with > it as well. > > Thanks, > drew > > [*] https://www.spinics.net/lists/kvm/msg136892.html Cool! Will go over. Thanks for the link. :-) -- peterx