From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:47243) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SPCNC-0003Bk-9e for qemu-devel@nongnu.org; Tue, 01 May 2012 08:40:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SPCNA-0004qB-D2 for qemu-devel@nongnu.org; Tue, 01 May 2012 08:40:05 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50220) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SPCNA-0004nh-5O for qemu-devel@nongnu.org; Tue, 01 May 2012 08:40:04 -0400 Message-ID: <4F9FD997.9000403@redhat.com> Date: Tue, 01 May 2012 15:39:51 +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> In-Reply-To: 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: Peter Maydell Cc: Mark Cave-Ayland , qemu-devel@nongnu.org, Anthony Liguori On 04/30/2012 04:40 PM, Peter Maydell wrote: > On 30 April 2012 14:36, 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. > > I wrote it for essentially the purpose described above :-) > If you're the owner of the sysbus device in question then it's > entirely fine as you are the one deciding whether to use the > traditional map function or not. > > It's as good as we're going to get until QOM actually lets > you export memory regions and pins, at which point we can just > convert all the sysbus devices. Sure. But expect breakage if sysbus changes, for example dropping use of get_system_memory(). -- error compiling committee.c: too many arguments to function