From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:47509) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qxuji-0001bv-4S for qemu-devel@nongnu.org; Mon, 29 Aug 2011 01:50:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qxujh-0004pI-1J for qemu-devel@nongnu.org; Mon, 29 Aug 2011 01:50:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:7189) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qxujg-0004pA-Ov for qemu-devel@nongnu.org; Mon, 29 Aug 2011 01:50:17 -0400 Message-ID: <4E5B2893.1080802@redhat.com> Date: Mon, 29 Aug 2011 08:50:11 +0300 From: Avi Kivity MIME-Version: 1.0 References: <1314389053-30841-1-git-send-email-lmr@redhat.com> <4E580E8E.2060200@codemonkey.ws> <20110827100739.GA11199@zapo> In-Reply-To: <20110827100739.GA11199@zapo> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] hw: Add test device for unittests execution List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Edgar E. Iglesias" Cc: Lucas Meneghel Rodrigues , Marcelo Tosatti , qemu-devel@nongnu.org, Gerd Hoffmann On 08/27/2011 01:07 PM, Edgar E. Iglesias wrote: > > >+ > > >+static ISADeviceInfo testdev_info = { > > >+ .qdev.name = "testdev", > > >+ .qdev.size = sizeof(struct testdev), > > >+ .init = init_test_device, > > >+ .qdev.props = (Property[]) { > > >+ DEFINE_PROP_CHR("chardev", struct testdev, chr), > > >+ DEFINE_PROP_END_OF_LIST(), > > >+ }, > > >+}; > > > > Should this use MemoryRegion? > > Yes. And what is the reason for using IO ports? Mostly for ease of use. The tests were originally run under a separate kvm userspace that didn't emulate a full machine. > There are archs that dont have ioport connections out from the CPU. > > If we are adding virtual devices for tests, they should preferably work for > all archs. > I think all the functionallity here (apart from that which Anthony pointed out is available by other means) is x86 specific. -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.