From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:45209) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SPI9a-000077-SU for qemu-devel@nongnu.org; Tue, 01 May 2012 14:50:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SPI9Z-0005HX-2E for qemu-devel@nongnu.org; Tue, 01 May 2012 14:50:26 -0400 Received: from p15195424.pureserver.info ([82.165.34.74]:59159) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SPI9Y-0005HJ-Ri for qemu-devel@nongnu.org; Tue, 01 May 2012 14:50:24 -0400 Message-ID: <4FA03083.4030104@ilande.co.uk> Date: Tue, 01 May 2012 19:50:43 +0100 From: Mark Cave-Ayland 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> <4F9E9906.8060401@ilande.co.uk> <4F9EA2AD.9050208@ilande.co.uk> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed 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: Blue Swirl Cc: Peter Maydell , qemu-devel@nongnu.org On 01/05/12 08:10, Blue Swirl wrote: >> In your view, would a suitable fix be to change dma_memory_read, >> dma_memory_write, dma_opaque, it_shift and dma_enabled to be qdev properties >> and modify esp_init() to return the qdev reference so they can be set by the >> caller? > > There's an ongoing work to introduce IOMMUs by changing how DMA work > and this could simplify the DMA part. There's no clean way to use > function pointers in qdev. In my current working tree, I have actually managed to get this working with a customised qdev type macro and the standard qdev pointer type - so it may not be particularly great, but it works. > For it_shift, a qdev or QOM property should be OK. > > The signal dma_enabled should be eventually replaced by a Pin. And this is a sysbus concept, yes? ATB, Mark.