From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47401) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bIAAv-0000vm-DB for qemu-devel@nongnu.org; Wed, 29 Jun 2016 03:44:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bIAAs-0002Np-My for qemu-devel@nongnu.org; Wed, 29 Jun 2016 03:44:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50261) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bIAAs-0002Nf-Gu for qemu-devel@nongnu.org; Wed, 29 Jun 2016 03:44:42 -0400 Date: Wed, 29 Jun 2016 15:44:36 +0800 From: Peter Xu Message-ID: <20160629074436.GA23084@pxdev.xzpeter.org> References: <20160629063221.GF16629@pxdev.xzpeter.org> <57736C59.8010503@web.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] Question about qtest and IOMMU List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Jan Kiszka , QEMU Devel Mailing List , Peter Maydell , "Michael S. Tsirkin" , Valentine Sinitsyn , David kiarie , John Snow On Wed, Jun 29, 2016 at 09:08:29AM +0200, Paolo Bonzini wrote: > > > On 29/06/2016 08:36, Jan Kiszka wrote: > > On 2016-06-29 08:32, Peter Xu wrote: > >> Hi, all, > >> > >> I am thinking about whether it's possible to write up a unit test > >> program for emulated IOMMUs (of course, Intel IOMMU would be the first > >> one). This can provide us the chance to do quick functional regression > >> tests for IOMMU just like other devices, as well as customized test > >> sequences which is hard to do in real guests (e.g., specific cache > >> invalidations, error injections), etc.. > >> > >> I see that current qtest framework cannot support well on testing > >> IOMMUs. For DMA remapping, things would be quite smooth. The problem > >> is that, we still do not have a complete test framework on the > >> interrupts. E.g., currently qtest is still an acceleration type, in > >> which we have no vCPUs, as well as interrupt chips like APICs (please > >> correct me if I am wrong). > > qtest does have VCPUs, they just run a dummy loop. You do have an APIC > too, but reading it doesn't work because cpu_get_current_apic() returns > NULL. Right, thanks to point out. > > You can use kvm-unit-tests if qtest is not flexible enough. It's > probably the simplest thing to do if you also want to test kernel LAPIC > and split irqchip operation. Will have a look. Thanks Paolo. :) -- peterx