[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] pci-testdev: enhance to support new testcases
From: |
Peter Xu |
Subject: |
Re: [Qemu-devel] [PATCH] pci-testdev: enhance to support new testcases |
Date: |
Tue, 27 Sep 2016 14:37:44 +0800 |
User-agent: |
Mutt/1.5.24 (2015-08-30) |
On Thu, Sep 22, 2016 at 09:23:05PM +0300, Michael S. Tsirkin 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.
>
> Instead of a parameter, how about creating a subregion
> of the BAR and adding new tests at an offset?
Yeah, I can do that as well.
>
> All you need for compatibility is add a 0-filled
> entry after existing tests.
Could you help explain why we need zero-filled entry? it'll work as
long as tests are using different regions of memory (no overlap),
right?
Thanks,
-- peterx