From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:47474) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SPCPC-00050U-UW for qemu-devel@nongnu.org; Tue, 01 May 2012 08:42:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SPCPB-0005E9-0G for qemu-devel@nongnu.org; Tue, 01 May 2012 08:42:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:23686) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SPCPA-0005D0-OI for qemu-devel@nongnu.org; Tue, 01 May 2012 08:42:08 -0400 Message-ID: <4F9FDA15.6040708@redhat.com> Date: Tue, 01 May 2012 15:41:57 +0300 From: Avi Kivity MIME-Version: 1.0 References: <4F9D797E.500@ilande.co.uk> <4F9D97F3.8080608@codemonkey.ws> <4F9E5028.7010306@redhat.com> <4F9E82C7.10706@ilande.co.uk> <4F9E9268.70408@redhat.com> <4F9E9569.5000700@redhat.com> <4F9E96EC.5080005@codemonkey.ws> In-Reply-To: <4F9E96EC.5080005@codemonkey.ws> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] Memory API: handling unassigned physical memory List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Peter Maydell , Mark Cave-Ayland , qemu-devel@nongnu.org On 04/30/2012 04:43 PM, Anthony Liguori wrote: > On 04/30/2012 08:36 AM, Avi Kivity wrote: >> On 04/30/2012 04:27 PM, Peter Maydell wrote: >>> On 30 April 2012 14:23, Avi Kivity wrote: >>>> IMO the best fix is to unsysbus the device and qomify it instead. >>>> This >>>> way we're 100% flexible in how we can attach it. >>> >>> You don't need to wait for QOM to grow enough features to >>> replace sysbus. If you don't like what sysbus_mmio_map() does, you >>> can always use sysbus_mmio_get_region() to get the MemoryRegion* and >>> then deal with it however you need to. This is the standard way >>> to deal with "I have a sysbus device which I want to map into my >>> custom container object". >> >> I believe that API voids you warrantee. > > All that a "QOM" conversion would do is eliminate the use of sysbus > and derive the object directly from DeviceState. Then, you would map > the MemoryRegion exported by the device directly. > > So sysbus_mmio_get_region() seems like the right API to use. > I think you're right. The real difference is that there is no longer an implied container region (which is just get_system_memory() in current sysbus). -- error compiling committee.c: too many arguments to function